László Langó
e763280761
Fix Vera++ rule for switch statements.
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-09 13:13:40 +01:00
Roland Takacs
0219f37dcc
Remove template expression from jerry_ref_unused_variables.
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 14:00:44 +01:00
László Langó
d038284bff
Style fix: fix comments at the end of function definitions.
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-05 13:46:51 +01:00
László Langó
b1acf1a562
Style fix: align pointer dereference operator to right
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-02-05 13:06:34 +01:00
Roland Takacs
d60bd93da3
Use 'const' instead of 'constexpr'.
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-02-05 11:00:25 +01:00
Zoltan Herczeg
4d2dd22ced
Compact Byte Code parser and executor for Jerry.
...
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Gergely tgergely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: István Kádár ikadar@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2016-02-05 01:15:49 -08:00
pius lee
7868b0ae68
Fix Failed JSON stringify with NaN
...
http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3
Depending to Note4, NaN is reprensented as the String null
JerryScript-DCO-1.0-Signed-off-by: pius lee idkiller@gmail.com
2016-01-13 18:16:02 +03:00
Roland Takacs
21f561f8ef
Refactor literal-storage to not use C++ features
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2016-01-13 15:19:07 +01:00
Andrey Shitov
50d124bfc3
Parser optimizations.
...
- parser is now non-recursive (i.e. parse function is not called recursively in any case);
- byte-code is now more compact:
- constants are now not immediately dumped upon occurence, but later - where necessary;
- assignments are combined with unary / binary operations;
- binary operations are encoded more compactly in many cases;
- byte-code arrays are now allocated separately for each scope (so, GC of the scopes now becomes possible);
- byte-code is dumped directly into corresponding byte-code arrays:
- linked lists of op_meta are not now used for main code of a scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-12-23 14:21:10 +03:00
Zsolt Borbély
ab6d777220
Fix unittests build, when all-in-one is enabled.
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-12-08 14:06:17 +01:00
Laszlo Vidacs
b8b3b1f275
Test and fix CESU-8 handling in String builtins.
...
Fixes #757
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-12-02 12:38:06 +03:00
Laszlo Vidacs
cd7cf53ecb
Rearrange String.prototype.indexOf, lastIndexOf and Replace helpers
...
Fixes issue #515
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-11-27 14:09:11 +01:00
Zsolt Borbély
fe157301a2
Add option to enable all-in-one build mode
...
Related issue: #626
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-25 14:01:07 +01:00
Szilard Ledan
36e90d952f
Global object unescape routine
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-11-11 10:48:35 +01:00
Ruben Ayrapetyan
8af87206c9
Fix ecma_builtin_global_object_decode_uri_helper.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 18:42:01 +03:00
Ruben Ayrapetyan
da47c671e7
List of lazy instantiated properties' names in ecma_op_object_get_property_names.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 16:32:31 +03:00
Ruben Ayrapetyan
09b4d20718
Use ecma_op_object_get_property_names for property enumeration in built-ins implementation.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 16:06:44 +03:00
Ruben Ayrapetyan
3025bd1750
Fix handling of SyntaxError in FormalParameterList during 'new Function' constructor operation.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 17:26:17 +03:00
Ruben Ayrapetyan
a88608a1c0
Fix parseFloat built-in function of the Global object.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Zsolt Borbély
4aaa0ace17
Simplify [[DefineOwnProperty]] usage, use the helper function where possible.
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-10-29 09:26:55 +01:00
Zsolt Borbély
947dc4cab2
Make the Function.prototype.length property non-writable.
...
Fixes #642
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-10-20 16:29:12 +02:00
Dániel Bátyai
579b1edaa5
Refactor builtins to handle CESU-8 encoded strings.
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 16:01:10 +02:00
Dániel Bátyai
dcd610b305
Change internal encoding of strings to CESU-8
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-10-15 13:39:00 +02:00
Peter Gal
08c618e8c5
Add check for setTime implementation to see if the this argument is really a Date object.
...
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-10-07 10:35:02 +02:00
Peter Gal
98fc4098e8
Check if there is really an old bytecode when recompiling a regexp
...
Fixes #612
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-10-01 15:05:01 +02:00
Ruben Ayrapetyan
b7c93f170d
Remove argument names in function prototypes, declared in headers; fix '*' alignment in headers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-28 18:27:10 +03:00
Andrey Shitov
443673fc5d
Update bytecode header structure so that bytecode could be stored independently from hash table and bytecode header.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-09-09 18:07:20 +03:00
Ruben Ayrapetyan
50fdccc8c9
Lazy instantiation of built-in function object's 'length' properties.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-08 15:19:51 +03:00
Ruben Ayrapetyan
ed321da8c1
Fix buffer overflow in 'new Function ()' (ecma_builtin_function_dispatch_construct).
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-07 20:58:43 +03:00
Kristof Kosztyo
5a09ff2d36
Implement the AnnexB Date part
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-09-02 17:20:50 +02:00
Ruben Ayrapetyan
a26c454219
Add warn_unused_result attribute to ecma_string_to_utf8_string. Add assertions that specified buffer size is sufficient in places, where return value of ecma_string_to_utf8_string wasn't checked prior to the changes.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-31 12:59:43 +03:00
Zoltan Herczeg
bf780ad3dc
Global object escape routine.
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-26 01:44:18 -07:00
Szilard Ledan
bafc9551a9
Implement substr function in String object
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-08-25 13:52:40 +02:00
Dániel Bátyai
13941df8dd
Implement RegExp.prototype.compile()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-24 10:10:09 +02:00
Roland Takacs
cc4283b945
Fix assertion 'mem_pools == NULL' fail in JSON.stringify
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-19 08:32:25 +02:00
Zoltan Herczeg
4dcbdb44ff
Cross-build fix after 5e301a1d71a23e8141c4427ae2444c223a1c4c42
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-17 09:53:24 -07:00
Zoltan Herczeg
5e301a1d71
Refactor the remaining date string conversion helpers.
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-17 00:21:50 -07:00
Ruben Ayrapetyan
38fa391cd8
Replace ecma_create_object with high-level Object and Array construction interfaces in JSON built-in implementation.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-14 12:29:31 +03:00
Kristof Kosztyo
9ffa6a39d3
Fix undefined initialValue handling in Array.prototype.reduce and reduceRight function.
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-08-14 10:51:44 +02:00
Dániel Bátyai
5bb56643aa
Fix undefined fromIndex in Array.prototype.lastIndexOf()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-14 10:15:27 +02:00
Kristof Kosztyo
c8884a4561
Fix assert in the Date prototype
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-08-13 22:09:07 +02:00
Zoltan Herczeg
5be41b44bb
Date toString methods follow the date format used by other JS engines:
...
new Date(0).toString () == "Thu Jan 01 1970 00:00:00 GMT+0000"
new Date(0).toUTCString () == "Thu, 01 Jan 1970 00:00:00 GMT"
new Date(0).toISOString () == "1970-01-01T00:00:00.000Z"
Fixes S15.5.4.7_A1_T11.js test case.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-13 06:25:17 -07:00
Roland Takacs
c4b1f02947
Fix assertion 'ret_value == ecma_make_empty_completion_value ()' fail in JSON.stringify()
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-11 18:29:11 +02:00
Zoltan Herczeg
f2c846d960
Fix the this argument passed to string replace callbacks.
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-11 06:23:43 -07:00
Zoltan Herczeg
a751478a19
Although the standard does not specify the effect of $nn in String.replace when nn is bigger than the max, the test-262 test suite expects a certain behaviour. This behaviour is mimiced by this patch.
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-10 23:22:19 -07:00
Ruben Ayrapetyan
1cafff32b5
Pass function arguments through ecma-collections.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:07 +03:00
Ruben Ayrapetyan
7daabb1974
Change fill_params_list to append formal parameter names to ecma-values collection, instead of array; rename it to vm_fill_params_list.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-10 19:56:07 +03:00
Dániel Bátyai
cf1eda0981
Fix assertion fails in parseInt()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-08-10 15:04:14 +02:00
Zoltan Herczeg
8df6cdd1e9
Refactor fromCharCode including support for surrogate pairs.
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-08-10 04:34:31 -07:00
Roland Takacs
f10a48df96
Fix assertion 'mem_pools == NULL' failed in Function.constructor
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-08-10 11:29:51 +02:00