Commit Graph

703 Commits

Author SHA1 Message Date
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 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 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
Ruben Ayrapetyan 804af937d8 Fixing !MEM_STATS build. 2014-11-12 15:41:13 +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 bd60d1874b Implementing resize of heap blocks.
- adding mem_heap_try_resize_block routine that tries to resize
   block using free space that is located right after the resized block;
 - placing long-term blocks from start of heap space and short-term - from end
   of the space to increase probability of success of resizing just allocated
   long-term block;
 - adding mem_heap_try_resize_block invocation to 'test_heap' unit test.
2014-11-11 15:44:31 +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
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 5c4d2085a1 Fixing build without CONFIG_ECMA_COMPACT_PROFILE. 2014-10-31 16:02:30 +03:00
Ruben Ayrapetyan b4bd0bfb4c Correctly setting [[Extensible]] property of built-in objects. 2014-10-30 19:39:54 +03:00
Ilmir Usmanov d8acb0b6e2 'undefined' is not literal, so dump it as identifier. 2014-10-30 19:48:06 +04:00
Ruben Ayrapetyan bb6583faa7 Fixing do_strict_eval_arguments_check helper. 2014-10-30 17:25:30 +03:00
Ruben Ayrapetyan ac710dd0b5 Implementing [[ThrowTypeError]] built-in Function object. 2014-10-30 17:22:33 +03:00
Ruben Ayrapetyan 4625d5b90a Changing value of CompactProfileError built-in's 'length' property to 0. 2014-10-30 17:22:33 +03:00
Ilmir Usmanov d5878132cc Dump 'use strict' prior to reg_var_decl. 2014-10-30 18:17:41 +04: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 66cb7e316d Implementing ReferenceError and ReferenceError.prototype built-ins. 2014-10-29 21:28:56 +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 4e6f5c7716 Implementing Error and Error.prototype built-in objects. 2014-10-29 18:49:31 +03:00
Ruben Ayrapetyan ed08fe9983 Full names of magic string identifiers in src/libecmaobjects/ecma-magic-strings.inc.h 2014-10-29 17:23:43 +03:00
Ruben Ayrapetyan a74c77a1d5 Arrangement of built-in objects implementation (description of built-ins with *.inc.h headers, reducing code duplication). 2014-10-29 15:46:31 +03:00
Ruben Ayrapetyan 6078a4c854 Describing Boolean.prototype with src/libecmabuiltins/ecma-builtin-boolean-prototype.inc.h header. 2014-10-28 20:38:26 +03:00
Ruben Ayrapetyan f9e809e2e8 Removing ecma_builtin_*_get_routine_parameters_number routines. 2014-10-28 20:12:03 +03:00
Ruben Ayrapetyan 87310e43c6 On-demand built-ins instantiation. 2014-10-28 17:52:07 +03:00
Ruben Ayrapetyan e35ec87209 Making built-ins' property numbers to be stored as static const instead of extern const. 2014-10-28 17:32:31 +03:00
Ruben Ayrapetyan 26012e098f Moving magic strings definitions to ecma-magic-strings.inc.h. 2014-10-28 16:30:42 +03:00
Ruben Ayrapetyan 459750b1d0 Implementing routine for copying ecma-string and using it to duplicate ecma-string upon it's reference counter overflow. 2014-10-28 14:52:40 +03:00
Ilmir Usmanov 4735570b31 Add SyntaxErrors on parsing ObjectDeclarations. 2014-10-28 13:39:25 +04: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 69624e4de2 Fixing search of shortest representation in ecma_number_to_zt_string.
Fixing right shift operation for big integers.
2014-10-27 15:34:33 +03:00
Ilmir Usmanov 7d13970e95 Fix compiling several input files 2014-10-27 15:27:25 +04:00
Ilmir Usmanov a55517f57a Remove 'logical_or' and 'logical_and' opcodes 2014-10-27 14:55:02 +04:00
Ruben Ayrapetyan f0ab69b01a Replacing 96-bit integer with 128-bit integer in ecma_number_to_zt_string and ecma_zt_string_to_number conversion routines. 2014-10-24 23:06:25 +04:00
Ruben Ayrapetyan b773ef074c Fixing exception handling in ecma_op_to_number. 2014-10-24 21:58:53 +04:00
Ruben Ayrapetyan e11f73df64 Improving precision in ecma_number_to_zt_string. 2014-10-24 20:39:59 +04:00
Ruben Ayrapetyan 82e8895b4c Fixing ToInt32 conversion routine. 2014-10-24 20:39:59 +04:00
Ruben Ayrapetyan 904be9ece6 Fixing ecma_zt_string_to_number for '-0' string. 2014-10-24 20:39:59 +04:00
Ruben Ayrapetyan e4629cca51 Improving precision of number to zt-string conversion, adding search for the shortest representation of number during the conversion. 2014-10-24 19:15:31 +04:00
Ruben Ayrapetyan 2f16000949 Accessing ecma-number components with new ecma_number_pack / ecma_number_unpack helpers instead of ecma_number_fields_t structure that used GCC extension in CONFIG_ECMA_NUMBER_FLOAT64 mode. 2014-10-23 18:41:49 +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