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
005fcb008e
Changing dynamic sized (syntactically) array to constant-sized array in ecma_op_general_object_default_value.
2014-12-17 22:14:33 +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
1182f7bbfe
Removing JERRY_UNREACHABLE from lexical environment related routines.
2014-12-05 13:25:41 +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
b7daa16b99
Implementing number comparisons through simple comparison operators, checking under !JERRY_NDEBUG that behaviour is equivalent to ECMA-defined comparisons.
2014-12-03 20:22:29 +03:00
Ruben Ayrapetyan
8998860c7b
Extract non-inlineable long path from ecma_op_object_get_own_property.
2014-12-03 19:25:16 +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
ef012d9cd4
Adding lcache lookup and insert to ecma_find_named_property; removing lcache insert from ecma_op_object_get_own_property.
2014-11-28 21:27:52 +03:00
Ruben Ayrapetyan
7b75dcf0c9
Removing assertion checks with possible side effects.
2014-11-27 21:04:14 +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
5b8077b976
Storing provideThis flag and pointer to binding object immediately in descriptor of object-bound lexical environment.
2014-11-21 20:37:04 +03:00
Ruben Ayrapetyan
958126f5c8
Adding debug assertion about incoming state of formal parameters collection to ecma_create_arguments_object.
2014-11-21 17:08:40 +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
f5ffae0fec
Removing runtime checks for reading / writing 'arguments' variable in CompactProfile mode (the checks should be performed during parsing).
2014-11-20 18:24:31 +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
76ed780895
Introducing cache for property by name lookup (LCache).
2014-11-17 18:52:48 +03:00
Ruben Ayrapetyan
857e66fb98
Revert "Calling routine for instantiating built-ins' properties only if property name is a magic string."
...
Reverting commit 1dd7d626967110c3a0f14c40479bc054baf04b3f because of performance degradation on ARM Linux.
The degradation requires further investigation.
2014-11-14 18:04:45 +03:00
Ruben Ayrapetyan
82fe067fc9
Calling routine for instantiating built-ins' properties only if property name is a magic string.
2014-11-14 14:40:36 +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
83c8007437
Compacting ecma_reference_t.
2014-11-12 21:35:21 +03:00
Ruben Ayrapetyan
d93a4ec36c
Replacing switches with pointer tables in some ecma_op_object_* routines.
2014-11-12 15:17:20 +03:00
Ruben Ayrapetyan
05cf2dbe04
Providing cp_minimal build mode.
...
In the mode built-in objects except Global, Object, Object.prototype, Function,
Function.prototype, [[ThrowTypeError]] and CompactProfileError are disabled.
Making default builds (without cp cp_minimal modes set) to not define CONFIG_ECMA_COMPACT_PROFILE.
Removing some tests that depend on 'eval'-like functionality or CompactProfileError built-in from pre-commit testing.
2014-10-31 18:37:55 +03:00
Ruben Ayrapetyan
73084cb976
Fixing GetBindingValue operation for immutable bindings.
2014-10-31 16:03:32 +03:00
Ruben Ayrapetyan
ac710dd0b5
Implementing [[ThrowTypeError]] built-in Function object.
2014-10-30 17:22:33 +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
6991b26e04
Implementing TypeError and TypeError.prototype built-ins. Fixing Error.prototype.toString implementation.
2014-10-29 21:15:36 +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
Ruben Ayrapetyan
b773ef074c
Fixing exception handling in ecma_op_to_number.
2014-10-24 21:58:53 +04:00
Ruben Ayrapetyan
2d032a30dc
Extracting ecma_number_trunc helper from ecma_op_number_remainder.
2014-10-20 20:48:36 +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
8f5160d6bf
Implementing ToObject for number arguments.
2014-10-20 15:39:09 +04:00
Ruben Ayrapetyan
1b74687989
Implementing ToObject for boolean arguments.
2014-10-20 15:26:24 +04:00
Ruben Ayrapetyan
e54023caf2
Throwing CompactProfileError in cases required by Compact Profile.
2014-10-16 21:26:23 +04:00
Ruben Ayrapetyan
c7eec63e28
Fixing array instance construction routine: setting prototype to Array.prototype built-in object.
2014-10-15 19:31:30 +04:00
Ruben Ayrapetyan
9b178f5ab0
Implementing 'length' property of String instances.
2014-10-15 19:02:41 +04:00
Ruben Ayrapetyan
b3f45c5c82
Fixing ecma_op_abstract_equality_compare.
2014-10-15 16:56:58 +04:00
Ruben Ayrapetyan
e5b0bb1a0d
Fixing ecma_op_abstract_equality_compare.
2014-10-15 16:56:58 +04:00
Ruben Ayrapetyan
efe713f2a9
Fixing memory leak in ecma_op_function_construct.
2014-10-15 16:11:04 +04:00
Ruben Ayrapetyan
2a8adf7698
Fixing memory leak in ecma_op_string_object_get_own_property.
2014-10-15 16:11:04 +04:00
Ruben Ayrapetyan
6430a104b3
ecma_ref_ecma_string -> ecma_copy_or_ref_ecma_string: copying ecma-string when the string's reference counter reaches maximum value.
2014-10-13 18:59:07 +04:00
Ruben Ayrapetyan
7819adcf99
Implementing ToObject routine for case argument is string literal.
2014-10-13 13:29:29 +04:00