Ruben Ayrapetyan
57f645c18c
Passing ecma_value_t arguments by const reference instead of by value.
2015-01-23 20:22:21 +03:00
Ruben Ayrapetyan
005b5370fc
Switching to g++ and corresponding changes according to C++ requirements.
2015-01-16 17:27:02 +03:00
Ruben Ayrapetyan
557df54f9d
Registering temporary variables arrays in ecma-stack frames, starting mark traverse from them during GC.
2015-01-15 18:45:37 +03:00
Ruben Ayrapetyan
eef966869a
Revert "Switching get_variable_value to returning value through ecma-stack (stack convention)."
...
This reverts commit 6415130925187a877b83b14db40cade0c336ea44.
2015-01-15 17:26:08 +03:00
Ruben Ayrapetyan
e570d18936
Switching get_variable_value to returning value through ecma-stack (stack convention).
2015-01-14 20:09:24 +03:00
Ruben Ayrapetyan
917ebe4a83
Creating ecma-stack frames in run_int_from_pos.
2015-01-12 20:52:04 +03:00
Ruben Ayrapetyan
42c44830ce
Removing trailing whitespace from sources.
2014-12-19 14:35:17 +03:00
Ruben Ayrapetyan
6bb39bb8ea
Introducing 'try to give memory back' callback for heap allocator to use upon allocation request that can not be satisfied by the allocator.
2014-12-18 22:25:22 +03:00
Ruben Ayrapetyan
84294018a3
Replacing dynamically sized on-stack arrays with heap allocated arrays defined through MEM_DEFINE_LOCAL_ARRAY.
2014-12-18 13:56:45 +03:00
Ruben Ayrapetyan
d836dc32af
Introducing ECMA_OP_TO_NUMBER_TRY_CATCH and ECMA_OP_TO_NUMBER_FINALIZE macroses.
...
- the ECMA_OP_TO_NUMBER_TRY_CATCH macro gets number from given value,
converting the value to number if it's type is different,
and catching possible conversion exceptions;
- using the macroses instead of ecma_op_to_number to reduce allocator invocations
in several routines with arguments that are likely to be numbers.
2014-12-15 23:08:34 +03:00
Ruben Ayrapetyan
386a530d4d
Upon assignment of a number to a register variable reusing the variable's space if it already contains a number.
2014-12-15 23:08:34 +03:00
Ruben Ayrapetyan
eb80e817d8
Removing trailing whitespace in src/libcoreint/opcodes.c.
2014-12-15 23:08:34 +03:00
Ilmir Usmanov
dc8ab27900
Split parser into parser itself, opcodes dumper and syntax errors checker.
...
Add internal hash map of literal indexes:
In this hash map key is pair of block number and literal's unique identifier in the block, and the value is a literal index that unique in the whole program.
Block is a continues array of opcodes. So, bytecode is splitted into blocks.
Each block has its own uid counter. To get literal index the interpreter looks up it in the hash map.
Thus, now JS program is able to have more than 255 identifiers/string literals.
The first 128 (0-127) uids are reserved for block's uid counter, the other 128 (128-255) are reserved for tmp variables.
2014-12-10 18:31:59 +03:00
Ruben Ayrapetyan
2c86712e21
Introducing number chunk for storage of temporary (stack-only) number operands.
2014-12-09 18:24:16 +03:00
Ruben Ayrapetyan
557a4b6460
Removing ecma_op_object_has_property and ecma_op_general_object_has_property routines.
2014-12-03 22:48:37 +03:00
Ruben Ayrapetyan
90fccc04ba
Passing property descriptors by const ref instead of by value.
2014-12-03 21:57:11 +03:00
Ruben Ayrapetyan
3190089818
Introducing getter and setter for named data property's value field, ecma_named_data_property_assign_value interface; using boolean flags for 'Writable', 'Enumerable' and 'Configurable' attributes values while passing them in routine arguments.
2014-12-03 15:45:58 +03:00
Ruben Ayrapetyan
1f3d96cffa
Representing ecma_completion_value_t as integer instead of structure with bit-fields, adding corresponding field accessors; adding __attribute_const__ to some value handling helpers.
2014-11-27 18:20:12 +03:00
Ruben Ayrapetyan
0d870a1e74
Representing ecma_value_t as integer instead of structure with bit-fields, adding corresponding field accessors.
2014-11-27 17:34:03 +03:00
Ruben Ayrapetyan
815309c7e9
Introducing ecma_get_[type]_from_value, ecma_get_[type]_from_completion_value and ecma_get_completion_value_value interfaces.
2014-11-27 14:19:53 +03:00
Ruben Ayrapetyan
036521627e
Introducing "on-stack" ecma-string descriptors and using them in get_variable_value / set_variable_value.
2014-11-21 13:06:30 +03:00
Ruben Ayrapetyan
14ab1b3355
Removing construction of ecma_reference_t in get_variable_value and set_variable_value.
2014-11-20 22:09:14 +03:00
Ruben Ayrapetyan
6dd357a554
Using ecma_is_value_* instead of switches for determining of ecma-value's type.
2014-11-20 15:33:04 +03:00
Ruben Ayrapetyan
7b3eaf146b
Introducing ecma_is_value_{number,string,object} for checking type of ecma-value.
2014-11-20 14:21:33 +03:00
Ruben Ayrapetyan
24c9b12ce5
Compacting some ecma_number_* helpers, allowing NaN in argument of ecma_number_negate, using ecma_number_negate instead of immediate unary minus in ecma_number_substract.
2014-11-19 16:11:05 +03:00
Ruben Ayrapetyan
477a694622
Introducing ECMA_GET_NON_NULL_POINTER macro that is ECMA_GET_POINTER without NULL pointer check.
...
Replacing invocations of ECMA_GET_POINTER passing non-NULL argument with introduced ECMA_GET_NON_NULL_POINTER.
2014-11-13 19:09:13 +03:00
Ruben Ayrapetyan
0e10e97120
Returning bool value instead of simple boolean completion value from ecma_op_has_binding.
2014-11-13 18:08:23 +03:00
Ruben Ayrapetyan
1fae7645af
Splitting ecma_op_get_value and ecma_op_put_value.
...
Splitting each of ecma_op_get_value and ecma_op_put_value to two routines:
- for lexical environment or undefined bases (lex_env_base suffix);
- for object bases (object_base suffix).
2014-11-13 15:45:47 +03:00
Ruben Ayrapetyan
11f0cf9a2d
Performing do_strict_eval_or_arguments_check check only under !JERRY_NDEBUG.
2014-11-13 14:28:45 +03:00
Ruben Ayrapetyan
83c8007437
Compacting ecma_reference_t.
2014-11-12 21:35:21 +03:00
Ilmir Usmanov
8c7dc08d93
Add literals - replacements of strings and numbers in parser.
2014-10-31 21:22:52 +04:00
Ruben Ayrapetyan
bb6583faa7
Fixing do_strict_eval_arguments_check helper.
2014-10-30 17:25:30 +03:00
Ruben Ayrapetyan
4160262ce8
Implementing EvalError, RangeError, SyntaxError, URIError built-ins and corresponding prototype built-in objects.
2014-10-30 14:28:44 +03:00
Ruben Ayrapetyan
fc751b0f15
Arranging JERRY_UNIMPLEMENTED macro usages and adding comments to each invocation of the macro.
2014-10-27 19:48:03 +03:00
Ilmir Usmanov
a55517f57a
Remove 'logical_or' and 'logical_and' opcodes
2014-10-27 14:55:02 +04:00
Ruben Ayrapetyan
feedb37b20
Replacing way to specify ecma-char encoding and ecma-number type: instead of defining it like CONFIG_ECMA_NUMBER_FLOAT32 now it should be defined like CONFIG_ECMA_NUMBER_TYPE=CONFIG_ECMA_NUMBER_FLOAT32.
2014-10-23 18:33:10 +04:00
Ilmir Usmanov
ec6572d501
Add support of function expressions scopes. Uncomment tests.
2014-10-21 22:22:04 +04:00
Ruben Ayrapetyan
3eed2d0d4c
Renaming ecma_op_number_{add,subtract,multiply,divide} -> ecma_number_{add,subtract,multiply,divide}.
...
Moving ecma_number_{add,subtract,multiply,divide} to src/libecmaobjects/ecma-helpers-number.c.
Moving abs, sqrt, ln, exp, calculation helpers from src/libecmabuiltins/ecma-builtin-math-object.c to src/libecmaobjects/ecma-helpers-number.c.
2014-10-20 18:48:10 +04:00
Ruben Ayrapetyan
2d5a5c37b0
Fixing number bitwise operations.
2014-10-20 13:47:21 +04:00
Ruben Ayrapetyan
a66c175d98
Fixing 'delete_var' opcode handler.
2014-10-15 20:39:56 +04:00
Ruben Ayrapetyan
aaadfec530
Fixing assertion checks in 'try' opcode handler.
2014-10-15 19:40:46 +04:00
Ruben Ayrapetyan
5d874596ec
Fixing 'instanceof' opcode handler.
2014-10-15 18:46:40 +04:00
Ruben Ayrapetyan
11252394a5
Fixing 'delete_prop' opcode handler.
2014-10-15 18:11:45 +04:00
Ruben Ayrapetyan
0c9f03c313
Fixing opfunc_delete_var.
2014-10-15 18:02:29 +04:00
Ruben Ayrapetyan
e8d728f8ce
Fixing typeof for boolean arguments.
2014-10-15 18:02:10 +04:00
Ruben Ayrapetyan
41b7ca2faa
Fixing 'in' opcode handler.
2014-10-15 17:41:48 +04:00
Ruben Ayrapetyan
47ed774232
Fixing obj_decl opcode handler to handle property name argument as index of register variable containing a declared property's name.
2014-10-15 17:33:58 +04:00
Ruben Ayrapetyan
7dcbeec487
Fixing typeof with null argument.
2014-10-15 16:11:04 +04:00
Ilmir Usmanov
a9856dcf9a
Add support of NaN in opfunc_unary_minus
2014-10-15 15:33:00 +04:00
Ilmir Usmanov
032031a861
Add unary_plus and unary_minus opcodes
2014-10-15 15:20:49 +04:00