Bug 1067699 (part 1) - Export double-conversion.h normally from MFBT. r=froydnj.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 16 Sep 2014 23:33:05 -0700
changeset 205936 6fc33b189e9f7700d4db965fca73b2d5893c6a1c
parent 205935 0a508290d5f8a6fa791a66d72d4945e0b6057343
child 205937 abe819e638a9fef308bf0ae69a339c98903f1415
push id49293
push usernnethercote@mozilla.com
push dateThu, 18 Sep 2014 05:57:18 +0000
treeherdermozilla-inbound@abe819e638a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1067699
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1067699 (part 1) - Export double-conversion.h normally from MFBT. r=froydnj.
config/check_spidermonkey_style.py
js/src/jsnum.cpp
js/src/moz.build
mfbt/moz.build
xpcom/string/moz.build
xpcom/string/nsTSubstring.cpp
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -231,27 +231,28 @@ def get_all_filenames():
 
 
 def check_style():
     # We deal with two kinds of name.
     # - A "filename" is a full path to a file from the repository root.
     # - 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'):
             inclname = 'js/' + filename[len('js/public/'):]
             js_names[filename] = inclname
 
         if filename.startswith('js/src/') and \
            not filename.startswith(tuple(ignored_js_src_dirs)) and \
@@ -449,17 +450,17 @@ def do_file(filename, inclname, file_kin
 
         else:
             if include.inclname not in included_inclnames_to_ignore:
                 included_kind = FileKind.get(include.inclname)
 
                 # 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.
                 # (Exclude .tbl and .msg files.)
                 elif included_kind == FileKind.H or included_kind == FileKind.INL_H:
                     included_h_inclnames.add(include.inclname)
 
                 # Check a H file doesn't #include an INL_H file.
--- a/js/src/jsnum.cpp
+++ b/js/src/jsnum.cpp
@@ -5,27 +5,27 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * JS number type and wrapper class.
  */
 
 #include "jsnum.h"
 
+#include "mozilla/double-conversion.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/RangedPtr.h"
 
 #ifdef HAVE_LOCALECONV
 #include <locale.h>
 #endif
 #include <math.h>
 #include <string.h>
 
-#include "double-conversion.h"
 #include "jsatom.h"
 #include "jscntxt.h"
 #include "jsdtoa.h"
 #include "jsobj.h"
 #include "jsstr.h"
 #include "jstypes.h"
 
 #include "vm/GlobalObject.h"
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -11,18 +11,16 @@ if CONFIG['JS_BUNDLED_EDITLINE']:
     DIRS += ['editline']
 
 # editline needs to get built before the shell
 if not CONFIG['JS_DISABLE_SHELL']:
     DIRS += ['shell']
 
 TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']
 
-LOCAL_INCLUDES += ['../../mfbt/double-conversion']
-
 CONFIGURE_SUBST_FILES += [
     'devtools/rootAnalysis/Makefile',
     'js-confdefs.h',
     'js-config',
     'js.pc',
 ]
 
 if CONFIG['JS_STANDALONE']:
--- a/mfbt/moz.build
+++ b/mfbt/moz.build
@@ -22,16 +22,18 @@ EXPORTS.mozilla = [
     'ChaosMode.h',
     'Char16.h',
     'CheckedInt.h',
     'Compiler.h',
     'Compression.h',
     'Constants.h',
     'DebugOnly.h',
     'decimal/Decimal.h',
+    'double-conversion/double-conversion.h',
+    'double-conversion/utils.h',
     'Endian.h',
     'EnumeratedArray.h',
     'EnumSet.h',
     'FloatingPoint.h',
     'GuardObjects.h',
     'HashFunctions.h',
     'IntegerPrintfMacros.h',
     'IntegerTypeTraits.h',
--- a/xpcom/string/moz.build
+++ b/xpcom/string/moz.build
@@ -49,15 +49,11 @@ UNIFIED_SOURCES += [
 ]
 
 # Are we targeting x86 or x86-64?  If so, compile the SSE2 functions for
 # nsUTF8Utils.cpp.
 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'
--- a/xpcom/string/nsTSubstring.cpp
+++ b/xpcom/string/nsTSubstring.cpp
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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;
 
 #ifdef XPCOM_STRING_CONSTRUCTOR_OUT_OF_LINE
 nsTSubstring_CharT::nsTSubstring_CharT(char_type* aData, size_type aLength,
                                        uint32_t aFlags)
   : mData(aData),
     mLength(aLength),