Commit Graph

227 Commits

Author SHA1 Message Date
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 b843167b91 Introducing ecma-stack structures and routines. 2015-01-12 19:33: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 14620e30a6 Defining constant limit on magic string length instead of runtime calculation of maximum among magic strings' lengths. 2014-12-17 22:14:04 +03:00
Ruben Ayrapetyan c9b73da82d Changing dynamic sized (syntactically) array to constant-sized array in ecma_gc_run. 2014-12-17 21:29:45 +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 5bb90fb8ca Initializing object / lexical environment descriptors with zeroes before field initialization. 2014-12-05 13:24:39 +03:00
Ruben Ayrapetyan ee7ac6602b Fixing insertion to lookup cache: removing possibility of invalidation of entry during it's initialization, skipping empty entries during search for entry containing specified property. 2014-12-04 17:03:14 +03:00
Ruben Ayrapetyan 2b9b729c37 Invoking jerry_exit (ERR_OUT_OF_MEMORY) instead of JERRY_UNREACHABLE in in ecma_alloc_*. 2014-12-04 15:10:39 +03:00
Ruben Ayrapetyan 3b1c6b5c37 Fixing an issue in garbage collection module: correctly updating 'may reference younger objects' flag. 2014-12-04 12:38:06 +03:00
Ruben Ayrapetyan 98a11c13d5 Padding ecma_lcache_entry_t to 8 bytes size. 2014-12-03 19:25:01 +03:00
Ruben Ayrapetyan e955d8f742 Assigning numbers to named data properties' values without reallocating pool chunk if the value already contains a number. 2014-12-03 16:03:13 +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 3b29280b79 Using hash value stored in ecma-string for lcache search; comparing string faster but with possible false negatives while performing lcache lookup. 2014-11-28 21:27:48 +03:00
Ruben Ayrapetyan fe7e34d93e Adding ecma-string's hash to ecma_string_t. 2014-11-28 21:12:44 +03:00
Ruben Ayrapetyan 6c65c48772 Removing 'length' field from ecma-string descriptor (calculating length upon request). 2014-11-28 16:26:22 +03:00
Ruben Ayrapetyan 7b75dcf0c9 Removing assertion checks with possible side effects. 2014-11-27 21:04:14 +03:00
Ruben Ayrapetyan f6e7621d3f Adding __always_inline attribute to some value handling helpers. 2014-11-27 19:40: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 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 d7764dfc6e Implementation of ecma_make_simple_value and ecma_make_completion_value through bitwise operations (instead of through bit-fields). 2014-11-20 15:34:46 +03:00
Ruben Ayrapetyan 76aab95aac Implementation of ecma_is_value_* for simple values through comparison with integer constants (instead of bit-fields). 2014-11-20 15:33:27 +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 30ff59fca3 Reverting c2933d9e44eb5346161964c7c52f1ca793c4c7b4 changes of ecma_number_{is,make}_infinity routines. 2014-11-19 17:55:15 +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 fb6bdd151a Moving part of ecma_compare_ecma_strings to ecma_compare_ecma_strings_longpath. 2014-11-18 17:28:03 +03:00
Ruben Ayrapetyan e7f96336f8 Fixing ecma_lcache_init. 2014-11-17 21:26:36 +03:00
Ruben Ayrapetyan fd155d4699 Fixing calculation of ecma-string's hash in ecma_string_try_hash. 2014-11-17 20:19:38 +03:00
Ruben Ayrapetyan 76ed780895 Introducing cache for property by name lookup (LCache). 2014-11-17 18:52:48 +03:00
Ruben Ayrapetyan 8a6eae0ca5 Reordering comparisons in ecma_compare_ecma_strings to improve performance for frequent cases. 2014-11-17 18:52:38 +03:00
Ruben Ayrapetyan 34430f0831 Passing object to named property free routines.
Adding argument, pointing to object that contains the property to be freed, to ecma_free_property, ecma_free_named_data_property and ecma_free_named_accessor_property.
Also, adding static qualifier to ecma_free_named_data_property, ecma_free_named_accessor_property and ecma_free_internal_property.
2014-11-17 17:06:06 +03:00
Ruben Ayrapetyan dd1e9ca3e4 Improving performance of ecma_is_string_magic. 2014-11-14 14:40:30 +03:00
Ruben Ayrapetyan 2e94dc1341 Fixing an issue introduced in commit 4b3385fb920a60c9d7db66f9798355430ca4036a (restoring a check for NULL pointer). 2014-11-13 20:57:11 +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 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 afe242e7a3 Adding __attribute_pure__ and __attribute_const__ to some routines that operate on bit-fields. 2014-11-11 19:25:49 +03:00
Ruben Ayrapetyan 8a5b1148bc Storing magic string identifier in ecma-string descriptor instead of copying magic string's characters to the descriptor or to the heap. 2014-10-31 21:16:21 +03:00
Ruben Ayrapetyan 843305fb48 Fixing some assertions in src/libecmaobjects/ecma-helpers-string.c. 2014-10-31 20:51:02 +03:00
Ruben Ayrapetyan c0a6ae3eff - Smaller but not precise conversion between strings and numbers under
CONFIG_ECMA_NUMBER_TYPE==CONFIG_ECMA_NUMBER_FLOAT32 (float32 mode);
- float64 mode by default if not CompactProfile-mode;
- CompactProfile-mode for MCU builds.
2014-10-31 20:44:27 +03:00
Ilmir Usmanov 8c7dc08d93 Add literals - replacements of strings and numbers in parser. 2014-10-31 21:22:52 +04:00