Commit Graph

467 Commits

Author SHA1 Message Date
Till Schneidereit
7ed24f54cc Bug 1198193 - Change all functions taking CallArgs to take const CallArgs& instead. r=Waldo 2015-08-27 21:18:37 +02:00
ProgramFOX
648ba142f8 Bug 1124291 - added ToInt8 and ToInt16. r=Waldo 2015-07-02 17:51:25 +02:00
Jason Orendorff
c686caa971 Bug 1140482 - Add JSPROP_RESOLVING. Give NativeDefineProperty standard behavior in cases where a non-resolving define needs to trigger a resolve hook. r=Waldo. 2015-05-01 14:03:17 -05:00
Jan de Mooij
d9ea65d135 Bug 1144366 followup - Stop declaring multiple pointers on a single line. r=jorendorff 2015-04-02 11:22:21 +02:00
Jan de Mooij
24e926ddb3 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 23:22:11 +01:00
Phil Ringnalda
9d871304c0 Backed out changeset 0c030f97a04f (bug 1144366) for being on top of patches being backed out
CLOSED TREE
2015-03-28 10:39:56 -07:00
Jan de Mooij
47c1798049 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Jan de Mooij
56bb36a93c Bug 1137523 - Unprefix most js_* functions. r=bhackett CLOSED TREE 2015-02-27 16:08:15 +01:00
Nathan Froyd
5c4535f109 Bug 1122021 - make number_constants internal to js_InitNumberClass; r=jorendorff
ThreadSanitizer reports write-after-write conflicts to number_constants
while initializing JSRuntimes on different threads.  While an argument
could be made that these writes are entirely safe (they are, after all,
writing the same value every time), it seems better to move to a more
obviously not-racy solution.

This patch implements such a solution, by moving number_constants prior
to its only use in js_InitNumberClass, and forcing the initialization of
the "problematic" constants (infinities, NaNs, etc.) to take place the
first time js_InitNumberClass is executed.

In passing, this patch also removes the unused nc_slot enum.
2015-02-25 11:18:28 -05:00
ziyunfei
5e6372e540 Bug 1135560 - Number.{parseInt, parseFloat} should be the same functions as global ones. r=till 2015-02-24 06:57:00 +01:00
Brian Hackett
51e89fd1e5 Bug 1130708 - Remove js::types namespace, r=jandem. 2015-02-08 06:01:13 -07:00
Jason Orendorff
561c59cee8 Bug 1112778, part 1 - Remove namespace baseops. Rename js::baseops::DefineGeneric -> js::NativeDefineProperty and so on. r=Waldo. 2014-12-17 15:55:32 -06:00
Nicholas Nethercote
4fc6973a1c Bug 1120257 (part 1) - Clarify inline string naming by adding JSThinInline. r=jandem.
This patch introduces a new sub-class of JSInlineString called
JSThinInlineString, and moves the operations specific to thin inline strings
into it. JSInlineString now clearly subsumes both of JS{Thin,Fat}InlineString,
and "inling string" now clearly subsumes both of "thin inline string" and "fat
inline string". Despite adding yet another JSString subclass, I think it makes
things clearer :)

The patch also renames a bunch of things accordingly, and removes the dead
resetLength() declaration.
2015-01-13 14:25:36 -08:00
Shu-yu Guo
e9cdd4bde4 Bug 1118107 - Convert ThreadSafeContext -> ExclusiveContext and remove PJS paths in string and conversion ops. (r=lth) 2015-01-09 00:06:03 -08:00
Jeff Walden
535fe9c758 Bug 1112769 - Move the contents of js/src/vm/NumericConversions.h into a new js/public/Conversions.h header containing public API. r=jorendorff
--HG--
rename : js/src/vm/NumericConversions.h => js/public/Conversions.h
extra : rebase_source : c6b30f38cbc3eafa5eb861ba578234c28982459d
2014-12-17 13:50:14 -08:00
Jason Orendorff
d8d2b7ff19 Bug 1103368, part 5 - Make Class::getProperty and setProperty nullable instead of needing stub functions. Never store stub functions in JSPropertyDescriptors. r=bhackett.
--HG--
extra : rebase_source : a44070dd6155426ef6026c1575116f90b5fdac0c
extra : amend_source : 8d8fcf05dfd5fdf214a39501663347a6d6b56463
2014-11-22 12:23:39 -06:00
Jason Orendorff
94c3456417 Bug 1103368, part 2 - Ban stub getter/setter arguments to js::baseops::Define{Property,Generic,Element}, DefineNativeProperty, and DefinePropertyOrElement. r=bhackett.
--HG--
extra : rebase_source : 1b8524aebf85aa27fa9542b8001cae489888e887
2014-11-21 21:07:13 -06:00
Jason Orendorff
7acf3e4267 Bug 1103152 - Remove JS_DeletePropertyStub, JS_EnumerateStub, JS_ResolveStub, and JS_ConvertStub. Make five mandatory JSClass hooks optional (nullable). r=bhackett.
--HG--
extra : rebase_source : a349ef612573aff8f87b995a65df94ae56cab13d
extra : amend_source : bbfe549fe0735d8b33ffff66d7eeddcc2ad042d2
2014-12-02 16:56:35 -06:00
Jeff Walden
bb5f557a73 Bug 712939 - Replace a bunch more JS_STATIC_ASSERTs with static_assert. r=jandem 2014-10-30 14:28:27 -07:00
ziyunfei
52125052b8 Bug 1079120 - Make ToNumber(string) support binary and octal literals. r=till 2014-10-07 02:25:00 -04:00
Brian Hackett
a7e27000a7 Bug 1073842 - Rename ObjectImpl to NativeObject, sr=luke. 2014-10-07 18:50:34 -07:00
Brian Hackett
79a0591de6 Bug 1073842 - Move NativeObject manipulating methods into more appropriate files, sr=luke. 2014-10-06 04:05:40 -07:00
Nicolas B. Pierron
e40c9c6a42 Bug 1074911 - Replace JS_ASSERT_IF by MOZ_ASSERT_IF. r=jorendorff
Apply the following script

sed -i '
   /JS_ASSERT_IF(/ {
     s/JS_ASSERT_IF(/MOZ_ASSERT_IF(/;
     :b;
     s/ \\$/\\/;
     /;/ { p; d; };
     n;
     s/^/ /;
     b b;
  };
  s/JS_ASSERT_IF (/MOZ_ASSERT_IF(/;
'
2014-10-01 19:17:53 +02:00
Nicolas B. Pierron
2c4549342d Bug 1074911 - Replace JS_ASSERT by MOZ_ASSERT. r=jorendorff
Apply the following script

sed -i '
   /JS_ASSERT(/ {
     s/JS_ASSERT(/MOZ_ASSERT(/;
     :b;
     s/ \\$/\\/;
     /;/ { p; d; };
     n;
     s/^/ /;
     b b;
  };
  s/JS_ASSERT (/MOZ_ASSERT(/;
'

Except where the JS_ASSERT macro does not end with a semi-colon, where empty
lines are in the middle of the macro, and where the backslahes are always the
same-length after the expression.
2014-10-01 19:17:51 +02:00
Nicholas Nethercote
9a8bee0c06 Bug 1067699 (part 1) - Export double-conversion.h normally from MFBT. r=froydnj.
--HG--
extra : rebase_source : 14c3d827f4d8015d8326612e82782c52dcf7335d
2014-09-16 23:33:05 -07:00
Lars T Hansen
2213b7207d Bug 1054882 - Rollup patch. r=till, r=sstangl, r=jorendorff 2014-09-16 18:45:31 +02:00
Benjamin Bouvier
1718c285d9 Bug 1066020: Remove fields in JSConstScalarSpec and invert fields order; r=till 2014-09-15 15:13:08 +02:00
Benjamin Bouvier
30e7733f10 Bug 1066020: Add JSConstIntegerSpec to jsapi; r=till 2014-09-15 15:13:05 +02:00
Chris Peterson
412ea5db86 Bug 1063962 - Replace jschar typedef with C++11 char16_t type. r=jandem 2014-07-21 21:43:21 -07:00
Jinank Jain
000a064f34 Bug 1021963 - Self host isNaN and isFinite. r=jwalden
--HG--
extra : rebase_source : 263a62a38ddfa782ece8d0217dc973d66a98e92b
2014-08-23 20:42:05 +05:30
Jan de Mooij
4a26d3f8b3 Bug 1056529 - Remove old workarounds for MSVC PGO bugs. r=h4writer 2014-08-27 10:14:07 +02:00
446240525@qq.com, Jason Orendorff
aacf873d47 Bug 1042602 - Symbol behavior changes in ES6 draft rev 26. r=h4writer.
--HG--
extra : rebase_source : 7af12add5ae1c0aabfc42f73b18dd932ba93aad3
2014-07-31 09:05:18 -05:00
Jan de Mooij
8536388cfd Bug 1037889 - Attempt to silence a harmless Coverity warning. r=bbouvier
--HG--
extra : rebase_source : 10b6046b9b9fdac476b127e2a04c5218fb13b5c6
2014-08-01 11:16:46 +02:00
Jan de Mooij
f2893d2ba1 Bug 1038093 - Create Latin1 strings in some more cases, when Latin1 strings are enabled. r=luke 2014-07-14 19:17:15 +02:00
Jon Coppeard
393eabfde9 Bug 1032171 - Qualify use of mozilla::Range to fix potential ambiguous reference errors in unified builds r=jandem 2014-07-01 09:46:53 +01:00
Jan de Mooij
35b223a622 Bug 1028866 part 1 - Move string allocation functions into js namespace, remove js_* prefix. r=luke
--HG--
extra : rebase_source : 1f4c940dce07a7ced533c641c60cf76592fd61ac
2014-06-24 17:33:27 +02:00
Jason Orendorff
408955a426 Bug 645416, part 13 - Update ToNumber for symbols. r=sfink.
Not terribly interesting; converting a symbol to a number always produces NaN.

--HG--
extra : rebase_source : ded251ef9e92d92483b5cc18cf16e2910084bbff
2014-06-23 10:56:50 -05:00
Jason Orendorff
e4a6c4213a Bug 645416, part 4 - Rename DefinePropertiesAndBrand -> DefinePropertiesAndFunctions. r=bhackett.
--HG--
extra : rebase_source : beadd475b66cb17c7fe6f74766a5d90767817cf0
2014-06-23 10:55:52 -05:00
Jan de Mooij
68114dd79c Bug 1023778 part 4 - Add JSONParser<Latin1Char>. r=Waldo 2014-06-13 20:51:07 +02:00
Jan de Mooij
217f4fc055 Bug 1017107 - Make StringBuffer support Latin1 strings. r=luke 2014-06-13 14:26:03 +02:00
Shu-yu Guo
5f13a1187f Bug 1022948 - Fix FPU in PJS worker threads. (r=Waldo) 2014-06-11 01:51:37 -07:00
Benjamin Peterson
d4c0f4954e Bug 1022396 - Remove Number.toInteger. r=jorendorff
--HG--
extra : rebase_source : b9083a824d6a436f7da4c9e158cb78b4ba81fb8c
2014-06-09 10:48:26 -07:00
Jeff Walden
7e698a4907 Bug 1021001 - Remove AutoCheckCannotGC from NamespaceImports.h, and require users to use the sole definition in GCAPI.h. r=terrence 2014-06-09 09:44:30 -07:00
Jan de Mooij
09f077a98b Bug 1020420 followup - Add explicit template instantiations to fix b2g opt compile errors on a CLOSED TREE. r=bustage 2014-06-06 12:00:48 +02:00
Jan de Mooij
a4eee954a6 Bug 1020420 part 4 - Make StringToNumber work with Latin1 strings. r=njn 2014-06-06 11:17:52 +02:00
Jan de Mooij
66afe359e5 Bug 1020420 part 3 - Make parseFloat work with Latin1 strings. r=njn 2014-06-06 11:17:51 +02:00
Jan de Mooij
7585ece26e Bug 1020420 part 2 - Refactor js_strtod. r=njn 2014-06-06 11:17:49 +02:00
Jan de Mooij
bf5026e75f Bug 1020420 part 1 - Make parseInt work with Latin1 strings. r=njn 2014-06-06 11:17:47 +02:00
Nathan Braswell
3cb264cd82 Bug 1017275 - Make Number.isNaN and Number.isFinite inlinable. r=jwalden
--HG--
extra : rebase_source : 3a1bc67198c948b29efdfa96e86f7fbdc22ce8d0
2014-06-05 15:40:20 -07:00
Jan de Mooij
07825137fb Bug 1015917 part 1 - Support string concatenation for Latin1 strings. r=luke 2014-05-31 10:44:32 +02:00