Commit Graph

1000 Commits

Author SHA1 Message Date
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 1e0eea3d73 Returning NULL from mem_heap_alloc_block if requested block size is zero. 2014-12-18 13:26:42 +03:00
Ruben Ayrapetyan 9b1fff1d8b Introducing MEM_DEFINE_LOCAL_ARRAY and MEM_FINALIZE_LOCAL_ARRAY to replace on-stack allocation of dynamic sized arrays. 2014-12-17 22:18:32 +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 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
Ruben Ayrapetyan 001f262590 Limiting maximum command line arguments by CONFIG_JERRY_MAX_COMMAND_LINE_ARGS configuration option. 2014-12-17 21:29:17 +03:00
Ruben Ayrapetyan dd3271e35d Changing uint8_t* to void* in arguments and return values of mem_heap_alloc_block, mem_heap_free_block and mem_heap_try_resize_block operations. 2014-12-17 21:27:02 +03:00
Ruben Ayrapetyan 8349ad8ecf Inter-commit performance comparison script. 2014-12-17 19:16:16 +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 7e7bdc2aac Rework literal indexes hash table to simple array in order to improve performance 2014-12-15 22:56:22 +03:00
Ilmir Usmanov 864bd3de06 Fix comment. 2014-12-15 22:47:41 +03:00
Ilmir Usmanov ddac13f944 Fix parsing of empty file 2014-12-15 17:10:04 +03:00
Ilmir Usmanov c1ebb8db50 Fix expression statement parsing in case of statement starts with keyword 2014-12-12 16:36:18 +03:00
Ilmir Usmanov 6aee69d6df Fix native_call opcode dumping 2014-12-12 16:34:59 +03:00
Ilmir Usmanov 4b7871bdde Fix 'op=' assignment bytecode dumping in case of arrays 2014-12-10 19:20:33 +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
Ilmir Usmanov fc9e83d290 Remove obsolete unit tests. 2014-12-10 18:29:43 +03:00
Ilmir Usmanov a251bf5d6f Add array list structure.
Change hash table to use array lists instead of linked lists.
2014-12-10 18:27:36 +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 1182f7bbfe Removing JERRY_UNREACHABLE from lexical environment related routines. 2014-12-05 13:25:41 +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 f7f0681698 Invoking tools/perf.sh in tools/run_benchmarks.sh. 2014-12-04 12:52:55 +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 d2f6b36cf7 Implementing Math.sin and Math.cos built-in routines. 2014-12-04 11:39:23 +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 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 668eef73c8 Implementing system call sequences in plain assembler routines; removing -fomit-frame-pointer for non-optimized builds. 2014-12-02 15:42:09 +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 22e1941050 Moving pools that received request on allocation / free to beginning of pools' list; extracting long path from mem_pools_alloc. 2014-11-26 20:22:44 +03:00
Ruben Ayrapetyan c21e186f2c Static definition of pool's area size and number of chunks in a pool; alignment of mem_block_header_t and mem_pool_state_t to MEM_ALIGNMENT. 2014-11-26 19:23:26 +03:00
Ruben Ayrapetyan 9a0081b856 Splitting free block from end if block search direction is backward (currently, for short-term blocks). 2014-11-24 18:52:47 +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