Ruben Ayrapetyan
88353e93cf
Renaming core -> jerry-core.
2015-02-17 19:08:55 +03:00
Ruben Ayrapetyan
b6d018d019
Enable cppcheck run during precommit testing
2015-02-17 18:43:54 +03:00
Ruben Ayrapetyan
a4155f7be8
Fixing cppcheck warnings.
2015-02-17 18:43:48 +03:00
Ruben Ayrapetyan
92a9d6db45
Moving precommit testing scripts from Makefile[.mk] to tools/runners/run-precommit-check-for-target.sh and tools/precommit.sh; deleting Makefile.mk.
2015-02-17 15:28:13 +03:00
Ruben Ayrapetyan
51088ff2cb
Enable LTO for unit tests.
2015-02-16 19:35:15 +03:00
Ruben Ayrapetyan
03c81e96e9
Turning on unit tests build and run during precommit.
2015-02-16 19:35:15 +03:00
Ruben Ayrapetyan
86a5cc63c6
Turn off print of script source in release build (in --show-opcodes mode).
2015-02-16 14:55:04 +03:00
Ruben Ayrapetyan
2667281745
Adding VALGRIND={ON,OFF} make option.
2015-02-16 14:02:32 +03:00
Ruben Ayrapetyan
8dc4950590
Renaming src directory to core; moving main modules to top-level directory.
2015-02-13 22:19:05 +03:00
Ruben Ayrapetyan
b3cfd40478
Fix parse of "-v" option.
2015-02-13 22:12:07 +03:00
Ruben Ayrapetyan
32dc41e795
Remove stripping of debug binaries.
2015-02-13 22:11:38 +03:00
Ruben Ayrapetyan
43ea53b1d7
Jerry is now split to several components: core, libc, plugins.
...
The components are build independently and then are linked with main module corresponding to target platform.
Core is supposed to be platform-independent, while libc and plugins are dependent on specific architecture / platform.
The commit disables unit tests building and running during precommit.
That is supposed to be fixed in a subsequent commit.
Also, the commit disables building and running valgrind targets during precommit.
Build is supposed to be turned on by an option that should be introduced later.
Valgrind-checked runs are supposed to be performed in asynchronous mode.
2015-02-13 21:54:27 +03:00
Ruben Ayrapetyan
62a3ac93d9
Fix invocation of memcpy in add_current_token_to_string_cache (NULL pointer shouldn't be passed to memcpy).
2015-02-13 16:38:59 +03:00
Ruben Ayrapetyan
3755db04d2
Remove references to __TARGET_* defines from Jerry core.
2015-02-12 20:16:35 +03:00
Ruben Ayrapetyan
7e4c16e4e6
Rename Jerry's libc functions: __function_name -> function_name.
2015-02-12 20:15:56 +03:00
Ruben Ayrapetyan
af77eac8e4
Move Jerry's libc to jerry-libc directory.
2015-02-11 21:33:45 +03:00
Ruben Ayrapetyan
6dfade808f
Fix search of libc and libgcc in CMakeLists.txt
2015-02-11 21:27:03 +03:00
Ruben Ayrapetyan
17f51e0ba6
Refinement of completion status codes and fatal error handlers.
2015-02-11 20:53:14 +03:00
Ruben Ayrapetyan
398501afeb
Remove CONFIG_ECMA_EXCEPTION_SUPPORT configuration flag.
2015-02-11 18:57:03 +03:00
Ruben Ayrapetyan
35fa39ceb8
Initial version of Embedded API.
2015-02-11 17:47:58 +03:00
Ruben Ayrapetyan
ccc0453f34
Splitting main.cpp into jerry.cpp, main_linux.cpp and main_mcu.cpp; leaving __TARGET* defines usage only in jrt and plugins.
2015-02-11 14:10:14 +03:00
Ruben Ayrapetyan
f3ff78b81b
Refinement of tools directory.
2015-02-10 20:21:01 +03:00
Ruben Ayrapetyan
d2459398f5
Refinement of build output structure.
2015-02-10 19:34:30 +03:00
Ruben Ayrapetyan
718bbe26f9
Refinement of project structure.
...
- components renaming and moving:
- liballocator -> mem;
- libcoreint -> vm;
- libecmaobjects -> ecma/base;
- libecmaoperations -> ecma/operations;
- libecmabuiltins -> ecma/builtins;
- libjsparser -> parser/js;
- libintstructs -> parser/collections;
- liboptimizer -> parser/js;
- libperipherals -> ../plugins/lib_device_stm;
- libruntime -> jrt;
- generated.h now is created as intermediate during build;
- benchmarks -> tests/benchmarks;
- docs -> documentation;
- demo-applications removed (loop_demo.js -> tests/blinky.js).
2015-02-10 19:00:32 +03:00
Ruben Ayrapetyan
b7e374fedc
Switching to CMake for build.
2015-02-09 20:56:01 +03:00
Ruben Ayrapetyan
fa6402334f
Renaming sources *.c -> *.cpp.
2015-02-09 18:21:44 +03:00
Ruben Ayrapetyan
ba348831ca
Reverting changes related to on-stack GC-root introduction (except of passing ecma_value_t by const reference).
...
This reverts commits:
31e1405f39d72f8b885e92256b0dc29ecab1a99,
7cb43840b59c539d9b043990ed658ae15a9defc3,
1ab57a4493689806035a9853b0030cc6fea65590,
c24b511ca60587e0db12d46a7e7567c86c3649bc,
b2caf3e8b31b4b6b16499108ee3aabdcb94f0717,
44f9c307fb6204bfd2181b19a9d94cabddf04de9.
2015-02-09 17:43:29 +03:00
Ruben Ayrapetyan
35aa8238c2
Updating 'may reference younger object' in ecma_create_ for outer lexical environment / prototype objects; setting provideThis to false for declarative lexical environments.
...
Although provideThis is not used for declarative lexical environments, setting it to false to prevent valgrind's false positive about uninitialized flag value.
2015-02-09 17:41:25 +03:00
Ruben Ayrapetyan
5a2d6f4308
Replacing JERRY_NVALGRIND with the opposite JERRY_VALGRIND.
2015-02-05 17:58:55 +03:00
Ruben Ayrapetyan
fb6e205d0d
Moving to replacement of on-stack ecma_object_t* with managed ecma_object_ptr_t.
2015-02-04 18:14:04 +03:00
Ruben Ayrapetyan
e3f081ee84
Forbidding implicit template instantiation.
2015-02-04 17:33:24 +03:00
Ruben Ayrapetyan
d627307010
Adding valgrind memory annotations for pool allocator.
2015-02-04 17:32:39 +03:00
Ruben Ayrapetyan
be4567860c
Turning on Wmissing-declaration warnings.
2015-02-04 15:31:43 +03:00
Ruben Ayrapetyan
34bff56d8a
Removing pre-initialization of object container with zero.
2015-02-04 15:13:22 +03:00
Ruben Ayrapetyan
c12659ba51
Introducing managed pointer class ecma_pointer_t, using it to store pointer in ecma_value_t.
2015-02-03 18:25:38 +03:00
Ruben Ayrapetyan
9cdc50c3ec
Disabling Wattributes warnings (because always_inline is considered incorrect without inline specifier even in LTO mode); removing used attribute from always_inline functions; removing inline specifier from ecma_lcache_lookup and ecma_stack_top_value.
2015-02-03 18:05:17 +03:00
Ruben Ayrapetyan
3cb0b0a379
Revert "Introducing managed pointers classes (ecma_generic_ptr_t, ecma_pointer_t<T>); using ecma_generic_ptr_t to store pointer in ecma_value_t."
...
This reverts commit f88c0d665b4ff7e2add495bc2980adf7a1622f31.
2015-02-03 16:50:21 +03:00
Ruben Ayrapetyan
b0e4d2ece1
Introducing managed pointers classes (ecma_generic_ptr_t, ecma_pointer_t<T>); using ecma_generic_ptr_t to store pointer in ecma_value_t.
2015-02-03 15:11:44 +03:00
Ruben Ayrapetyan
55caaf7a88
Storing values in ecma_value_t in unpacked form (type + simple value / pointer to the heap).
2015-02-03 14:52:37 +03:00
Ruben Ayrapetyan
f37a5085f6
Converting ecma_completion_value_t to class derived from ecma_value_t with additional field with for completion type and related operations.
...
Completion value are now returned through ecma_completion_value_t &ret_value argument.
2015-01-30 23:16:45 +03:00
Ruben Ayrapetyan
a1f95048ae
Removing label completion values.
2015-01-30 23:00:42 +03:00
Ruben Ayrapetyan
00afd4e0e2
Converting ecma_value_t to class that is used for on-stack storage of ecma-values.
...
Original ecma_value_t is renamed to ecma_value_packed_t and is used for on-heap storage.
Copy and move constructors, move assignment operator of ecma_value_t are not created.
New ecma-value return convention is introduced: ecma-values are now returned through ecma_value_t &ret_val argument.
2015-01-30 22:53:06 +03:00
Ruben Ayrapetyan
4cd7f96acc
Suppressing 'member variable is not assigned in operator =' cppcheck warning, because of false positives.
2015-01-29 14:40:31 +03:00
Ruben Ayrapetyan
94cb1c0e67
Changing jerry_ref_unused_variables signature to take values by const reference.
2015-01-28 19:58:20 +03:00
Ruben Ayrapetyan
8b31156b5a
Forbidding use of rbp for register allocation on x86-64 platform.
...
It is necessary because of bug in gcc / g++:
Pointers allocated on rbp can be (are?) supposed to be aligned indepedently of what they actually contain.
Turning off allocation on rbp is not critical for now, because, currently, x86-64 is just development platform.
2015-01-28 17:43:04 +03:00
Ruben Ayrapetyan
0f487a0bb7
Returning ecma_value_t instead of ecma_completion_value_t from ECMA_TRY_CATCH for case when completion value is normal.
2015-01-27 22:07:26 +03:00
Ruben Ayrapetyan
f231b9a0d2
Moving ecma_reference_t declaration to ecma-reference.h.
2015-01-27 17:18:53 +03:00
Ruben Ayrapetyan
d1925ab882
Using static_cast instead of C-style cast in MEM_DEFINE_LOCAL_ARRAY.
2015-01-27 15:40:46 +03:00
Ruben Ayrapetyan
57f645c18c
Passing ecma_value_t arguments by const reference instead of by value.
2015-01-23 20:22:21 +03:00
Ruben Ayrapetyan
11e37ad7f3
Switching cppcheck to c++11-compatible mode.
2015-01-22 18:07:56 +03:00
Ruben Ayrapetyan
005b5370fc
Switching to g++ and corresponding changes according to C++ requirements.
2015-01-16 17:27:02 +03:00
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
e70626f92d
Removing free of throw completion value in ECMA_TRY_CATCH macro, instead just copying it to the return value variable.
2015-01-14 18:14:28 +03:00
Ruben Ayrapetyan
917ebe4a83
Creating ecma-stack frames in run_int_from_pos.
2015-01-12 20:52:04 +03:00
Ruben Ayrapetyan
b843167b91
Introducing ecma-stack structures and routines.
2015-01-12 19:33:04 +03:00
Ruben Ayrapetyan
d03b2dafba
Upon receiving 'give some memory back' request check if any corresponding callback set instead of asserting that.
2015-01-12 19:07:35 +03:00
Ruben Ayrapetyan
f96770a811
Adding '-min' option to tools/perf.sh: the option switches to output of minimum instead of average of performance measurements.
2014-12-19 21:37:26 +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
8febd2bae8
Increasing heap size from 8K to 16K for MCU targets.
2014-12-18 17:17:08 +03:00
Ruben Ayrapetyan
5539afc60e
Adding #pragma GCC optimize "O0" to libperipherals' modules.
2014-12-18 17:16:33 +03:00
Ruben Ayrapetyan
5c4c47514a
Fixing new line marks output in tools/generator.sh.
2014-12-18 16:14:31 +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
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
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