Peter Gal
36c80f2cf5
Remove nullptr usages and use NULL instead
...
Related issue: #119
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-11 18:38:48 +02:00
Andrey Shitov
53801e3b41
Replace array of literals with literal storage.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
Andrey Shitov
340a9ef002
Add literal storage, literal_t type and functions for its processing.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
Andrey Shitov
528a333e17
Implement recordset iterators
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:00 +03:00
Kristof Kosztyo
6ebb32452e
Refactor the Object.defineProperties function
...
Fix assert and corner cases in Object.defineProperties function.
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-10 15:36:11 +02:00
Peter Gal
f6b875c36c
Use __func__ instead of __FUNCTION__
...
The __FUNCTION__ is not part of the C99/C++11 standard.
So replace all occurrences with the standard __func__.
Side note: GCC 5.1 warns when using -Wpedantic -std=c99
and __FUNCTION__.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-09 18:03:42 +02:00
SaeHie Park
43ec3a33cf
Enable pretty-printer for unittests also
...
* dump string literals with test_api to see jerry_register_external_magic_strings is working ok
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
SaeHie Park
723924f36f
New External Magic String API to save heap memory
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
SaeHie Park
603fa56acf
Add vm_finalize() to clean program pointer for embed systems
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
Andrey Shitov
55b43071d1
Add indentation checks for code inside classes and fix appeared issues.
...
Fix asserts in test_recordset.cpp.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-09 00:30:20 +03:00
Zsolt Borbély
cefeea06f6
Implement Object.getPrototypeOf()
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-08 16:43:30 +02:00
Ruben Ayrapetyan
385b988e69
Fix of memory leak in ecma_op_function_construct_simple_or_external.
...
Related issue: #121
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-08 16:23:22 +03:00
Ruben Ayrapetyan
2270db9414
Removing 'nestings' from parser.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 20:18:29 +03:00
Ruben Ayrapetyan
d99d779486
Support labelled statements.
...
Related issue: #52
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 19:02:08 +03:00
Ruben Ayrapetyan
2de49cdba7
Fix of 'case' / 'default' statements skip during parse of SwitchStatement.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 18:52:09 +03:00
Zsolt Borbély
0b1b102cfa
Implement String.prototype.slice()
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-06-05 10:48:47 +02:00
Ruben Ayrapetyan
ac87616f05
Fixing break / continue, nested into 'try', 'with' blocks.
...
Related issue: #128
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan
8433df3097
Introducing interpreter run scopes.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan
712f8b0c9a
Introducing 'try' and 'with' nestings in parser.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:39:48 +03:00
Ruben Ayrapetyan
3ec6948bae
Fix parsing of 'default' switch-case label in 'parse_switch_statement'.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-04 17:34:44 +03:00
Laszlo Vidacs
4547b0fdac
Array.prototype.map()
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-04 14:31:26 +02:00
Akos Kiss
9d423d9901
Make exit behaviour of jerry_fatal flag-dependent
...
* Added new flag `JERRY_FLAG_ABORT_ON_FAIL`.
* Added new internal api function `jerry_is_abort_on_fail` to
check the status of the flag.
* Changed `jerry_fatal` bail-out function to call `abort` when the
flag is set and exit code is non-zero (i.e., not only for
assertion failures).
* Added `--abort-on-fail` command line option to linux and nuttx
apps to set the flag.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-06-03 17:09:51 +02:00
Ruben Ayrapetyan
4c10a6d057
Restoring lost review fixes for pull request #102 (instantiation of Arguments object).
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-03 15:58:07 +03:00
Akos Kiss
6a607751bf
Terminate with signal in case of an assert
...
Automated debugging is easier if the process terminates with a
signal instead of a regular `exit (code);` call, since in this
latter case the cause of error cannot be automatically backtraced.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-06-03 12:07:55 +02:00
Kristof Kosztyo
a838461649
Implement Object.isExtensible and Object.preventExtensions function
...
JerryScript-DCO-1.0-Signed-off-by: Kristof Kosztyo kkosztyo.u-szeged@partner.samsung.com
2015-06-03 11:22:34 +02:00
Laszlo Vidacs
2a8c928395
Implement Array.prototype.reduceRight()
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-03 11:03:45 +02:00
Peter Gal
e4db5aa539
Improvements for ecma_op_general_object_define_own_property.
...
List of improvements:
- Get the [[Enumerable]] and [[Configurable]] attributes before removing a property.
- Directly check the type of the property in asserts.
Related issues: #115 and #132
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-03 10:47:00 +02:00
Peter Gal
5c012a1183
Implement Object.getOwnPropertyNames and Object.keys.
...
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-06-01 16:01:02 +02:00
Laszlo Vidacs
89e5444438
Array.prototype.reduce() fixes.
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs
95adf0e21f
Array.prototype.reduce() fixes.
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs
f22f3c50e7
Array.prototype.reduce() tests, minor fixes.
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs
71059fe346
Array.prototype.reduce() minor fixes.
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:18:03 +02:00
Laszlo Vidacs
d6e4e19852
Implement Array.prototype.reduce()
...
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
2015-06-01 14:17:57 +02:00
Szilard Ledan
6b8e34a9cd
Implemented Array.prototype.sort()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-05-29 15:22:58 +02:00
Ruben Ayrapetyan
8b28cac99e
Implementing escape sequences support with the exception of "\0" ("<NUL>") character and cases that depend on Unicode support.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 14:03:11 +03:00
Ruben Ayrapetyan
7025f97fdd
Adding routine for conversion of any character sequence (not only strings contained in source code buffer) to lexer token.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 13:46:07 +03:00
Ruben Ayrapetyan
da7e9d9871
Fixing retrieval of [[Class]] properties for built-in function objects, optimizing memory related to [[Class]] property.
...
- introduced ecma_object_get_class_name interface;
- removed creation of [[Class]] internal property for types of objects that unambiguously determine the [[Class]] value.
Related issue: #112
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 12:52:24 +03:00
Ruben Ayrapetyan
bc7c28ce12
Changing ecma_new_ecma_string_from_number to check if the string to create is equal to a magic string, and, if so, to invoke corresponding magic string construction.
...
Related issue: #113
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 12:31:33 +03:00
Ruben Ayrapetyan
d4537eb0d1
Instantiation of Arguments object.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan
ed4ff8e5bb
Introducing a function object's flag indicating whether Arguments object should be instantiated upon call of the function.
...
The Arguments object is supposed to be unnecessary if function's code:
- doesn't reference 'arguments' identifier;
- doesn't reference 'eval' identifier (so, it doesn't perform direct call to eval).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan
b1a31c8144
Adding scope's code flags indicating whether the scope's code reference 'arguments' and 'eval' identifiers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan
cb600da269
Introducing 'scope flags' opcode containing set of flags that indicate various properties of a scope; replacing 'strict mode' meta opcode with a flag in the flags set.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan
e984bc30ea
Fix of 'strict mode' meta type handling in opfunc_meta.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Ruben Ayrapetyan
3a9bf24001
Update of several 'vm' component interfaces naming.
...
init_int -> vm_init;
run_int -> vm_run_global;
run_int_loop -> vm_loop;
run_int_from_pos -> vm_run_from_pos;
read_opcode -> vm_get_opcode.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-28 19:12:54 +03:00
Peter Gal
c3f9169eb7
Fix property lookup in Object.getOwnPropertyDescriptor.
...
The ecma_op_general_object_get_own_property call does not find all
properties, we need to use the ecma_op_object_get_own_property method
for correct property lookup.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-28 15:44:03 +02:00
Dániel Bátyai
3329583435
Implemented Array.prototype.filter()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-05-28 15:36:28 +02:00
Peter Gal
aaeec7fb09
Implement Array.prototoype.toLocaleString()
...
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-05-27 15:18:43 +02:00
Szilard Ledan
cf70fc2500
Implemented Array.prototype.concat()
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
2015-05-27 14:58:57 +02:00
Zsolt Borbély
dd94064a8e
Implement Array.prototype.splice().
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-05-27 14:27:25 +02:00
Zsolt Borbély
b0d4acd026
Implement Object.prototype.propertyIsEnumerable().
...
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-05-27 12:55:25 +02:00