Commit Graph

197 Commits

Author SHA1 Message Date
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
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 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
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
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 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
Ruben Ayrapetyan 7f4a70ccb5 Improving precision of zt-string to ecma-number conversion. 2014-10-23 15:46:42 +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 42abd7d63a Moving ecma-number mathematical constants to src/libecmaobjects/ecma-globals.h. 2014-10-20 20:48:36 +04:00
Ruben Ayrapetyan 491893efb9 Fixing ecma_number_substract. 2014-10-20 20:44:58 +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 512d816568 Fixing Number.MIN_VALUE and Number.MAX_VALUE values for CONFIG_ECMA_NUMBER_FLOAT64 mode. 2014-10-20 17:31:41 +04:00
Ruben Ayrapetyan 9e890827f7 Fixing build in CONFIG_ECMA_NUMBER_FLOAT64 mode. 2014-10-20 13:46:41 +04:00
Ruben Ayrapetyan 6ebd96f903 Improving precision of string to number conversion in ecma_zt_string_to_number. 2014-10-20 13:46:13 +04:00
Ruben Ayrapetyan dce3e5db59 Removing assertions about fitting of uint32_t and int32_t to ecma_number_t as they are incorrect under CONFIG_ECMA_NUMBER_FLOAT32. 2014-10-16 20:24:05 +04:00
Ruben Ayrapetyan ed960b78db Introducing CompactProfileError built-in object. 2014-10-16 19:49:47 +04:00
Ruben Ayrapetyan c231893b28 Implementation of Number built-in object and partial implementation of Number.prototype built-in object.
Fixing [[Prototype]] and [[Class]] properties of Array and String built-in objects.
2014-10-16 13:25:47 +04:00
Ruben Ayrapetyan e8d728f8ce Fixing typeof for boolean arguments. 2014-10-15 18:02:10 +04:00
Ruben Ayrapetyan e9a632ea4e Fixing sign of converted number in ecma_zt_string_to_number. 2014-10-14 19:11:11 +04:00
Ruben Ayrapetyan c4ba033970 Renaming ERR_MEMORY -> ERR_OUT_OF_MEMORY. 2014-10-14 14:08:38 +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 9a15286aad Fixing ecma_gc_is_object_may_ref_younger_objects. 2014-10-13 18:35:27 +04:00
Ruben Ayrapetyan bef5289cb6 Adding stubs for Function and Function.prototype built-ins. 2014-09-26 19:26:17 +04:00