773 Commits

Author SHA1 Message Date
SaeHie Park
8fbde244e9 Move log message output(fprintf, puthcar) to target code
Related issue #752

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-12-08 07:48:16 +09: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
chunseok lee
cb0087b517 remove 15.07.04.02-002.js from jerry-test-suites
Number.prototype.toString([radix]) is implementation-dependant.

JerryScript-DCO-1.0-Signed-off-by: chunseok lee chunseok.lee@samsung.com
2015-12-02 12:31:59 +03:00
Ilyong Cho
1c21e16c7b Adding Jerry api for triggering gc.
JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-12-02 12:26:07 +03:00
pius.lee
ece246ef9e Add foreach function for inquiry properties into obj
JerryScript-DCO-1.0-Signed-off-by: pius.lee pius.lee@samsung.com
2015-12-02 12:20:12 +03:00
Hanjoung Lee
ce3b785c83 Fix lexing number literal
Related issue: #745

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-12-02 11:36:30 +09:00
Akos Kiss
ab68d093e8 Whitespace cleanup: tab removal in tests directory
Also changed space-based indentation in touched files if they used
4 spaces for indentation (instead of the most-often-used 2).

Also added new line to end of touched files if they did not end
that way.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-28 21:47:37 +01: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
Hanjoung Lee
f20db76dfb Fix parse error of parse_switch_statement
Related issue: #725

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:19:09 +09:00
Hanjoung Lee
17f7bad242 Fix [[HasInstance]] operation for external functions
Related issue: #736

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-27 12:02:09 +09:00
Evgeny Gavrin
e80cc3592c Add several regression tests from closed issues.
Related issues: #274, #276, #281, #340, #359, #429, #453, #541, #613, #639, #640

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-11-19 14:36:59 +03:00
Hanjoung Lee
140982e900 Fix PropertyName not to be resolved as a local variable
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com

JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-11-13 13:29:38 +09:00
Akos Kiss
7022aa26b0 Add a "Hello JerryScript!" program to the tests
The current code base does not contain any "first JavaScript
program" for those who build JerryScript for Linux console. It
does contain a LED-blinking example -- blinky.js -- but that's
only useful on an developer board where LEDs-to-be-blinked are
available. And the rest of the tests are just that: tests, giving
passed/failed information but nothing eye candy.

This patch adds a simple JS script that can act as a warm welcome
to anyone after the first successful build trying to run something
proving that Jerry works.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-11-11 11:32:08 +00: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
90122d9f33 Fix configuration of recordset's and literal storage's parameters according to MEM_ALIGNMENT_LOG and MEM_CP_WIDTH changes.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-09 21:24:03 +03:00
Ilyong Cho
94cb6aec26 Fix prop_getters stack manipulation for assignment expression.
Related issue: #614

JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-11-09 11:02:57 +09:00
Zsolt Borbély
eaca37c4c9 Simplify severity mechanism in mem allocator.
Related issue: #63

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-04 17:06:43 +01:00
Ruben Ayrapetyan
9194240ada Fix memory leak in jerry_api_set_object_native_handle.
Related issue: #683

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-03 16:41:19 +03:00
Ruben Ayrapetyan
1fe2817457 Introduce parser-time optimization that moves function's argument values to registers.
For functions with the optimization applied:
 - vm puts arguments values immediately to registers without putting them to variables in lexical environment;
 - number of arguments is extracted from corresponding 'reg_var_decl' instruction's argument;
 - for functions that also don't have local variables, lexical environments are not created.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-11-02 17:15:13 +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
f2ced3d91c Fix check for 'eval' and 'arguments' functions' names / argument names in strict mode.
Related issue: #686

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 17:31:04 +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
2bfd754ef3 Fix handling of 1.797693134862315808e+308 floating point value.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:17 +03:00
Ruben Ayrapetyan
04ca231fa4 Fix jsp_early_error_check_for_duplication_of_prop_names.
Related issue: #689

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Ruben Ayrapetyan
f2c54fbe39 Fix serializer_remove_bytecode_data.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +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
Ruben Ayrapetyan
4500965316 Fix handling of non-reference operands in prefix operations.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-30 16:41:16 +03:00
Hanjoung Lee
906558b8e9 Fix: switch statement jumps to incorrect case body
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 19:16:12 +09:00
Hanjoung Lee
3e31931537 Fix: parse error when no expression follows after 'return', 'break', 'continue'
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 18:06:28 +09:00
Hanjoung Lee
fcebf654cc Fix: parser bug in parse_switch_statement
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-29 11:09:48 +09:00
Ruben Ayrapetyan
f2c3e59bbe Change reg_var_decl instruction arguments to [number of registers for temporaries; number of register for local variables].
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-10-23 15:45:28 +03:00
Ilyong Cho
31ae0977f6 Fix lexing of illegal exponential.
Related issue: #339

JerryScript-DCO-1.0-Signed-off-by: Ilyong Cho ily.cho@samsung.com
2015-10-23 13:52:56 +09:00
Hanjoung Lee
448984dd74 Fix: parsing regex and div operator correctly
JerryScript-DCO-1.0-Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
2015-10-22 14:15:18 +09: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
Dániel Bátyai
91f0c9d625 Parse integer numbers from back to front.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
2015-09-16 14:30:45 +02:00
Andrey Shitov
311cc65b33 Implement snapshot functionality.
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-09-09 18:07:24 +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
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
a00079e8ff Reduce number of operand type handling conditional blocks in byte-code dumper, by extracting them to several separate routines that can be used for most cases, remove getop_* routines from vm.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:19:49 +03:00
Ruben Ayrapetyan
173becc3ac Rename idx_t -> vm_idx_t, opcode_special_reg_t -> vm_reg_t, INVALID_VALUE -> VM_IDX_EMPTY / VM_IDX_REWRITE_GENERAL_CASE, LITERAL_TO_REWRITE -> VM_IDX_REWRITE_LITERAL_UID.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-28 16:18:58 +03:00
Ruben Ayrapetyan
10e5f3530d Remove heap allocator's block headers, replacing them with bitmap at start of heap.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 21:42:26 +03:00
Ruben Ayrapetyan
589ebb1802 Remove comparison of unused instruction operands fields (the fields could be uninitialized).
Related issue: #585

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 18:41:04 +03:00
Ruben Ayrapetyan
5b9ce05491 Introduce parser-time optimization that replaces a function's local variables with registers.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:42:45 +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
Andrey Shitov
e4843ece76 Fix processing of elision in array literal.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-08-24 14:51:24 +03:00