Skip to content

Commit

Permalink
Bug 1067699 (part 1) - Export double-conversion.h normally from MFBT.…
Browse files Browse the repository at this point in the history
… r=froydnj.
  • Loading branch information
nnethercote committed Sep 17, 2014
1 parent ea87165 commit 936b447
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
11 changes: 6 additions & 5 deletions config/check_spidermonkey_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,18 @@ def check_style():
# - An "inclname" is how a file is referred to in a #include statement.
#
# Examples (filename -> inclname)
# - "mfbt/Attributes.h" -> "mozilla/Attributes.h"
# - "js/public/Vector.h" -> "js/Vector.h"
# - "js/src/vm/String.h" -> "vm/String.h"
# - "mfbt/Attributes.h" -> "mozilla/Attributes.h"
# - "mfbt/decimal/Decimal.h -> "mozilla/Decimal.h"
# - "js/public/Vector.h" -> "js/Vector.h"
# - "js/src/vm/String.h" -> "vm/String.h"

mfbt_inclnames = set() # type: set(inclname)
js_names = dict() # type: dict(filename, inclname)

# Select the appropriate files.
for filename in get_all_filenames():
if filename.startswith('mfbt/') and filename.endswith('.h'):
inclname = 'mozilla/' + filename[len('mfbt/'):]
inclname = 'mozilla/' + filename.split('/')[-1]
mfbt_inclnames.add(inclname)

if filename.startswith('js/public/') and filename.endswith('.h'):
Expand Down Expand Up @@ -454,7 +455,7 @@ def check_include_statement(include):
# Check the #include path has the correct form.
if include.inclname not in all_inclnames:
error(filename, include.linenum,
include.quote() + ' is included ' + 'using the wrong path;',
include.quote() + ' is included using the wrong path;',
'did you forget a prefix, or is the file not yet committed?')

# Record inclusions of .h files for cycle detection later.
Expand Down
2 changes: 1 addition & 1 deletion js/src/jsnum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "jsnum.h"

#include "mozilla/double-conversion.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/PodOperations.h"
#include "mozilla/RangedPtr.h"
Expand All @@ -20,7 +21,6 @@
#include <math.h>
#include <string.h>

#include "double-conversion.h"
#include "jsatom.h"
#include "jscntxt.h"
#include "jsdtoa.h"
Expand Down
2 changes: 0 additions & 2 deletions js/src/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ if not CONFIG['JS_DISABLE_SHELL']:

TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']

LOCAL_INCLUDES += ['../../mfbt/double-conversion']

CONFIGURE_SUBST_FILES += [
'devtools/rootAnalysis/Makefile',
'js-confdefs.h',
Expand Down
2 changes: 2 additions & 0 deletions mfbt/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ EXPORTS.mozilla = [
'Constants.h',
'DebugOnly.h',
'decimal/Decimal.h',
'double-conversion/double-conversion.h',
'double-conversion/utils.h',
'Endian.h',
'EnumeratedArray.h',
'EnumSet.h',
Expand Down
4 changes: 0 additions & 4 deletions xpcom/string/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ if CONFIG['INTEL_ARCHITECTURE']:
SOURCES += ['nsUTF8UtilsSSE2.cpp']
SOURCES['nsUTF8UtilsSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']

LOCAL_INCLUDES += [
'/mfbt/double-conversion',
]

MSVC_ENABLE_PGO = True

FINAL_LIBRARY = 'xul'
3 changes: 2 additions & 1 deletion xpcom/string/nsTSubstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "mozilla/double-conversion.h"
#include "mozilla/MemoryReporting.h"
#include "double-conversion.h"

using double_conversion::DoubleToStringConverter;

Expand Down

0 comments on commit 936b447

Please sign in to comment.