631 Commits

Author SHA1 Message Date
Ruben Ayrapetyan
0c7801b996 Fix setup of argument variables in case parameter names are duplicated.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 15:07:00 +03:00
Ruben Ayrapetyan
134491453b Fix ecma_op_get_value_object_base (GetValue, 8.7.1) for case HasPrimitiveBase (ref) is true.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:57:06 +03:00
Ruben Ayrapetyan
b45302ee07 Fix propagation of strict mode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-01 14:44:12 +03:00
Dániel Bátyai
713b433c42 Implement Number.prototype.toPrecision()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 11:15:18 +02:00
Dániel Bátyai
53cbb55f25 Implement Number.prototype.toExponential()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-07-01 10:51:55 +02:00
Ruben Ayrapetyan
71bac03d51 Fix construction of Arguments object: add handler for 'caller' property that throws TypeError upon read or write access.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 19:18:53 +03:00
Ruben Ayrapetyan
ec02ace0e9 Fix syntax check for duplicate parameter names in a strict mode function.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 15:22:21 +03:00
Ruben Ayrapetyan
4870550c8a Fix false-positive unexpected EOF in preparse_scope.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:52:20 +03:00
Ruben Ayrapetyan
0422e2230d Fix syntax check for case 'eval' or 'arguments' identifiers are used for name of function in strict mode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:36:18 +03:00
Ruben Ayrapetyan
7b90d54490 Fix raise of several nested jumpable borders at one label.
Related issue: #164

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 14:25:51 +03:00
Ruben Ayrapetyan
2aa04859ef Fix handling of an exception raised during arguments list evaluation.
Related issues: #260, #261, #262, #263, #264, #265, #266, #267

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-30 10:11:01 +03:00
Andrey Shitov
fd9ff8e3bd Add core unicode functionality.
Add utf-8 processing routines.
Change ecma_char_t from char/uint16_t to uint16_t.
Apply all utf-8 processing routines.
Change char to jerry_api_char in API functions' declarations.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov
c4b0cd2196 Change ecma_length_t and jerry_api_length_t from uint16_t to uint32_t.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov
a0c5974ab8 Move char type definitions and magic string processing functions to literal component.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Szilard Ledan
07148d319b Implement Date object helper functions
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-06-29 18:09:39 +02:00
Ruben Ayrapetyan
984e269db6 Fix direct call to eval from strict mode code.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 18:04:42 +03:00
Ruben Ayrapetyan
6573ffd632 Fix several issues in parse of variable declarations.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:56:42 +03:00
Ruben Ayrapetyan
9e3f123cd5 Fix character code values for "<LF>" and "<CR>" characters in ecma-char helpers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:49:57 +03:00
Ruben Ayrapetyan
3d31bfec92 Fix parse of nested switch statements.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 17:42:37 +03:00
Ruben Ayrapetyan
06dffdec8f Remove exit completion value type.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-29 10:24:18 +03:00
Ruben Ayrapetyan
507411f0a0 Implement parse of for-in statement.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:21:59 +03:00
Ruben Ayrapetyan
b988fe2fce Introduce for-in opcode; implement handler for the opcode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-26 20:10:31 +03:00
László Langó
e027b4d65d Enable regular expressions.
- add regular expressions support to JS parser and interpreter;
- add tests for regular expressions.

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:10 +02:00
Ruben Ayrapetyan
f849cc6283 Fix parse of simple for statement.
Related issue: #156

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 20:29:36 +03:00
Zsolt Borbély
1c19e5c8ab Fix the Object.getPrototypeOf function.
Related issue: #208

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-25 16:32:53 +02:00
Ruben Ayrapetyan
d7ecd4a467 Fix raise of syntax errors for unmatched braces.
Related issue: #43, #183

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 16:47:45 +03:00
Ruben Ayrapetyan
4ff9e79b02 Generate anonymous function expressions for getters / setters of an object literal.
Related issue: #234

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-24 15:37:42 +03:00
Peter Gal
77b01a6473 Provide assert as an external method.
Removed the internal assert implementation from the engine
and provide externally an assert function via api calls.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-23 18:08:51 +02:00
Kristof Kosztyo
61ab205130 Implement Object.create function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-23 17:46:59 +02:00
Zsolt Borbély
3f28cb3bf8 Fix the indexing of Array builtin functions.
The index-dependant builtins didn't handle correctly the positive Infinity value.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-23 17:29:46 +02:00
Laszlo Vidacs
caa1617ea2 Implement String.prototype.trim()
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-23 16:54:42 +02:00
Ruben Ayrapetyan
913519dd5c Fix of ToUInt32 (ecma_number_to_uint32) and ToInt32 (ecma_number_to_int32) conversion routines.
Related issue: #160

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 15:33:03 +03:00
Evgeny Gavrin
216dc251ec Remove support of plug-in mechanism.
This API is obsolete and can be fully replaced with existing `api.h`.

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-23 13:56:46 +03:00
Ruben Ayrapetyan
d1055f98e5 Add set_variable_value to opfunc_native_call.
Related issue: #117

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:16:42 +03:00
Ruben Ayrapetyan
611811678e Remove invalid assertion in ecma_builtin_global_object_eval.
The removed assertion checked that `this` argument can't be equal to `undefined` in direct call to eval.
Actually, `this` can be not equal to `undefined` in case direct call to eval is performed from `with` block.

Related issue: #212

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 13:09:55 +03:00
Ruben Ayrapetyan
a536073da4 Add literal registration in parse_member_expression (TOK_KEYWORD case).
Related issue: #116

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:39:45 +03:00
Ruben Ayrapetyan
0db82a56d2 Fix exception handling in opfunc_native_call (OPCODE_NATIVE_CALL_PRINT case).
Related issue: #122

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-23 12:09:18 +03:00
Kristof Kosztyo
e3861d7cd1 Implement Object.freeze and Object.isFrozen function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 10:03:18 +02:00
Kristof Kosztyo
2ee469ee65 Implement Object.seal and Object.isSealed function
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-22 09:25:10 +02:00
Tamas Czene
4836d3b615 Implemented Number.prototype.toFixed()
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-06-19 17:34:48 +02:00
Ruben Ayrapetyan
a4e54e736e Support syntax error feedback in parser.
Now, parser correctly finishes parse procedure if syntax of source code is incorrect (syntax correctness is indicated using return value):
 - parser-internal memory management is performed using jsp_mm_alloc / jsp_mm_free;
 - upon detection of incorrect syntax, all parser-allocated memory regions are deallocated using jsp_mm_free_all and parse finishes with corresponding return value.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 17:05:15 +03:00
Ruben Ayrapetyan
4e563932f1 Remove parser_init / parser_free interfaces (corresponding actions are now performed in parser_parse_program); introduce boolean return value in parser invocation interfaces that would indicate whether SyntaxError was raised during parse.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 16:25:34 +03:00
Zoltan Herczeg
6027906f96 Add support for URI encoding / decoding.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-06-18 19:05:45 +02:00
Ruben Ayrapetyan
53156771dc Update API for invocation of functions and constructors.
With the change, if exception is thrown in `jerry_api_function_call` and `jerry_api_construct_object`, the exception object is returned to the caller.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 19:14:34 +03:00
Dániel Bátyai
7508b803cf Implement parseFloat()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-17 16:42:07 +02:00
Dániel Bátyai
35840a4b6d Implement parseInt()
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-06-17 16:41:57 +02:00
Ruben Ayrapetyan
b008867d81 Implement setjmp / longjmp in jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Ruben Ayrapetyan
f115f731c3 Switch unit tests to jerry-libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-17 17:03:42 +03:00
Andrey Shitov
a293e21147 Introduce JERRY_DISABLE_HEAVY_DEBUG preprocessor definiton to speed up debug version of the engine.
Heavy debug is enabled only for unit tests.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-17 11:29:35 +03:00
Evgeny Gavrin
bd9a00d254 Rename tests in ./tests/jerry/* directory to match the style of filenames in the project.
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-15 14:44:45 +03:00