451 Commits

Author SHA1 Message Date
Zsolt Borbély
352e8f5c04 Minor stylefixes for the Array builtin
Related issue: #110

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-22 15:01:11 +03:00
Zsolt Borbély
cdf361c2bd Reorder Array builtin functions
Sort the functions according by the chapters of the standard.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-22 15:01:11 +03:00
Ruben Ayrapetyan
6ade8dfebb Fix preparse_scope - consider nesting level during search for identifier tokens.
Related issue: #440

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:50:57 +03:00
Ruben Ayrapetyan
31894da098 Move ecma-stack to vm component, renaming it to vm-stack.
ECMA-stack is related to VM and is not related to ECMA component, except for GC.
Dependency between vm-stack and GC would be solved after GC would be extracted to a separate compoment.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:36:23 +03:00
Ruben Ayrapetyan
7dcaf06793 Rename int_data_t -> vm_frame_ctx_t, vm_frame_ctx_t* variables from int_data / int_data_p -> frame_ctx_p.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-22 14:36:23 +03:00
Dániel Bátyai
a2c6663d43 Array.prototype.sort() now handles defined properties only.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-22 14:18:24 +03:00
Dániel Bátyai
9d6e7bf336 Array.prototype.sort() should sort in place.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-22 14:18:24 +03:00
Szilard Ledan
7c1622855d Fix the infinite loop in ecma_date_year_from_time
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-21 14:04:44 +02:00
Szilard Ledan
9edae36b00 Fix assertion fail in ecma_date_make_day
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-21 14:04:44 +02:00
Laszlo Vidacs
c7a47c1791 Implement String.prototype.charCodeAt()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-07-20 16:10:45 +02:00
Ruben Ayrapetyan
7b3042fdc9 Remove usage of isalpha, isdigit, isxdigit, isspace in the whole engine except implementation of JSON built-in, moving the functions to JSON built-in's module.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-20 15:47:19 +03:00
Zoltan Herczeg
bcedc901cd Add \u parse support for the JSON object. Buffer overrun issues were fixed as well.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-20 01:09:13 -07:00
Szilard Ledan
bbfddea032 Fix Date(Number.POSITIVE_INFINITY) assertion fail in the Date constructor
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-17 17:38:00 +02:00
Ruben Ayrapetyan
68b9fb54d5 Turn off Date and RegExp built-in objects in compact profile.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-16 20:24:10 +03:00
Szilard Ledan
351df6184c Add locale part of the toString in the Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-16 13:04:41 +02:00
Dániel Bátyai
b414329ce8 Fix Array.prototype.concat() argument array length.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-16 10:22:52 +03:00
Peter Gal
db9b74a114 Fix buffer size calculation in parseInt.
Fixes issue #279.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-16 10:14:22 +03:00
Szilard Ledan
d2457b1fc6 Add missing RegExp case in the token_type_to_string
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-16 10:04:03 +03:00
Andrey Shitov
4fdb5249b9 Restore "Fix preparsing of variable declaration lists, which are not divided by a semicolon." 06d0c1806d7ceff5192feee996c770b42bc1e1e9) that was incorrectly removed in abc2b55297eff13538fca2440d127ba79cdcc8b3.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 20:20:26 +03:00
Ruben Ayrapetyan
abc2b55297 Fix dump of arguments / eval usage hint in preparse_scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:24:54 +03:00
Szilard Ledan
005eb044a9 Implement builtin setters for Date object
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-07-15 17:16:59 +03:00
Ruben Ayrapetyan
7bc2c69147 Temporary workaround (until parser is refactored) for fixing parse of expressions like '1 = 1'.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:00:45 +03:00
Ruben Ayrapetyan
44b7b95781 Add support of ReferenceError early error to parser.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 17:00:45 +03:00
Andrey Shitov
06d0c1806d Fix preparsing of variable declaration lists, which are not divided by a semicolon.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 16:53:41 +03:00
László Langó
051c7b6786 Implement Date.prototype.toDateString and Date.prototype.toTimeString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 16:25:14 +03:00
László Langó
84f09ffcd9 Follow up fix for Date.prototype.toString
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 16:25:14 +03:00
Roland Takacs
dcc704d1e8 Add missing case for backspace control character in JSON.parse()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 16:17:56 +03:00
Roland Takacs
8aeb2a055e Fix underflow in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 16:09:51 +03:00
Zsolt Borbély
f625473f9a Implement String.prototype.localeCompare function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-15 15:50:38 +03:00
Dániel Bátyai
e5b2e1e389 Number.prototype functions should throw TypeError if 'this' is not number.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-15 15:41:19 +03:00
Peter Gal
c8a16f2107 Improve Function constructor argument handling.
For the Function constructor it is possible to pass the
name of the function arguments in one or more strings, and
each argument name should be separated with a comma.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-07-15 15:33:10 +03:00
Roland Takacs
292d99ba4e Fix assertion 'bytes_copied > 0' in JSON.stringify()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
2015-07-15 13:48:11 +03:00
Ruben Ayrapetyan
7ccec19c26 Fix strict mode in an object initializer's getters / setters definition.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 13:32:02 +03:00
Andrey Shitov
4f58104981 Fix checking of semicolons in expression statements.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-15 13:15:25 +03:00
Ruben Ayrapetyan
0e8cb596d7 Fix parse of preincrement / predecrement, applied to 'obj.prop'-like expressions.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 13:04:02 +03:00
Ruben Ayrapetyan
6fe78cc994 Temporary workaround (until parser is refactored) for fixing evaluation of simple 'identifier'-like expressions.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:52:42 +03:00
Ruben Ayrapetyan
5e329c815c Fix syntax checking of large object literals.
Related issue: #354

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:41:56 +03:00
Ruben Ayrapetyan
73d082aa55 Fix parse of delete operator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:34:51 +03:00
Ruben Ayrapetyan
c120433158 Fix handling of EOF in insert_semicolon.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-15 12:31:47 +03:00
László Langó
cf9d54545f Style fixes for RegExp engine.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-07-15 11:02:11 +02:00
Zsolt Borbély
1e90f833f7 Implement Function.prototype.bind function
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-07-15 08:39:35 +02:00
Ruben Ayrapetyan
92bf7859af Put lexer_init after setjmp in parser_parse_program, as lexer_init could raise an early error.
Related issues: #341

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-14 18:42:49 +03:00
Andrey Shitov
1195c197e8 Fix syntax checking for line terminators inside regular expressions.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-14 17:58:24 +03:00
Andrey Shitov
f3ef9afb91 Fix handling of invalid HexIntegerLiterals in lexer.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-14 17:58:24 +03:00
Zoltan Herczeg
69655f4456 Implement toLowerCase and toUpperCase built-in functions.
Related issue: #323

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-07-14 07:01:47 -07:00
SaeHie Park
bc0ca7be5d Add heap size limit
to solve #342

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-07-14 07:44:37 +09:00
Ruben Ayrapetyan
aa415c670e Fix initialization of 'this' argument in 'call_n' opcode handler.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:31:07 +03:00
Ruben Ayrapetyan
c84d31ce9e Fix sign of number remainder (ecma_op_number_remainder).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:21:46 +03:00
Ruben Ayrapetyan
f8770020f7 Update RegExp.prototype.exec so that it returns 'null' instead of 'undefined' in case argument doesn't match corresponding regular expression.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 19:05:37 +03:00
Ruben Ayrapetyan
8aa2571699 Fix NaN handling in ecma_op_same_value.
Related issue: #130

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-13 18:57:38 +03:00