From 718bbe26f92df7fb18359628f4c513628390396a Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Tue, 10 Feb 2015 14:45:40 +0300 Subject: [PATCH] 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). --- CMakeLists.txt | 296 +- Makefile | 2 +- benchmarks/jerry/empty_loop.js | 19 - demo-applications/loop_demo.js | 144 - docs/compact_profile.txt | 16 - .../lib-device-stm}/actuators.cpp | 0 .../lib-device-stm}/actuators.h | 4 +- .../lib-device-stm}/common-io.cpp | 0 .../lib-device-stm}/common-io.h | 4 +- .../lib-device-stm}/mcu-headers.h | 0 .../lib-device-stm}/sensors.cpp | 0 .../lib-device-stm}/sensors.h | 4 +- .../base}/ecma-alloc.cpp | 2 +- .../base}/ecma-alloc.h | 0 src/{libecmaobjects => ecma/base}/ecma-gc.cpp | 2 +- src/{libecmaobjects => ecma/base}/ecma-gc.h | 0 .../base}/ecma-globals.h | 2 +- .../base}/ecma-helpers-conversion.cpp | 0 .../base}/ecma-helpers-number.cpp | 0 .../base}/ecma-helpers-string.cpp | 4 +- .../base}/ecma-helpers-value.cpp | 2 +- .../base}/ecma-helpers-values-collection.cpp | 2 +- .../base}/ecma-helpers.cpp | 0 .../base}/ecma-helpers.h | 0 .../base}/ecma-lcache.cpp | 0 .../base}/ecma-lcache.h | 0 .../base}/ecma-magic-strings.inc.h | 0 .../base}/ecma-stack.cpp | 0 .../base}/ecma-stack.h | 0 .../ecma-builtin-array-prototype.cpp | 2 +- .../ecma-builtin-array-prototype.inc.h | 0 .../builtin-objects}/ecma-builtin-array.cpp | 2 +- .../builtin-objects}/ecma-builtin-array.inc.h | 0 .../ecma-builtin-boolean-prototype.cpp | 2 +- .../ecma-builtin-boolean-prototype.inc.h | 0 .../builtin-objects}/ecma-builtin-boolean.cpp | 2 +- .../ecma-builtin-boolean.inc.h | 0 .../ecma-builtin-compact-profile-error.cpp | 2 +- .../ecma-builtin-compact-profile-error.inc.h | 0 .../ecma-builtin-error-prototype.cpp | 2 +- .../ecma-builtin-error-prototype.inc.h | 0 .../builtin-objects}/ecma-builtin-error.cpp | 2 +- .../builtin-objects}/ecma-builtin-error.inc.h | 0 .../ecma-builtin-evalerror-prototype.cpp | 4 +- .../ecma-builtin-evalerror-prototype.inc.h | 0 .../ecma-builtin-evalerror.cpp | 2 +- .../ecma-builtin-evalerror.inc.h | 0 .../ecma-builtin-function-prototype.cpp | 2 +- .../ecma-builtin-function-prototype.inc.h | 0 .../ecma-builtin-function.cpp | 2 +- .../ecma-builtin-function.inc.h | 0 .../builtin-objects}/ecma-builtin-global.cpp | 2 +- .../ecma-builtin-global.inc.h | 0 ...a-builtin-internal-routines-template.inc.h | 0 .../builtin-objects}/ecma-builtin-math.cpp | 2 +- .../builtin-objects}/ecma-builtin-math.inc.h | 0 .../ecma-builtin-number-prototype.cpp | 2 +- .../ecma-builtin-number-prototype.inc.h | 0 .../builtin-objects}/ecma-builtin-number.cpp | 2 +- .../ecma-builtin-number.inc.h | 0 .../ecma-builtin-object-prototype.cpp | 2 +- .../ecma-builtin-object-prototype.inc.h | 0 .../builtin-objects}/ecma-builtin-object.cpp | 2 +- .../ecma-builtin-object.inc.h | 0 .../ecma-builtin-rangeerror-prototype.cpp | 4 +- .../ecma-builtin-rangeerror-prototype.inc.h | 0 .../ecma-builtin-rangeerror.cpp | 2 +- .../ecma-builtin-rangeerror.inc.h | 0 .../ecma-builtin-referenceerror-prototype.cpp | 4 +- ...cma-builtin-referenceerror-prototype.inc.h | 0 .../ecma-builtin-referenceerror.cpp | 2 +- .../ecma-builtin-referenceerror.inc.h | 0 .../ecma-builtin-string-prototype.cpp | 2 +- .../ecma-builtin-string-prototype.inc.h | 0 .../builtin-objects}/ecma-builtin-string.cpp | 2 +- .../ecma-builtin-string.inc.h | 0 .../ecma-builtin-syntaxerror-prototype.cpp | 4 +- .../ecma-builtin-syntaxerror-prototype.inc.h | 0 .../ecma-builtin-syntaxerror.cpp | 2 +- .../ecma-builtin-syntaxerror.inc.h | 0 .../ecma-builtin-type-error-thrower.cpp | 2 +- .../ecma-builtin-type-error-thrower.inc.h | 0 .../ecma-builtin-typeerror-prototype.cpp | 4 +- .../ecma-builtin-typeerror-prototype.inc.h | 0 .../ecma-builtin-typeerror.cpp | 2 +- .../ecma-builtin-typeerror.inc.h | 0 .../ecma-builtin-urierror-prototype.cpp | 4 +- .../ecma-builtin-urierror-prototype.inc.h | 0 .../ecma-builtin-urierror.cpp | 2 +- .../ecma-builtin-urierror.inc.h | 0 .../builtin-objects}/ecma-builtins-internal.h | 0 .../builtin-objects}/ecma-builtins.cpp | 0 .../builtin-objects}/ecma-builtins.h | 0 .../builtin-objects}/ecma-builtins.inc.h | 0 .../operations}/ecma-array-object.cpp | 0 .../operations}/ecma-array-object.h | 0 .../operations}/ecma-boolean-object.cpp | 0 .../operations}/ecma-boolean-object.h | 0 .../operations}/ecma-comparison.cpp | 2 +- .../operations}/ecma-comparison.h | 0 .../operations}/ecma-conversion.cpp | 0 .../operations}/ecma-conversion.h | 0 .../operations}/ecma-exceptions.cpp | 2 +- .../operations}/ecma-exceptions.h | 2 +- .../operations}/ecma-function-object.cpp | 2 +- .../operations}/ecma-function-object.h | 2 +- .../operations}/ecma-get-put-value.cpp | 0 .../operations}/ecma-init-finalize.cpp | 0 .../operations}/ecma-lex-env.cpp | 2 +- .../operations}/ecma-lex-env.h | 2 +- .../operations}/ecma-number-arithmetic.cpp | 0 .../operations}/ecma-number-arithmetic.h | 0 .../operations}/ecma-number-object.cpp | 0 .../operations}/ecma-number-object.h | 0 .../operations}/ecma-objects-arguments.cpp | 2 +- .../operations}/ecma-objects-arguments.h | 0 .../operations}/ecma-objects-general.cpp | 0 .../operations}/ecma-objects-general.h | 0 .../operations}/ecma-objects.cpp | 0 .../operations}/ecma-objects.h | 0 .../operations}/ecma-operations.h | 4 +- .../operations}/ecma-reference.cpp | 2 +- .../operations}/ecma-reference.h | 2 +- .../operations}/ecma-string-object.cpp | 0 .../operations}/ecma-string-object.h | 0 .../operations}/ecma-try-catch-macro.h | 0 src/generated.h | 2618 ----------------- src/{libruntime => jrt}/jerry-exit.cpp | 4 +- src/{libruntime => jrt}/jerry-libc-printf.cpp | 4 +- src/{libruntime => jrt}/jerry-libc.cpp | 0 src/{libruntime => jrt}/jerry-libc.h | 2 +- src/{libruntime => jrt}/jrt-bit-fields.cpp | 4 +- src/{libruntime => jrt}/jrt-bit-fields.h | 0 src/{globals.h => jrt/jrt.h} | 0 .../target/linux/asm_arm.h | 0 .../target/linux/asm_x64.h | 0 .../target/linux/asm_x86.h | 0 .../target/linux/jerry-asm.S | 0 .../target/linux/jerry-assert.cpp | 4 +- .../target/linux/jerry-libc.cpp | 2 +- src/{libruntime => jrt}/target/stm32f3/abi.S | 0 .../target/stm32f3}/jerry-assert.cpp | 4 +- .../target/stm32f3/jerry-libc.cpp | 0 src/{libruntime => jrt}/target/stm32f4/abi.S | 0 .../target/stm32f4}/jerry-assert.cpp | 4 +- .../target/stm32f4/jerry-libc.cpp | 0 src/main.cpp | 9 +- .../mem-allocator-internal.h | 0 src/{liballocator => mem}/mem-allocator.cpp | 2 +- src/{liballocator => mem}/mem-allocator.h | 4 +- src/{liballocator => mem}/mem-config.h | 0 src/{liballocator => mem}/mem-heap.cpp | 2 +- src/{liballocator => mem}/mem-heap.h | 2 +- src/{liballocator => mem}/mem-pool.cpp | 2 +- src/{liballocator => mem}/mem-pool.h | 0 src/{liballocator => mem}/mem-poolman.cpp | 2 +- src/{liballocator => mem}/mem-poolman.h | 4 +- .../collections}/array-list.cpp | 0 .../collections}/array-list.h | 4 +- .../collections}/hash-table.cpp | 0 .../collections}/hash-table.h | 0 .../collections}/linked-list.cpp | 2 +- .../collections}/linked-list.h | 4 +- .../collections}/lit-id-hash-table.cpp | 0 .../collections}/lit-id-hash-table.h | 4 +- .../collections}/literal.cpp | 0 .../collections}/literal.h | 0 .../collections}/lp-string.cpp | 0 .../collections}/lp-string.h | 0 .../collections}/stack.h | 0 .../collections}/tree.h | 0 docs/links.txt => src/parser/js.new | 0 .../js}/bytecode-data.h | 0 .../js}/deserializer.cpp | 0 .../js}/deserializer.h | 4 +- src/{libjsparser => parser/js}/lexer.cpp | 0 src/{libjsparser => parser/js}/lexer.h | 4 +- .../js}/opcodes-dumper.cpp | 2 +- .../js}/opcodes-dumper.h | 0 .../js}/optimizer-passes.cpp | 0 .../js}/optimizer-passes.h | 4 +- src/{libjsparser => parser/js}/parser.cpp | 2 +- src/{libjsparser => parser/js}/parser.h | 4 +- .../js}/scopes-tree.cpp | 0 src/{libjsparser => parser/js}/scopes-tree.h | 0 .../js}/serializer.cpp | 2 +- src/{liboptimizer => parser/js}/serializer.h | 6 +- .../js}/syntax-errors.cpp | 2 +- .../js}/syntax-errors.h | 0 src/{libcoreint => vm}/opcodes-agnostic.cpp | 0 .../opcodes-ecma-arithmetics.cpp | 0 .../opcodes-ecma-bitwise.cpp | 0 .../opcodes-ecma-equality.cpp | 0 .../opcodes-ecma-relational.cpp | 0 src/{libcoreint => vm}/opcodes-ecma-support.h | 0 .../opcodes-ecma-try-catch-finally.cpp | 4 +- .../opcodes-helpers-variables.cpp | 0 .../opcodes-native-call.cpp | 4 +- src/{libcoreint => vm}/opcodes-native-call.h | 0 src/{libcoreint => vm}/opcodes-varg.cpp | 4 +- src/{libcoreint => vm}/opcodes.cpp | 4 +- src/{libcoreint => vm}/opcodes.h | 2 +- src/{liboptimizer => vm}/pretty-printer.cpp | 2 +- src/{liboptimizer => vm}/pretty-printer.h | 6 +- src/{libcoreint/interpreter.cpp => vm/vm.cpp} | 4 +- src/{libcoreint/interpreter.h => vm/vm.h} | 8 +- tests/assert.js | 42 - .../benchmarks}/jerry/function_loop.js | 0 .../jerry/loop_arithmetics_10kk.js | 0 .../benchmarks}/jerry/loop_arithmetics_1kk.js | 0 tests/blinky.js | 69 + tests/unit/test_heap.cpp | 2 +- tests/unit/test_number_to_string.cpp | 4 +- tests/unit/test_pool.cpp | 2 +- tests/unit/test_poolman.cpp | 2 +- tests/unit/test_preparser.cpp | 2 +- tests/unit/test_string_to_number.cpp | 4 +- tools/generator.sh | 10 +- tools/push.sh | 4 +- tools/run_benchmarks.sh | 6 +- tools/test_stability.sh | 4 +- 221 files changed, 317 insertions(+), 3188 deletions(-) delete mode 100644 benchmarks/jerry/empty_loop.js delete mode 100644 demo-applications/loop_demo.js delete mode 100644 docs/compact_profile.txt rename {src/libperipherals => plugins/lib-device-stm}/actuators.cpp (100%) rename {src/libperipherals => plugins/lib-device-stm}/actuators.h (91%) rename {src/libperipherals => plugins/lib-device-stm}/common-io.cpp (100%) rename {src/libperipherals => plugins/lib-device-stm}/common-io.h (93%) rename {src/libperipherals => plugins/lib-device-stm}/mcu-headers.h (100%) rename {src/libperipherals => plugins/lib-device-stm}/sensors.cpp (100%) rename {src/libperipherals => plugins/lib-device-stm}/sensors.h (89%) rename src/{libecmaobjects => ecma/base}/ecma-alloc.cpp (99%) rename src/{libecmaobjects => ecma/base}/ecma-alloc.h (100%) rename src/{libecmaobjects => ecma/base}/ecma-gc.cpp (99%) rename src/{libecmaobjects => ecma/base}/ecma-gc.h (100%) rename src/{libecmaobjects => ecma/base}/ecma-globals.h (99%) rename src/{libecmaobjects => ecma/base}/ecma-helpers-conversion.cpp (100%) rename src/{libecmaobjects => ecma/base}/ecma-helpers-number.cpp (100%) rename src/{libecmaobjects => ecma/base}/ecma-helpers-string.cpp (99%) rename src/{libecmaobjects => ecma/base}/ecma-helpers-value.cpp (99%) rename src/{libecmaobjects => ecma/base}/ecma-helpers-values-collection.cpp (99%) rename src/{libecmaobjects => ecma/base}/ecma-helpers.cpp (100%) rename src/{libecmaobjects => ecma/base}/ecma-helpers.h (100%) rename src/{libecmaobjects => ecma/base}/ecma-lcache.cpp (100%) rename src/{libecmaobjects => ecma/base}/ecma-lcache.h (100%) rename src/{libecmaobjects => ecma/base}/ecma-magic-strings.inc.h (100%) rename src/{libecmaobjects => ecma/base}/ecma-stack.cpp (100%) rename src/{libecmaobjects => ecma/base}/ecma-stack.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-array-prototype.cpp (98%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-array-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-array.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-array.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-boolean-prototype.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-boolean-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-boolean.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-boolean.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-compact-profile-error.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-compact-profile-error.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-error-prototype.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-error-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-error.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-error.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-evalerror-prototype.cpp (94%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-evalerror-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-evalerror.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-evalerror.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-function-prototype.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-function-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-function.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-function.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-global.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-global.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-internal-routines-template.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-math.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-math.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-number-prototype.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-number-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-number.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-number.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-object-prototype.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-object-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-object.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-object.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-rangeerror-prototype.cpp (94%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-rangeerror-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-rangeerror.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-rangeerror.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-referenceerror-prototype.cpp (94%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-referenceerror-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-referenceerror.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-referenceerror.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-string-prototype.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-string-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-string.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-string.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-syntaxerror-prototype.cpp (94%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-syntaxerror-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-syntaxerror.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-syntaxerror.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-type-error-thrower.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-type-error-thrower.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-typeerror-prototype.cpp (94%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-typeerror-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-typeerror.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-typeerror.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-urierror-prototype.cpp (94%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-urierror-prototype.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-urierror.cpp (99%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtin-urierror.inc.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtins-internal.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtins.cpp (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtins.h (100%) rename src/{libecmabuiltins => ecma/builtin-objects}/ecma-builtins.inc.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-array-object.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-array-object.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-boolean-object.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-boolean-object.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-comparison.cpp (99%) rename src/{libecmaoperations => ecma/operations}/ecma-comparison.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-conversion.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-conversion.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-exceptions.cpp (99%) rename src/{libecmaoperations => ecma/operations}/ecma-exceptions.h (98%) rename src/{libecmaoperations => ecma/operations}/ecma-function-object.cpp (99%) rename src/{libecmaoperations => ecma/operations}/ecma-function-object.h (98%) rename src/{libecmaoperations => ecma/operations}/ecma-get-put-value.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-init-finalize.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-lex-env.cpp (99%) rename src/{libecmaoperations => ecma/operations}/ecma-lex-env.h (99%) rename src/{libecmaoperations => ecma/operations}/ecma-number-arithmetic.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-number-arithmetic.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-number-object.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-number-object.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-objects-arguments.cpp (99%) rename src/{libecmaoperations => ecma/operations}/ecma-objects-arguments.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-objects-general.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-objects-general.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-objects.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-objects.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-operations.h (92%) rename src/{libecmaoperations => ecma/operations}/ecma-reference.cpp (99%) rename src/{libecmaoperations => ecma/operations}/ecma-reference.h (98%) rename src/{libecmaoperations => ecma/operations}/ecma-string-object.cpp (100%) rename src/{libecmaoperations => ecma/operations}/ecma-string-object.h (100%) rename src/{libecmaoperations => ecma/operations}/ecma-try-catch-macro.h (100%) delete mode 100644 src/generated.h rename src/{libruntime => jrt}/jerry-exit.cpp (97%) rename src/{libruntime => jrt}/jerry-libc-printf.cpp (99%) rename src/{libruntime => jrt}/jerry-libc.cpp (100%) rename src/{libruntime => jrt}/jerry-libc.h (99%) rename src/{libruntime => jrt}/jrt-bit-fields.cpp (97%) rename src/{libruntime => jrt}/jrt-bit-fields.h (100%) rename src/{globals.h => jrt/jrt.h} (100%) rename src/{libruntime => jrt}/target/linux/asm_arm.h (100%) rename src/{libruntime => jrt}/target/linux/asm_x64.h (100%) rename src/{libruntime => jrt}/target/linux/asm_x86.h (100%) rename src/{libruntime => jrt}/target/linux/jerry-asm.S (100%) rename src/{libruntime => jrt}/target/linux/jerry-assert.cpp (97%) rename src/{libruntime => jrt}/target/linux/jerry-libc.cpp (99%) rename src/{libruntime => jrt}/target/stm32f3/abi.S (100%) rename src/{libruntime/target/stm32f4 => jrt/target/stm32f3}/jerry-assert.cpp (96%) rename src/{libruntime => jrt}/target/stm32f3/jerry-libc.cpp (100%) rename src/{libruntime => jrt}/target/stm32f4/abi.S (100%) rename src/{libruntime/target/stm32f3 => jrt/target/stm32f4}/jerry-assert.cpp (96%) rename src/{libruntime => jrt}/target/stm32f4/jerry-libc.cpp (100%) rename src/{liballocator => mem}/mem-allocator-internal.h (100%) rename src/{liballocator => mem}/mem-allocator.cpp (99%) rename src/{liballocator => mem}/mem-allocator.h (97%) rename src/{liballocator => mem}/mem-config.h (100%) rename src/{liballocator => mem}/mem-heap.cpp (99%) rename src/{liballocator => mem}/mem-heap.h (99%) rename src/{liballocator => mem}/mem-pool.cpp (99%) rename src/{liballocator => mem}/mem-pool.h (100%) rename src/{liballocator => mem}/mem-poolman.cpp (99%) rename src/{liballocator => mem}/mem-poolman.h (95%) rename src/{libintstructs => parser/collections}/array-list.cpp (100%) rename src/{libintstructs => parser/collections}/array-list.h (94%) rename src/{libintstructs => parser/collections}/hash-table.cpp (100%) rename src/{libintstructs => parser/collections}/hash-table.h (100%) rename src/{libintstructs => parser/collections}/linked-list.cpp (99%) rename src/{libintstructs => parser/collections}/linked-list.h (92%) rename src/{liboptimizer => parser/collections}/lit-id-hash-table.cpp (100%) rename src/{liboptimizer => parser/collections}/lit-id-hash-table.h (94%) rename src/{libintstructs => parser/collections}/literal.cpp (100%) rename src/{libintstructs => parser/collections}/literal.h (100%) rename src/{libintstructs => parser/collections}/lp-string.cpp (100%) rename src/{libintstructs => parser/collections}/lp-string.h (100%) rename src/{libintstructs => parser/collections}/stack.h (100%) rename src/{libintstructs => parser/collections}/tree.h (100%) rename docs/links.txt => src/parser/js.new (100%) rename src/{liboptimizer => parser/js}/bytecode-data.h (100%) rename src/{liboptimizer => parser/js}/deserializer.cpp (100%) rename src/{liboptimizer => parser/js}/deserializer.h (94%) rename src/{libjsparser => parser/js}/lexer.cpp (100%) rename src/{libjsparser => parser/js}/lexer.h (98%) rename src/{libjsparser => parser/js}/opcodes-dumper.cpp (99%) rename src/{libjsparser => parser/js}/opcodes-dumper.h (100%) rename src/{liboptimizer => parser/js}/optimizer-passes.cpp (100%) rename src/{liboptimizer => parser/js}/optimizer-passes.h (91%) rename src/{libjsparser => parser/js}/parser.cpp (99%) rename src/{libjsparser => parser/js}/parser.h (91%) rename src/{libjsparser => parser/js}/scopes-tree.cpp (100%) rename src/{libjsparser => parser/js}/scopes-tree.h (100%) rename src/{liboptimizer => parser/js}/serializer.cpp (99%) rename src/{liboptimizer => parser/js}/serializer.h (93%) rename src/{libjsparser => parser/js}/syntax-errors.cpp (99%) rename src/{libjsparser => parser/js}/syntax-errors.h (100%) rename src/{libcoreint => vm}/opcodes-agnostic.cpp (100%) rename src/{libcoreint => vm}/opcodes-ecma-arithmetics.cpp (100%) rename src/{libcoreint => vm}/opcodes-ecma-bitwise.cpp (100%) rename src/{libcoreint => vm}/opcodes-ecma-equality.cpp (100%) rename src/{libcoreint => vm}/opcodes-ecma-relational.cpp (100%) rename src/{libcoreint => vm}/opcodes-ecma-support.h (100%) rename src/{libcoreint => vm}/opcodes-ecma-try-catch-finally.cpp (99%) rename src/{libcoreint => vm}/opcodes-helpers-variables.cpp (100%) rename src/{libcoreint => vm}/opcodes-native-call.cpp (99%) rename src/{libcoreint => vm}/opcodes-native-call.h (100%) rename src/{libcoreint => vm}/opcodes-varg.cpp (98%) rename src/{libcoreint => vm}/opcodes.cpp (99%) rename src/{libcoreint => vm}/opcodes.h (99%) rename src/{liboptimizer => vm}/pretty-printer.cpp (99%) rename src/{liboptimizer => vm}/pretty-printer.h (90%) rename src/{libcoreint/interpreter.cpp => vm/vm.cpp} (99%) rename src/{libcoreint/interpreter.h => vm/vm.h} (92%) delete mode 100644 tests/assert.js rename {benchmarks => tests/benchmarks}/jerry/function_loop.js (100%) rename {benchmarks => tests/benchmarks}/jerry/loop_arithmetics_10kk.js (100%) rename {benchmarks => tests/benchmarks}/jerry/loop_arithmetics_1kk.js (100%) create mode 100644 tests/blinky.js diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e537a826..ae9f4a6b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,11 @@ project (Jerry CXX C ASM) # Options option(STRIP_LINUX_RELEASE_BINARY "Strip symbols from Linux-targeted release binaries" ON) + set(MCU_SCRIPT_FILE "tests/blinky.js" CACHE STRING "Script to run on MCU") + +# Intermediate files + # Script to run on MCU + set(MCU_SCRIPT_GENERATED_HEADER ${CMAKE_BINARY_DIR}/generated.h) # Build modes set(BUILD_MODES DEBUG RELEASE) @@ -65,27 +70,27 @@ project (Jerry CXX C ASM) # Full profile (default, so - no suffix) set(MODIFIER_SUFFIX_FULL_PROFILE ) set(MODIFIER_DEFINES_FULL_PROFILE DEFINES_JERRY_FULL_PROFILE) - set(MODIFIER_INCLUDE_DIRECTORIES_FULL_PROFILE ) + set(MODIFIER_INCLUDE_FULL_PROFILE ) # Compact profile set(MODIFIER_SUFFIX_COMPACT_PROFILE -cp) set(MODIFIER_DEFINES_COMPACT_PROFILE DEFINES_JERRY_COMPACT_PROFILE) - set(MODIFIER_INCLUDE_DIRECTORIES_COMPACT_PROFILE ) + set(MODIFIER_INCLUDE_COMPACT_PROFILE ) # Minimal compact profile set(MODIFIER_SUFFIX_COMPACT_PROFILE_MINIMAL -cp_minimal) set(MODIFIER_DEFINES_COMPACT_PROFILE_MINIMAL DEFINES_JERRY_COMPACT_PROFILE_MINIMAL) - set(MODIFIER_INCLUDE_DIRECTORIES_COMPACT_PROFILE_MINIMAL ) + set(MODIFIER_INCLUDE_COMPACT_PROFILE_MINIMAL ) # Memory statistics set(MODIFIER_SUFFIX_MEMORY_STATISTICS -mem_stats) set(MODIFIER_DEFINES_MEMORY_STATISTICS DEFINES_JERRY_MEMORY_STATS) - set(MODIFIER_INCLUDE_DIRECTORIES_MEMORY_STATISTICS ) + set(MODIFIER_INCLUDE_MEMORY_STATISTICS ) # Valgrind set(MODIFIER_SUFFIX_VALGRIND -valgrind) set(MODIFIER_DEFINES_VALGRIND DEFINES_JERRY_VALGRIND) - set(MODIFIER_INCLUDE_DIRECTORIES_VALGRIND INCLUDE_DIRECTORIES_THIRD_PARTY_VALGRIND) + set(MODIFIER_INCLUDE_VALGRIND INCLUDE_THIRD_PARTY_VALGRIND) # Compiler flags set(CXX_FLAGS_JERRY -std=c++11 -fno-exceptions -fno-rtti) @@ -242,204 +247,90 @@ project (Jerry CXX C ASM) ${DEFINES_JERRY_VALGRIND}) # Include directories - set(INCLUDE_DIRECTORIES_JERRY + set(INCLUDE_CORE src - src/liballocator - src/libcoreint - src/libecmabuiltins - src/libecmaobjects - src/libecmaoperations - src/libintstructs - src/libjsparser - src/liboptimizer - src/libperipherals - src/libruntime) + src/mem + src/vm + src/ecma/builtin-objects + src/ecma/base + src/ecma/operations + src/parser/collections + src/parser/js + plugins/lib-device-stm + src/jrt) # Platform-specific # Linux - set(INCLUDE_DIRECTORIES_JERRY_LINUX - src/libruntime/target/linux) + set(INCLUDE_CORE_LINUX + src/jrt/target/linux) # MCU # STM32F3 - set(INCLUDE_DIRECTORIES_JERRY_MCU_STM32F3 - src/libruntime/target/stm32f3) + set(INCLUDE_CORE_MCU_STM32F3 + src/jrt/target/stm32f3) # STM32F4 - set(INCLUDE_DIRECTORIES_JERRY_MCU_STM32F4 - src/libruntime/target/stm32f4) + set(INCLUDE_CORE_MCU_STM32F4 + src/jrt/target/stm32f4) # Third-party # Valgrind - set(INCLUDE_DIRECTORIES_THIRD_PARTY_VALGRIND third-party/valgrind) + set(INCLUDE_THIRD_PARTY_VALGRIND third-party/valgrind) # Platform-specific # MCU # STM32F3 - set(INCLUDE_DIRECTORIES_THIRD_PARTY_MCU_STM32F3 + set(INCLUDE_THIRD_PARTY_MCU_STM32F3 third-party/STM32F3-Discovery_FW_V1.1.0/Libraries/CMSIS/Device/ST/STM32F30x/Include third-party/STM32F3-Discovery_FW_V1.1.0/Libraries/STM32F30x_StdPeriph_Driver/inc third-party/STM32F3-Discovery_FW_V1.1.0/Libraries/CMSIS/Include third-party/STM32F3-Discovery_FW_V1.1.0) # STM32F4 - set(INCLUDE_DIRECTORIES_THIRD_PARTY_MCU_STM32F4 + set(INCLUDE_THIRD_PARTY_MCU_STM32F4 third-party/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include third-party/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc third-party/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Include third-party/STM32F4-Discovery_FW_V1.1.0) # Unit tests - set(INCLUDE_DIRECTORIES_UNIT_TEST + set(INCLUDE_UNIT_TEST tests/unit - ${INCLUDE_DIRECTORIES_THIRD_PARTY_VALGRIND}) + ${INCLUDE_THIRD_PARTY_VALGRIND}) # Sources - # Jerry - set(SOURCE_JERRY_LIB_ALLOCATOR # liballocator - src/liballocator/mem-allocator.cpp - src/liballocator/mem-heap.cpp - src/liballocator/mem-pool.cpp - src/liballocator/mem-poolman.cpp) - - set(SOURCE_JERRY_LIB_COREINT # libcoreint - src/libcoreint/interpreter.cpp - src/libcoreint/opcodes-agnostic.cpp - src/libcoreint/opcodes.cpp - src/libcoreint/opcodes-ecma-arithmetics.cpp - src/libcoreint/opcodes-ecma-bitwise.cpp - src/libcoreint/opcodes-ecma-equality.cpp - src/libcoreint/opcodes-ecma-relational.cpp - src/libcoreint/opcodes-ecma-try-catch-finally.cpp - src/libcoreint/opcodes-helpers-variables.cpp - src/libcoreint/opcodes-native-call.cpp - src/libcoreint/opcodes-varg.cpp) - - set(SOURCE_JERRY_LIB_ECMABUILTINS # libecmabuiltins - src/libecmabuiltins/ecma-builtin-array.cpp - src/libecmabuiltins/ecma-builtin-array-prototype.cpp - src/libecmabuiltins/ecma-builtin-boolean.cpp - src/libecmabuiltins/ecma-builtin-boolean-prototype.cpp - src/libecmabuiltins/ecma-builtin-compact-profile-error.cpp - src/libecmabuiltins/ecma-builtin-error.cpp - src/libecmabuiltins/ecma-builtin-error-prototype.cpp - src/libecmabuiltins/ecma-builtin-evalerror.cpp - src/libecmabuiltins/ecma-builtin-evalerror-prototype.cpp - src/libecmabuiltins/ecma-builtin-function.cpp - src/libecmabuiltins/ecma-builtin-function-prototype.cpp - src/libecmabuiltins/ecma-builtin-global.cpp - src/libecmabuiltins/ecma-builtin-math.cpp - src/libecmabuiltins/ecma-builtin-number.cpp - src/libecmabuiltins/ecma-builtin-number-prototype.cpp - src/libecmabuiltins/ecma-builtin-object.cpp - src/libecmabuiltins/ecma-builtin-object-prototype.cpp - src/libecmabuiltins/ecma-builtin-rangeerror.cpp - src/libecmabuiltins/ecma-builtin-rangeerror-prototype.cpp - src/libecmabuiltins/ecma-builtin-referenceerror.cpp - src/libecmabuiltins/ecma-builtin-referenceerror-prototype.cpp - src/libecmabuiltins/ecma-builtins.cpp - src/libecmabuiltins/ecma-builtin-string.cpp - src/libecmabuiltins/ecma-builtin-string-prototype.cpp - src/libecmabuiltins/ecma-builtin-syntaxerror.cpp - src/libecmabuiltins/ecma-builtin-syntaxerror-prototype.cpp - src/libecmabuiltins/ecma-builtin-typeerror.cpp - src/libecmabuiltins/ecma-builtin-typeerror-prototype.cpp - src/libecmabuiltins/ecma-builtin-type-error-thrower.cpp - src/libecmabuiltins/ecma-builtin-urierror.cpp - src/libecmabuiltins/ecma-builtin-urierror-prototype.cpp) - - set(SOURCE_JERRY_LIB_ECMAOBJECTS # libecmaobjects - src/libecmaobjects/ecma-alloc.cpp - src/libecmaobjects/ecma-gc.cpp - src/libecmaobjects/ecma-helpers.cpp - src/libecmaobjects/ecma-helpers-conversion.cpp - src/libecmaobjects/ecma-helpers-number.cpp - src/libecmaobjects/ecma-helpers-string.cpp - src/libecmaobjects/ecma-helpers-value.cpp - src/libecmaobjects/ecma-helpers-values-collection.cpp - src/libecmaobjects/ecma-lcache.cpp - src/libecmaobjects/ecma-stack.cpp) - - set(SOURCE_JERRY_LIB_ECMAOPERATIONS # libecmaoperations - src/libecmaoperations/ecma-array-object.cpp - src/libecmaoperations/ecma-boolean-object.cpp - src/libecmaoperations/ecma-comparison.cpp - src/libecmaoperations/ecma-conversion.cpp - src/libecmaoperations/ecma-exceptions.cpp - src/libecmaoperations/ecma-function-object.cpp - src/libecmaoperations/ecma-get-put-value.cpp - src/libecmaoperations/ecma-init-finalize.cpp - src/libecmaoperations/ecma-lex-env.cpp - src/libecmaoperations/ecma-number-arithmetic.cpp - src/libecmaoperations/ecma-number-object.cpp - src/libecmaoperations/ecma-objects-arguments.cpp - src/libecmaoperations/ecma-objects.cpp - src/libecmaoperations/ecma-objects-general.cpp - src/libecmaoperations/ecma-reference.cpp - src/libecmaoperations/ecma-string-object.cpp) - - set(SOURCE_JERRY_LIB_INTSTRUCTS # libintstructs - src/libintstructs/array-list.cpp - src/libintstructs/hash-table.cpp - src/libintstructs/linked-list.cpp - src/libintstructs/literal.cpp - src/libintstructs/lp-string.cpp) - - set(SOURCE_JERRY_LIB_JSPARSER # libjsparser - src/libjsparser/lexer.cpp - src/libjsparser/opcodes-dumper.cpp - src/libjsparser/parser.cpp - src/libjsparser/scopes-tree.cpp - src/libjsparser/syntax-errors.cpp) - - set(SOURCE_JERRY_LIB_OPTIMIZER # liboptimizer - src/liboptimizer/deserializer.cpp - src/liboptimizer/lit-id-hash-table.cpp - src/liboptimizer/optimizer-passes.cpp - src/liboptimizer/pretty-printer.cpp - src/liboptimizer/serializer.cpp) - - set(SOURCE_JERRY_LIB_PERIPHERALS # libperipherals - src/libperipherals/actuators.cpp - src/libperipherals/common-io.cpp - src/libperipherals/sensors.cpp) - - set(SOURCE_JERRY_LIB_RUNTIME # libruntime - src/libruntime/jerry-exit.cpp - src/libruntime/jerry-libc.cpp - src/libruntime/jerry-libc-printf.cpp - src/libruntime/jrt-bit-fields.cpp) + # Jerry core + file(GLOB SOURCE_CORE_MEM src/mem/*.cpp) + file(GLOB SOURCE_CORE_VM src/vm/*.cpp) + file(GLOB SOURCE_CORE_ECMA_BUILTINS src/ecma/builtin-objects/*.cpp) + file(GLOB SOURCE_CORE_ECMA_BASE src/ecma/base/*.cpp) + file(GLOB SOURCE_CORE_ECMA_OPERATIONS src/ecma/operations/*.cpp) + file(GLOB SOURCE_CORE_PARSER_COLLECTIONS src/parser/collections/*.cpp) + file(GLOB SOURCE_CORE_PARSER_JS src/parser/js/*.cpp) + file(GLOB SOURCE_CORE_JRT src/jrt/*.cpp) - set(SOURCE_JERRY_LIB # all Jerry library's source - # that is not platform-specific - ${SOURCE_JERRY_LIB_ALLOCATOR} - ${SOURCE_JERRY_LIB_COREINT} - ${SOURCE_JERRY_LIB_ECMABUILTINS} - ${SOURCE_JERRY_LIB_ECMAOBJECTS} - ${SOURCE_JERRY_LIB_ECMAOPERATIONS} - ${SOURCE_JERRY_LIB_INTSTRUCTS} - ${SOURCE_JERRY_LIB_JSPARSER} - ${SOURCE_JERRY_LIB_OPTIMIZER} - ${SOURCE_JERRY_LIB_PERIPHERALS} - ${SOURCE_JERRY_LIB_RUNTIME}) + # Plugins + file(GLOB SOURCE_PLUGINS_LIB_DEVICE_STM plugins/lib-device-stm/*.cpp) + + set(SOURCE_CORE + ${SOURCE_CORE_MEM} + ${SOURCE_CORE_VM} + ${SOURCE_CORE_ECMA_BUILTINS} + ${SOURCE_CORE_ECMA_BASE} + ${SOURCE_CORE_ECMA_OPERATIONS} + ${SOURCE_CORE_PARSER_COLLECTIONS} + ${SOURCE_CORE_PARSER_JS} + ${SOURCE_CORE_JRT} + ${SOURCE_PLUGINS_LIB_DEVICE_STM}) - set(SOURCE_JERRY_MAIN # main Jerry module - src/main.cpp) + # Jerry standalone + set(SOURCE_JERRY_STANDALONE_MAIN src/main.cpp) - # Platform-specific - # Linux - set(SOURCE_JERRY_LIB_RUNTIME_LINUX - src/libruntime/target/linux/jerry-libc.cpp - src/libruntime/target/linux/jerry-assert.cpp - src/libruntime/target/linux/jerry-asm.S) - # MCU - # stm32f3 - set(SOURCE_JERRY_LIB_RUNTIME_STM32F3 - src/libruntime/target/stm32f3/jerry-libc.cpp - src/libruntime/target/stm32f3/jerry-assert.cpp - src/libruntime/target/stm32f3/abi.S) - # stm32f4 - set(SOURCE_JERRY_LIB_RUNTIME_STM32F4 - src/libruntime/target/stm32f4/jerry-libc.cpp - src/libruntime/target/stm32f4/jerry-assert.cpp - src/libruntime/target/stm32f4/abi.S) + # Platform-specific + # Linux + file(GLOB SOURCE_CORE_JRT_LINUX src/jrt/target/linux/*.cpp src/jrt/target/linux/*.S) + # MCU + # stm32f3 + file(GLOB SOURCE_CORE_JRT_STM32F3 src/jrt/target/stm32f3/*.cpp src/jrt/target/stm32f3/*.S) + # stm32f4 + file(GLOB SOURCE_CORE_JRT_STM32F4 src/jrt/target/stm32f4/*.cpp src/jrt/target/stm32f4/*.S) # Third-party # Platform-specific @@ -460,13 +351,7 @@ project (Jerry CXX C ASM) third-party/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c) # Unit tests main modules - set(SOURCE_UNIT_TEST_MAIN_MODULES - tests/unit/test_heap.cpp - tests/unit/test_number_to_string.cpp - tests/unit/test_pool.cpp - tests/unit/test_poolman.cpp - tests/unit/test_preparser.cpp - tests/unit/test_string_to_number.cpp) + file(GLOB SOURCE_UNIT_TEST_MAIN_MODULES tests/unit/*.cpp) # Imported libraries # libc @@ -517,19 +402,19 @@ project (Jerry CXX C ASM) foreach(MODIFIER ${ARGN}) set(TARGET_NAME ${TARGET_NAME}${MODIFIER_SUFFIX_${MODIFIER}}) set(DEFINES_JERRY ${DEFINES_JERRY} ${${MODIFIER_DEFINES_${MODIFIER}}}) - set(INCLUDE_DIRECTORIES_JERRY ${INCLUDE_DIRECTORIES_JERRY} ${${MODIFIER_INCLUDE_DIRECTORIES_${MODIFIER}}}) + set(INCLUDE_CORE ${INCLUDE_CORE} ${${MODIFIER_INCLUDE_${MODIFIER}}}) endforeach() - add_library(${TARGET_NAME}.lib STATIC ${SOURCE_JERRY_LIB} ${SOURCE_JERRY_LIB_RUNTIME_LINUX}) + add_library(${TARGET_NAME}.lib STATIC ${SOURCE_CORE} ${SOURCE_CORE_JRT_LINUX}) target_compile_options(${TARGET_NAME}.lib PRIVATE ${CXX_FLAGS_JERRY} ${CXX_FLAGS_COMMON_ARCH} ${CXX_FLAGS_COMMON_${BUILD_MODE}}) target_compile_definitions(${TARGET_NAME}.lib PRIVATE ${DEFINES_JERRY}) - target_include_directories(${TARGET_NAME}.lib PRIVATE ${INCLUDE_DIRECTORIES_JERRY}) + target_include_directories(${TARGET_NAME}.lib PRIVATE ${INCLUDE_CORE}) - add_executable(${TARGET_NAME} ${SOURCE_JERRY_MAIN}) + add_executable(${TARGET_NAME} ${SOURCE_JERRY_STANDALONE_MAIN}) target_compile_options(${TARGET_NAME} PRIVATE ${CXX_FLAGS_JERRY} ${CXX_FLAGS_COMMON_ARCH} ${CXX_FLAGS_COMMON_${BUILD_MODE}}) set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_JERRY} ${LINKER_FLAGS_STATIC}") target_compile_definitions(${TARGET_NAME} PRIVATE ${DEFINES_JERRY}) - target_include_directories(${TARGET_NAME} PRIVATE ${INCLUDE_DIRECTORIES_JERRY}) + target_include_directories(${TARGET_NAME} PRIVATE ${INCLUDE_CORE}) target_link_libraries(${TARGET_NAME} ${TARGET_NAME}.lib imported_libgcc) if(${STRIP_LINUX_RELEASE_BINARY} STREQUAL "ON") @@ -561,10 +446,10 @@ project (Jerry CXX C ASM) # Unit tests declaration add_custom_target(unittests) - add_library(unit_tests.lib STATIC ${SOURCE_JERRY_LIB} ${SOURCE_JERRY_LIB_RUNTIME_LINUX}) + add_library(unit_tests.lib STATIC ${SOURCE_CORE} ${SOURCE_CORE_JRT_LINUX}) target_compile_options(unit_tests.lib PRIVATE ${CXX_FLAGS_JERRY} ${CXX_FLAGS_COMMON_ARCH} ${CXX_FLAGS_UNIT_TEST}) target_compile_definitions(unit_tests.lib PRIVATE ${DEFINES_JERRY} ${DEFINES_UNIT_TEST}) - target_include_directories(unit_tests.lib PRIVATE ${INCLUDE_DIRECTORIES_JERRY} ${INCLUDE_DIRECTORIES_UNIT_TEST}) + target_include_directories(unit_tests.lib PRIVATE ${INCLUDE_CORE} ${INCLUDE_UNIT_TEST}) foreach(SOURCE_UNIT_TEST_MAIN ${SOURCE_UNIT_TEST_MAIN_MODULES}) get_filename_component(TARGET_NAME ${SOURCE_UNIT_TEST_MAIN} NAME_WE) @@ -577,7 +462,7 @@ project (Jerry CXX C ASM) ${CXX_FLAGS_UNIT_TEST}) set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_JERRY} ${LINKER_FLAGS_UNIT_TEST}") target_compile_definitions(${TARGET_NAME} PRIVATE ${DEFINES_JERRY} ${DEFINES_UNIT_TEST}) - target_include_directories(${TARGET_NAME} PRIVATE ${INCLUDE_DIRECTORIES_JERRY} ${INCLUDE_DIRECTORIES_UNIT_TEST}) + target_include_directories(${TARGET_NAME} PRIVATE ${INCLUDE_CORE} ${INCLUDE_UNIT_TEST}) target_link_libraries(${TARGET_NAME} unit_tests.lib imported_libc imported_libgcc) add_dependencies(unittests ${TARGET_NAME}) @@ -597,21 +482,30 @@ project (Jerry CXX C ASM) foreach(MODIFIER ${ARGN}) set(TARGET_NAME ${TARGET_NAME}${MODIFIER_SUFFIX_${MODIFIER}}) set(DEFINES_JERRY ${DEFINES_JERRY} ${${MODIFIER_DEFINES_${MODIFIER}}}) - set(INCLUDE_DIRECTORIES_JERRY ${INCLUDE_DIRECTORIES_JERRY} ${${MODIFIER_INCLUDE_DIRECTORIES_${MODIFIER}}}) + set(INCLUDE_CORE ${INCLUDE_CORE} ${${MODIFIER_INCLUDE_${MODIFIER}}}) endforeach() + set(MCU_SCRIPT_GENERATED_HEADER ${MCU_SCRIPT_GENERATED_HEADER}.${TARGET_NAME}) + add_custom_command(OUTPUT ${MCU_SCRIPT_GENERATED_HEADER} + COMMAND ${CMAKE_SOURCE_DIR}/tools/generator.sh "${CMAKE_SOURCE_DIR}/${MCU_SCRIPT_FILE}" ${MCU_SCRIPT_GENERATED_HEADER} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + add_custom_target(mcu_header_with_script_to_run.${TARGET_NAME} DEPENDS ${MCU_SCRIPT_GENERATED_HEADER}) + set(DEFINES_JERRY_MCU_SCRIPT JERRY_MCU_SCRIPT_HEADER="${MCU_SCRIPT_GENERATED_HEADER}") + # Jerry library - add_library(${TARGET_NAME}.jerry.lib STATIC ${SOURCE_JERRY_LIB} ${SOURCE_JERRY_LIB_RUNTIME_${PLATFORM}}) + add_library(${TARGET_NAME}.jerry.lib STATIC ${SOURCE_CORE} ${SOURCE_CORE_JRT_${PLATFORM}}) target_compile_options(${TARGET_NAME}.jerry.lib PRIVATE ${CXX_FLAGS_JERRY} ${CXX_FLAGS_COMMON_${BUILD_MODE}} ${CXX_FLAGS_COMMON_ARCH} ${CXX_FLAGS_COMMON_MCU_${PLATFORM}}) - target_compile_definitions(${TARGET_NAME}.jerry.lib PRIVATE ${DEFINES_JERRY} ${DEFINES_JERRY_MCU_${PLATFORM}}) + target_compile_definitions(${TARGET_NAME}.jerry.lib PRIVATE + ${DEFINES_JERRY} + ${DEFINES_JERRY_MCU_${PLATFORM}}) target_include_directories(${TARGET_NAME}.jerry.lib PRIVATE - ${INCLUDE_DIRECTORIES_JERRY} - ${INCLUDE_DIRECTORIES_JERRY_MCU_${PLATFORM}} - ${INCLUDE_DIRECTORIES_THIRD_PARTY_MCU_${PLATFORM}}) + ${INCLUDE_CORE} + ${INCLUDE_CORE_MCU_${PLATFORM}} + ${INCLUDE_THIRD_PARTY_MCU_${PLATFORM}}) # Third-party MCU library add_library(${TARGET_NAME}.third_party.lib STATIC @@ -621,9 +515,9 @@ project (Jerry CXX C ASM) ${CXX_FLAGS_COMMON_ARCH} ${CXX_FLAGS_COMMON_MCU_${PLATFORM}}) target_include_directories(${TARGET_NAME}.third_party.lib PRIVATE - ${INCLUDE_DIRECTORIES_THIRD_PARTY_MCU_${PLATFORM}}) + ${INCLUDE_THIRD_PARTY_MCU_${PLATFORM}}) - add_executable(${TARGET_NAME} ${SOURCE_JERRY_MAIN}) + add_executable(${TARGET_NAME} ${SOURCE_JERRY_STANDALONE_MAIN}) target_compile_options(${TARGET_NAME} PRIVATE ${CXX_FLAGS_JERRY} ${CXX_FLAGS_COMMON_${BUILD_MODE}} @@ -631,12 +525,16 @@ project (Jerry CXX C ASM) ${CXX_FLAGS_COMMON_MCU_${PLATFORM}}) set_property(TARGET ${TARGET_NAME} PROPERTY LINK_FLAGS "${LINKER_FLAGS_JERRY} ${LINKER_FLAGS_STATIC} ${LINKER_FLAGS_JERRY_MCU_${PLATFORM}}") - target_compile_definitions(${TARGET_NAME} PRIVATE ${DEFINES_JERRY} ${DEFINES_JERRY_MCU_${PLATFORM}}) + target_compile_definitions(${TARGET_NAME} PRIVATE + ${DEFINES_JERRY} + ${DEFINES_JERRY_MCU_${PLATFORM}} + ${DEFINES_JERRY_MCU_SCRIPT}) target_include_directories(${TARGET_NAME} PRIVATE - ${INCLUDE_DIRECTORIES_JERRY} - ${INCLUDE_DIRECTORIES_JERRY_MCU_${PLATFORM}} - ${INCLUDE_DIRECTORIES_THIRD_PARTY_MCU_${PLATFORM}}) + ${INCLUDE_CORE} + ${INCLUDE_CORE_MCU_${PLATFORM}} + ${INCLUDE_THIRD_PARTY_MCU_${PLATFORM}}) target_link_libraries(${TARGET_NAME} ${TARGET_NAME}.jerry.lib ${TARGET_NAME}.third_party.lib imported_libgcc) + add_dependencies(${TARGET_NAME} mcu_header_with_script_to_run.${TARGET_NAME}) add_custom_target(${TARGET_NAME}.flash COMMAND ${CMAKE_OBJCOPY} -Obinary $ $.bin diff --git a/Makefile b/Makefile index 94be1808b..f6fd64f2c 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ precommit: clean @ $(MAKE) unittests_run TESTS_OPTS="--silent" @ echo -e "Unit tests completed successfully. Starting parse-only testing.\n" @ # Parse-only testing - @ for path in "./tests/jerry" "./benchmarks/jerry"; \ + @ for path in "./tests/jerry" "./tests/benchmarks/jerry"; \ do \ run_ids=""; \ for check_target in $(PRECOMMIT_CHECK_TARGETS_NO_VALGRIND_LIST) $(PRECOMMIT_CHECK_TARGETS_VALGRIND_LIST); \ diff --git a/benchmarks/jerry/empty_loop.js b/benchmarks/jerry/empty_loop.js deleted file mode 100644 index 8b070d18f..000000000 --- a/benchmarks/jerry/empty_loop.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var count = 1000000; - -for (var i = 0; i < count; i++) - ; - diff --git a/demo-applications/loop_demo.js b/demo-applications/loop_demo.js deleted file mode 100644 index 189f93198..000000000 --- a/demo-applications/loop_demo.js +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var led_green = 0; -var led_orange = 1; -var led_red = 2; -var led_blue = 3; - -function LEDSet(led_group, on) -{ - if (on) - { - LEDOn (led_group); - LEDOn (led_group + 4); - } - else - { - LEDOff (led_group); - LEDOff (led_group + 4); - } -} - -var tmp, a, b = 1, c = 2, d, e = 3, g = 4; - -var count = 1000; - -tmp = b * c; -a = tmp + g; -d = tmp * e + a; - -var waitTime = 60; -var numOfIterations = 10; - -while (1) -{ - for (var j = 0; j < numOfIterations; j += 1) - { - LEDSet(led_green, true); - LEDSet(led_orange, true); - LEDSet(led_red, true); - LEDSet(led_blue, true); - wait(waitTime * 2); - LEDSet(led_green, false); - LEDSet(led_orange, false); - LEDSet(led_red, false); - LEDSet(led_blue, false); - wait(waitTime * 2); - } - - for (var j = 0; j < numOfIterations; j += 1) - { - LEDSet(led_green, true); - wait(waitTime); - LEDSet(led_green, false); - wait(waitTime); - LEDSet(led_orange, true); - wait(waitTime); - LEDSet(led_orange, false); - wait(waitTime); - LEDSet(led_red, true); - wait(waitTime); - LEDSet(led_red, false); - wait(waitTime); - LEDSet(led_blue, true); - wait(waitTime); - LEDSet(led_blue, false); - wait(waitTime); - } - - for (var j = 0; j < numOfIterations; j += 1) - { - LEDSet(led_green, true); - wait(waitTime); - LEDSet(led_green, false); - LEDSet(led_orange, true); - wait(waitTime); - LEDSet(led_orange, false); - LEDSet(led_red, true); - wait(waitTime); - LEDSet(led_red, false); - LEDSet(led_blue, true); - wait(waitTime); - LEDSet(led_blue, false); - } - - for (var j = 0; j < numOfIterations; j += 1) - { - LEDSet(led_green, true); - wait(waitTime / 2); - LEDSet(led_green, false); - LEDSet(led_orange, true); - wait(waitTime / 2); - LEDSet(led_orange, false); - LEDSet(led_red, true); - wait(waitTime / 2); - LEDSet(led_red, false); - LEDSet(led_blue, true); - wait(waitTime / 2); - LEDSet(led_blue, false); - } - - for (var j = 0; j < numOfIterations; j += 1) - { - LEDSet(led_green, true); - wait(waitTime / 3); - LEDSet(led_green, false); - LEDSet(led_orange, true); - wait(waitTime / 3); - LEDSet(led_orange, false); - LEDSet(led_red, true); - wait(waitTime / 3); - LEDSet(led_red, false); - LEDSet(led_blue, true); - wait(waitTime / 3); - LEDSet(led_blue, false); - } - - for (var j = 0; j < numOfIterations; j += 1) - { - LEDSet(led_green, true); - wait(waitTime / 6); - LEDSet(led_green, false); - LEDSet(led_orange, true); - wait(waitTime / 6); - LEDSet(led_orange, false); - LEDSet(led_red, true); - wait(waitTime / 6); - LEDSet(led_red, false); - LEDSet(led_blue, true); - wait(waitTime / 6); - LEDSet(led_blue, false); - } -} diff --git a/docs/compact_profile.txt b/docs/compact_profile.txt deleted file mode 100644 index e1b02a781..000000000 --- a/docs/compact_profile.txt +++ /dev/null @@ -1,16 +0,0 @@ -- Prohibit eval() usage, same as Function or new Function - eval() requires run time compilation because the source text might not - appear in the program or can be generated at run time. Run time compilation - is required to support the Function constructor and the Function function - when the body is not a string literal. -- Limit Unicode support -- Cut Number from 64bit to 32bit/16/8bit -- Limit recursion level -- Do not allow addition, deletion or assignment to the properties of built-in - objects. - This limitation is needed to support a more efficient implementation based - on static compilation of built-in objects without risking that the objects - are mutated on shadowed by dynamically added properties. -- Do not allow usage of with statement - The with makes access to named references inefficient, because the scopes - for such access cannot be compiled until run time. diff --git a/src/libperipherals/actuators.cpp b/plugins/lib-device-stm/actuators.cpp similarity index 100% rename from src/libperipherals/actuators.cpp rename to plugins/lib-device-stm/actuators.cpp diff --git a/src/libperipherals/actuators.h b/plugins/lib-device-stm/actuators.h similarity index 91% rename from src/libperipherals/actuators.h rename to plugins/lib-device-stm/actuators.h index 989e875df..5fa455491 100644 --- a/src/libperipherals/actuators.h +++ b/plugins/lib-device-stm/actuators.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef ACTUATORS_H #define ACTUATORS_H -#include "globals.h" +#include "jrt.h" void led_toggle (uint32_t); void led_on (uint32_t); diff --git a/src/libperipherals/common-io.cpp b/plugins/lib-device-stm/common-io.cpp similarity index 100% rename from src/libperipherals/common-io.cpp rename to plugins/lib-device-stm/common-io.cpp diff --git a/src/libperipherals/common-io.h b/plugins/lib-device-stm/common-io.h similarity index 93% rename from src/libperipherals/common-io.h rename to plugins/lib-device-stm/common-io.h index b581f98e7..85ae9c507 100644 --- a/src/libperipherals/common-io.h +++ b/plugins/lib-device-stm/common-io.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef COMMON_IO_H #define COMMON_IO_H -#include "globals.h" +#include "jrt.h" int digital_read (uint32_t, uint32_t); void digital_write (uint32_t, uint32_t); diff --git a/src/libperipherals/mcu-headers.h b/plugins/lib-device-stm/mcu-headers.h similarity index 100% rename from src/libperipherals/mcu-headers.h rename to plugins/lib-device-stm/mcu-headers.h diff --git a/src/libperipherals/sensors.cpp b/plugins/lib-device-stm/sensors.cpp similarity index 100% rename from src/libperipherals/sensors.cpp rename to plugins/lib-device-stm/sensors.cpp diff --git a/src/libperipherals/sensors.h b/plugins/lib-device-stm/sensors.h similarity index 89% rename from src/libperipherals/sensors.h rename to plugins/lib-device-stm/sensors.h index 586ab0ff0..0aeb25b4b 100644 --- a/src/libperipherals/sensors.h +++ b/plugins/lib-device-stm/sensors.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,6 @@ #ifndef SENSORS_H #define SENSORS_H -#include "globals.h" +#include "jrt.h" #endif /* SENSORS_H */ diff --git a/src/libecmaobjects/ecma-alloc.cpp b/src/ecma/base/ecma-alloc.cpp similarity index 99% rename from src/libecmaobjects/ecma-alloc.cpp rename to src/ecma/base/ecma-alloc.cpp index e9f462074..fe3c7c096 100644 --- a/src/libecmaobjects/ecma-alloc.cpp +++ b/src/ecma/base/ecma-alloc.cpp @@ -17,7 +17,7 @@ #include "ecma-globals.h" #include "ecma-gc.h" #include "ecma-lcache.h" -#include "globals.h" +#include "jrt.h" #include "mem-poolman.h" JERRY_STATIC_ASSERT (sizeof (ecma_value_t) <= sizeof (uint16_t)); diff --git a/src/libecmaobjects/ecma-alloc.h b/src/ecma/base/ecma-alloc.h similarity index 100% rename from src/libecmaobjects/ecma-alloc.h rename to src/ecma/base/ecma-alloc.h diff --git a/src/libecmaobjects/ecma-gc.cpp b/src/ecma/base/ecma-gc.cpp similarity index 99% rename from src/libecmaobjects/ecma-gc.cpp rename to src/ecma/base/ecma-gc.cpp index 2689e5b36..0c9da22ea 100644 --- a/src/libecmaobjects/ecma-gc.cpp +++ b/src/ecma/base/ecma-gc.cpp @@ -30,7 +30,7 @@ #include "ecma-helpers.h" #include "ecma-lcache.h" #include "ecma-stack.h" -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include "jrt-bit-fields.h" diff --git a/src/libecmaobjects/ecma-gc.h b/src/ecma/base/ecma-gc.h similarity index 100% rename from src/libecmaobjects/ecma-gc.h rename to src/ecma/base/ecma-gc.h diff --git a/src/libecmaobjects/ecma-globals.h b/src/ecma/base/ecma-globals.h similarity index 99% rename from src/libecmaobjects/ecma-globals.h rename to src/ecma/base/ecma-globals.h index 5f7d78d8f..3bd610c56 100644 --- a/src/libecmaobjects/ecma-globals.h +++ b/src/ecma/base/ecma-globals.h @@ -24,7 +24,7 @@ #define JERRY_ECMA_GLOBALS_H #include "config.h" -#include "globals.h" +#include "jrt.h" #include "mem-allocator.h" /** \addtogroup compressedpointer Compressed pointer diff --git a/src/libecmaobjects/ecma-helpers-conversion.cpp b/src/ecma/base/ecma-helpers-conversion.cpp similarity index 100% rename from src/libecmaobjects/ecma-helpers-conversion.cpp rename to src/ecma/base/ecma-helpers-conversion.cpp diff --git a/src/libecmaobjects/ecma-helpers-number.cpp b/src/ecma/base/ecma-helpers-number.cpp similarity index 100% rename from src/libecmaobjects/ecma-helpers-number.cpp rename to src/ecma/base/ecma-helpers-number.cpp diff --git a/src/libecmaobjects/ecma-helpers-string.cpp b/src/ecma/base/ecma-helpers-string.cpp similarity index 99% rename from src/libecmaobjects/ecma-helpers-string.cpp rename to src/ecma/base/ecma-helpers-string.cpp index f84682c76..f5f9a3212 100644 --- a/src/libecmaobjects/ecma-helpers-string.cpp +++ b/src/ecma/base/ecma-helpers-string.cpp @@ -26,9 +26,9 @@ #include "ecma-globals.h" #include "ecma-helpers.h" #include "ecma-lcache.h" -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" -#include "interpreter.h" +#include "vm.h" /** * Maximum length of strings' concatenation diff --git a/src/libecmaobjects/ecma-helpers-value.cpp b/src/ecma/base/ecma-helpers-value.cpp similarity index 99% rename from src/libecmaobjects/ecma-helpers-value.cpp rename to src/ecma/base/ecma-helpers-value.cpp index 9847851de..e18688ba2 100644 --- a/src/libecmaobjects/ecma-helpers-value.cpp +++ b/src/ecma/base/ecma-helpers-value.cpp @@ -24,7 +24,7 @@ #include "ecma-gc.h" #include "ecma-globals.h" #include "ecma-helpers.h" -#include "globals.h" +#include "jrt.h" #include "jrt-bit-fields.h" JERRY_STATIC_ASSERT (sizeof (ecma_value_t) * JERRY_BITSINBYTE == ECMA_VALUE_SIZE); diff --git a/src/libecmaobjects/ecma-helpers-values-collection.cpp b/src/ecma/base/ecma-helpers-values-collection.cpp similarity index 99% rename from src/libecmaobjects/ecma-helpers-values-collection.cpp rename to src/ecma/base/ecma-helpers-values-collection.cpp index 40c39106f..21f8d8b76 100644 --- a/src/libecmaobjects/ecma-helpers-values-collection.cpp +++ b/src/ecma/base/ecma-helpers-values-collection.cpp @@ -23,7 +23,7 @@ #include "ecma-alloc.h" #include "ecma-globals.h" #include "ecma-helpers.h" -#include "globals.h" +#include "jrt.h" /** * Allocate a collection of ecma-values. diff --git a/src/libecmaobjects/ecma-helpers.cpp b/src/ecma/base/ecma-helpers.cpp similarity index 100% rename from src/libecmaobjects/ecma-helpers.cpp rename to src/ecma/base/ecma-helpers.cpp diff --git a/src/libecmaobjects/ecma-helpers.h b/src/ecma/base/ecma-helpers.h similarity index 100% rename from src/libecmaobjects/ecma-helpers.h rename to src/ecma/base/ecma-helpers.h diff --git a/src/libecmaobjects/ecma-lcache.cpp b/src/ecma/base/ecma-lcache.cpp similarity index 100% rename from src/libecmaobjects/ecma-lcache.cpp rename to src/ecma/base/ecma-lcache.cpp diff --git a/src/libecmaobjects/ecma-lcache.h b/src/ecma/base/ecma-lcache.h similarity index 100% rename from src/libecmaobjects/ecma-lcache.h rename to src/ecma/base/ecma-lcache.h diff --git a/src/libecmaobjects/ecma-magic-strings.inc.h b/src/ecma/base/ecma-magic-strings.inc.h similarity index 100% rename from src/libecmaobjects/ecma-magic-strings.inc.h rename to src/ecma/base/ecma-magic-strings.inc.h diff --git a/src/libecmaobjects/ecma-stack.cpp b/src/ecma/base/ecma-stack.cpp similarity index 100% rename from src/libecmaobjects/ecma-stack.cpp rename to src/ecma/base/ecma-stack.cpp diff --git a/src/libecmaobjects/ecma-stack.h b/src/ecma/base/ecma-stack.h similarity index 100% rename from src/libecmaobjects/ecma-stack.h rename to src/ecma/base/ecma-stack.h diff --git a/src/libecmabuiltins/ecma-builtin-array-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-array-prototype.cpp similarity index 98% rename from src/libecmabuiltins/ecma-builtin-array-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-array-prototype.cpp index 85231375c..31a1e92a3 100644 --- a/src/libecmabuiltins/ecma-builtin-array-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-array-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-array-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-array-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-array-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-array-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-array.cpp b/src/ecma/builtin-objects/ecma-builtin-array.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-array.cpp rename to src/ecma/builtin-objects/ecma-builtin-array.cpp index 29525d4c1..7ddbddfa5 100644 --- a/src/libecmabuiltins/ecma-builtin-array.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-array.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-array-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-array.inc.h b/src/ecma/builtin-objects/ecma-builtin-array.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-array.inc.h rename to src/ecma/builtin-objects/ecma-builtin-array.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-boolean-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-boolean-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp index d0efe1848..02e12b1de 100644 --- a/src/libecmabuiltins/ecma-builtin-boolean-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-boolean-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-boolean-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-boolean-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-boolean-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-boolean.cpp b/src/ecma/builtin-objects/ecma-builtin-boolean.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-boolean.cpp rename to src/ecma/builtin-objects/ecma-builtin-boolean.cpp index c3c65c6a9..ee2207d16 100644 --- a/src/libecmabuiltins/ecma-builtin-boolean.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-boolean.cpp @@ -23,7 +23,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-boolean.inc.h b/src/ecma/builtin-objects/ecma-builtin-boolean.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-boolean.inc.h rename to src/ecma/builtin-objects/ecma-builtin-boolean.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-compact-profile-error.cpp b/src/ecma/builtin-objects/ecma-builtin-compact-profile-error.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-compact-profile-error.cpp rename to src/ecma/builtin-objects/ecma-builtin-compact-profile-error.cpp index bb1375840..74de1a0f2 100644 --- a/src/libecmabuiltins/ecma-builtin-compact-profile-error.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-compact-profile-error.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifdef CONFIG_ECMA_COMPACT_PROFILE diff --git a/src/libecmabuiltins/ecma-builtin-compact-profile-error.inc.h b/src/ecma/builtin-objects/ecma-builtin-compact-profile-error.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-compact-profile-error.inc.h rename to src/ecma/builtin-objects/ecma-builtin-compact-profile-error.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-error-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-error-prototype.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-error-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-error-prototype.cpp index be6c7f16c..dc0035dd4 100644 --- a/src/libecmabuiltins/ecma-builtin-error-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-error-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-error-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-error-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-error-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-error-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-error.cpp b/src/ecma/builtin-objects/ecma-builtin-error.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-error.cpp rename to src/ecma/builtin-objects/ecma-builtin-error.cpp index 17e7b3368..6fac0d0c6 100644 --- a/src/libecmabuiltins/ecma-builtin-error.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-error.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-error.inc.h b/src/ecma/builtin-objects/ecma-builtin-error.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-error.inc.h rename to src/ecma/builtin-objects/ecma-builtin-error.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-evalerror-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-evalerror-prototype.cpp similarity index 94% rename from src/libecmabuiltins/ecma-builtin-evalerror-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-evalerror-prototype.cpp index a254400ee..2c9279383 100644 --- a/src/libecmabuiltins/ecma-builtin-evalerror-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-evalerror-prototype.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-evalerror-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-evalerror-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-evalerror-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-evalerror-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-evalerror.cpp b/src/ecma/builtin-objects/ecma-builtin-evalerror.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-evalerror.cpp rename to src/ecma/builtin-objects/ecma-builtin-evalerror.cpp index 61c3fdfc1..28461b4a0 100644 --- a/src/libecmabuiltins/ecma-builtin-evalerror.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-evalerror.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-evalerror.inc.h b/src/ecma/builtin-objects/ecma-builtin-evalerror.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-evalerror.inc.h rename to src/ecma/builtin-objects/ecma-builtin-evalerror.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-function-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-function-prototype.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-function-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-function-prototype.cpp index 1f6ede75e..24136a67d 100644 --- a/src/libecmabuiltins/ecma-builtin-function-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-function-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" diff --git a/src/libecmabuiltins/ecma-builtin-function-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-function-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-function-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-function.cpp b/src/ecma/builtin-objects/ecma-builtin-function.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-function.cpp rename to src/ecma/builtin-objects/ecma-builtin-function.cpp index 8e57e67d4..65308d23e 100644 --- a/src/libecmabuiltins/ecma-builtin-function.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-function.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-function-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" diff --git a/src/libecmabuiltins/ecma-builtin-function.inc.h b/src/ecma/builtin-objects/ecma-builtin-function.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-function.inc.h rename to src/ecma/builtin-objects/ecma-builtin-function.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-global.cpp b/src/ecma/builtin-objects/ecma-builtin-global.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-global.cpp rename to src/ecma/builtin-objects/ecma-builtin-global.cpp index 594d54175..13a70e59d 100644 --- a/src/libecmabuiltins/ecma-builtin-global.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-global.cpp @@ -20,7 +20,7 @@ #include "ecma-globals.h" #include "ecma-helpers.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" diff --git a/src/libecmabuiltins/ecma-builtin-global.inc.h b/src/ecma/builtin-objects/ecma-builtin-global.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-global.inc.h rename to src/ecma/builtin-objects/ecma-builtin-global.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-internal-routines-template.inc.h b/src/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-internal-routines-template.inc.h rename to src/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-math.cpp b/src/ecma/builtin-objects/ecma-builtin-math.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-math.cpp rename to src/ecma/builtin-objects/ecma-builtin-math.cpp index 701508822..ab3b0aed9 100644 --- a/src/libecmabuiltins/ecma-builtin-math.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-math.cpp @@ -24,7 +24,7 @@ #include "ecma-objects.h" #include "ecma-objects-general.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_MATH_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-math.inc.h b/src/ecma/builtin-objects/ecma-builtin-math.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-math.inc.h rename to src/ecma/builtin-objects/ecma-builtin-math.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-number-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-number-prototype.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-number-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-number-prototype.cpp index e5d15a178..5066c72d2 100644 --- a/src/libecmabuiltins/ecma-builtin-number-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-number-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-number-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-number-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-number-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-number-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-number.cpp b/src/ecma/builtin-objects/ecma-builtin-number.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-number.cpp rename to src/ecma/builtin-objects/ecma-builtin-number.cpp index edb63e393..de9e05f66 100644 --- a/src/libecmabuiltins/ecma-builtin-number.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-number.cpp @@ -23,7 +23,7 @@ #include "ecma-number-object.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-number.inc.h b/src/ecma/builtin-objects/ecma-builtin-number.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-number.inc.h rename to src/ecma/builtin-objects/ecma-builtin-number.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-object-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-object-prototype.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-object-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-object-prototype.cpp index 0cede0049..4b00b1be6 100644 --- a/src/libecmabuiltins/ecma-builtin-object-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-object-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" diff --git a/src/libecmabuiltins/ecma-builtin-object-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-object-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-object-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-object-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-object.cpp b/src/ecma/builtin-objects/ecma-builtin-object.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-object.cpp rename to src/ecma/builtin-objects/ecma-builtin-object.cpp index c377ee498..5a6b3ffb5 100644 --- a/src/libecmabuiltins/ecma-builtin-object.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-object.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-objects-general.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" diff --git a/src/libecmabuiltins/ecma-builtin-object.inc.h b/src/ecma/builtin-objects/ecma-builtin-object.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-object.inc.h rename to src/ecma/builtin-objects/ecma-builtin-object.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-rangeerror-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.cpp similarity index 94% rename from src/libecmabuiltins/ecma-builtin-rangeerror-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.cpp index 9c121481d..51bea876c 100644 --- a/src/libecmabuiltins/ecma-builtin-rangeerror-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-rangeerror-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-rangeerror-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-rangeerror.cpp b/src/ecma/builtin-objects/ecma-builtin-rangeerror.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-rangeerror.cpp rename to src/ecma/builtin-objects/ecma-builtin-rangeerror.cpp index 6dd7699e5..15fc350ae 100644 --- a/src/libecmabuiltins/ecma-builtin-rangeerror.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-rangeerror.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-rangeerror.inc.h b/src/ecma/builtin-objects/ecma-builtin-rangeerror.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-rangeerror.inc.h rename to src/ecma/builtin-objects/ecma-builtin-rangeerror.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-referenceerror-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.cpp similarity index 94% rename from src/libecmabuiltins/ecma-builtin-referenceerror-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.cpp index 20f584998..27a06624e 100644 --- a/src/libecmabuiltins/ecma-builtin-referenceerror-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-referenceerror-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-referenceerror-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-referenceerror.cpp b/src/ecma/builtin-objects/ecma-builtin-referenceerror.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-referenceerror.cpp rename to src/ecma/builtin-objects/ecma-builtin-referenceerror.cpp index 6e07adabb..bb271f497 100644 --- a/src/libecmabuiltins/ecma-builtin-referenceerror.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-referenceerror.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-referenceerror.inc.h b/src/ecma/builtin-objects/ecma-builtin-referenceerror.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-referenceerror.inc.h rename to src/ecma/builtin-objects/ecma-builtin-referenceerror.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-string-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-string-prototype.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-string-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-string-prototype.cpp index 385114f22..a74af209e 100644 --- a/src/libecmabuiltins/ecma-builtin-string-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-string-prototype.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-string-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-string-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-string-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-string.cpp b/src/ecma/builtin-objects/ecma-builtin-string.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-string.cpp rename to src/ecma/builtin-objects/ecma-builtin-string.cpp index f8bb6d387..1b7d9944a 100644 --- a/src/libecmabuiltins/ecma-builtin-string.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-string.cpp @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_STRING_BUILTIN diff --git a/src/libecmabuiltins/ecma-builtin-string.inc.h b/src/ecma/builtin-objects/ecma-builtin-string.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-string.inc.h rename to src/ecma/builtin-objects/ecma-builtin-string.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-syntaxerror-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.cpp similarity index 94% rename from src/libecmabuiltins/ecma-builtin-syntaxerror-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.cpp index e82c74051..f61853577 100644 --- a/src/libecmabuiltins/ecma-builtin-syntaxerror-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-syntaxerror-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-syntaxerror-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-syntaxerror.cpp b/src/ecma/builtin-objects/ecma-builtin-syntaxerror.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-syntaxerror.cpp rename to src/ecma/builtin-objects/ecma-builtin-syntaxerror.cpp index 41bce8499..1d262845a 100644 --- a/src/libecmabuiltins/ecma-builtin-syntaxerror.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-syntaxerror.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-syntaxerror.inc.h b/src/ecma/builtin-objects/ecma-builtin-syntaxerror.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-syntaxerror.inc.h rename to src/ecma/builtin-objects/ecma-builtin-syntaxerror.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-type-error-thrower.cpp b/src/ecma/builtin-objects/ecma-builtin-type-error-thrower.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-type-error-thrower.cpp rename to src/ecma/builtin-objects/ecma-builtin-type-error-thrower.cpp index c9b05213f..f18d0fd2a 100644 --- a/src/libecmabuiltins/ecma-builtin-type-error-thrower.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-type-error-thrower.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" diff --git a/src/libecmabuiltins/ecma-builtin-type-error-thrower.inc.h b/src/ecma/builtin-objects/ecma-builtin-type-error-thrower.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-type-error-thrower.inc.h rename to src/ecma/builtin-objects/ecma-builtin-type-error-thrower.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-typeerror-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-typeerror-prototype.cpp similarity index 94% rename from src/libecmabuiltins/ecma-builtin-typeerror-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-typeerror-prototype.cpp index baf3d9497..0619b544f 100644 --- a/src/libecmabuiltins/ecma-builtin-typeerror-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-typeerror-prototype.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-typeerror-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-typeerror-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-typeerror-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-typeerror-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-typeerror.cpp b/src/ecma/builtin-objects/ecma-builtin-typeerror.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-typeerror.cpp rename to src/ecma/builtin-objects/ecma-builtin-typeerror.cpp index cf855bf0c..521ee1723 100644 --- a/src/libecmabuiltins/ecma-builtin-typeerror.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-typeerror.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-typeerror.inc.h b/src/ecma/builtin-objects/ecma-builtin-typeerror.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-typeerror.inc.h rename to src/ecma/builtin-objects/ecma-builtin-typeerror.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-urierror-prototype.cpp b/src/ecma/builtin-objects/ecma-builtin-urierror-prototype.cpp similarity index 94% rename from src/libecmabuiltins/ecma-builtin-urierror-prototype.cpp rename to src/ecma/builtin-objects/ecma-builtin-urierror-prototype.cpp index 532c964ef..0d0cea2f1 100644 --- a/src/libecmabuiltins/ecma-builtin-urierror-prototype.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-urierror-prototype.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #include "ecma-objects.h" #include "ecma-string-object.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-urierror-prototype.inc.h b/src/ecma/builtin-objects/ecma-builtin-urierror-prototype.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-urierror-prototype.inc.h rename to src/ecma/builtin-objects/ecma-builtin-urierror-prototype.inc.h diff --git a/src/libecmabuiltins/ecma-builtin-urierror.cpp b/src/ecma/builtin-objects/ecma-builtin-urierror.cpp similarity index 99% rename from src/libecmabuiltins/ecma-builtin-urierror.cpp rename to src/ecma/builtin-objects/ecma-builtin-urierror.cpp index 5eb28f374..f1e7bb480 100644 --- a/src/libecmabuiltins/ecma-builtin-urierror.cpp +++ b/src/ecma/builtin-objects/ecma-builtin-urierror.cpp @@ -22,7 +22,7 @@ #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" #ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS diff --git a/src/libecmabuiltins/ecma-builtin-urierror.inc.h b/src/ecma/builtin-objects/ecma-builtin-urierror.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtin-urierror.inc.h rename to src/ecma/builtin-objects/ecma-builtin-urierror.inc.h diff --git a/src/libecmabuiltins/ecma-builtins-internal.h b/src/ecma/builtin-objects/ecma-builtins-internal.h similarity index 100% rename from src/libecmabuiltins/ecma-builtins-internal.h rename to src/ecma/builtin-objects/ecma-builtins-internal.h diff --git a/src/libecmabuiltins/ecma-builtins.cpp b/src/ecma/builtin-objects/ecma-builtins.cpp similarity index 100% rename from src/libecmabuiltins/ecma-builtins.cpp rename to src/ecma/builtin-objects/ecma-builtins.cpp diff --git a/src/libecmabuiltins/ecma-builtins.h b/src/ecma/builtin-objects/ecma-builtins.h similarity index 100% rename from src/libecmabuiltins/ecma-builtins.h rename to src/ecma/builtin-objects/ecma-builtins.h diff --git a/src/libecmabuiltins/ecma-builtins.inc.h b/src/ecma/builtin-objects/ecma-builtins.inc.h similarity index 100% rename from src/libecmabuiltins/ecma-builtins.inc.h rename to src/ecma/builtin-objects/ecma-builtins.inc.h diff --git a/src/libecmaoperations/ecma-array-object.cpp b/src/ecma/operations/ecma-array-object.cpp similarity index 100% rename from src/libecmaoperations/ecma-array-object.cpp rename to src/ecma/operations/ecma-array-object.cpp diff --git a/src/libecmaoperations/ecma-array-object.h b/src/ecma/operations/ecma-array-object.h similarity index 100% rename from src/libecmaoperations/ecma-array-object.h rename to src/ecma/operations/ecma-array-object.h diff --git a/src/libecmaoperations/ecma-boolean-object.cpp b/src/ecma/operations/ecma-boolean-object.cpp similarity index 100% rename from src/libecmaoperations/ecma-boolean-object.cpp rename to src/ecma/operations/ecma-boolean-object.cpp diff --git a/src/libecmaoperations/ecma-boolean-object.h b/src/ecma/operations/ecma-boolean-object.h similarity index 100% rename from src/libecmaoperations/ecma-boolean-object.h rename to src/ecma/operations/ecma-boolean-object.h diff --git a/src/libecmaoperations/ecma-comparison.cpp b/src/ecma/operations/ecma-comparison.cpp similarity index 99% rename from src/libecmaoperations/ecma-comparison.cpp rename to src/ecma/operations/ecma-comparison.cpp index 1e6106669..2ee0156d3 100644 --- a/src/libecmaoperations/ecma-comparison.cpp +++ b/src/ecma/operations/ecma-comparison.cpp @@ -17,7 +17,7 @@ #include "ecma-conversion.h" #include "ecma-globals.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-comparison.h b/src/ecma/operations/ecma-comparison.h similarity index 100% rename from src/libecmaoperations/ecma-comparison.h rename to src/ecma/operations/ecma-comparison.h diff --git a/src/libecmaoperations/ecma-conversion.cpp b/src/ecma/operations/ecma-conversion.cpp similarity index 100% rename from src/libecmaoperations/ecma-conversion.cpp rename to src/ecma/operations/ecma-conversion.cpp diff --git a/src/libecmaoperations/ecma-conversion.h b/src/ecma/operations/ecma-conversion.h similarity index 100% rename from src/libecmaoperations/ecma-conversion.h rename to src/ecma/operations/ecma-conversion.h diff --git a/src/libecmaoperations/ecma-exceptions.cpp b/src/ecma/operations/ecma-exceptions.cpp similarity index 99% rename from src/libecmaoperations/ecma-exceptions.cpp rename to src/ecma/operations/ecma-exceptions.cpp index 5f9622ed4..4fbe2ab6e 100644 --- a/src/libecmaoperations/ecma-exceptions.cpp +++ b/src/ecma/operations/ecma-exceptions.cpp @@ -18,7 +18,7 @@ #include "ecma-gc.h" #include "ecma-globals.h" #include "ecma-helpers.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-exceptions.h b/src/ecma/operations/ecma-exceptions.h similarity index 98% rename from src/libecmaoperations/ecma-exceptions.h rename to src/ecma/operations/ecma-exceptions.h index e97d382fb..b29ed14c7 100644 --- a/src/libecmaoperations/ecma-exceptions.h +++ b/src/ecma/operations/ecma-exceptions.h @@ -17,7 +17,7 @@ #define ECMA_EXCEPTIONS_H #include "ecma-globals.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-function-object.cpp b/src/ecma/operations/ecma-function-object.cpp similarity index 99% rename from src/libecmaoperations/ecma-function-object.cpp rename to src/ecma/operations/ecma-function-object.cpp index 39d059d46..765ce41fd 100644 --- a/src/libecmaoperations/ecma-function-object.cpp +++ b/src/ecma/operations/ecma-function-object.cpp @@ -24,7 +24,7 @@ #include "ecma-objects.h" #include "ecma-objects-general.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-function-object.h b/src/ecma/operations/ecma-function-object.h similarity index 98% rename from src/libecmaoperations/ecma-function-object.h rename to src/ecma/operations/ecma-function-object.h index 6885a48b2..78dd7b088 100644 --- a/src/libecmaoperations/ecma-function-object.h +++ b/src/ecma/operations/ecma-function-object.h @@ -17,7 +17,7 @@ #define ECMA_FUNCTION_OBJECT_H #include "ecma-globals.h" -#include "interpreter.h" +#include "vm.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-get-put-value.cpp b/src/ecma/operations/ecma-get-put-value.cpp similarity index 100% rename from src/libecmaoperations/ecma-get-put-value.cpp rename to src/ecma/operations/ecma-get-put-value.cpp diff --git a/src/libecmaoperations/ecma-init-finalize.cpp b/src/ecma/operations/ecma-init-finalize.cpp similarity index 100% rename from src/libecmaoperations/ecma-init-finalize.cpp rename to src/ecma/operations/ecma-init-finalize.cpp diff --git a/src/libecmaoperations/ecma-lex-env.cpp b/src/ecma/operations/ecma-lex-env.cpp similarity index 99% rename from src/libecmaoperations/ecma-lex-env.cpp rename to src/ecma/operations/ecma-lex-env.cpp index c51bba6b5..bf9509388 100644 --- a/src/libecmaoperations/ecma-lex-env.cpp +++ b/src/ecma/operations/ecma-lex-env.cpp @@ -20,7 +20,7 @@ #include "ecma-helpers.h" #include "ecma-lex-env.h" #include "ecma-objects.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-lex-env.h b/src/ecma/operations/ecma-lex-env.h similarity index 99% rename from src/libecmaoperations/ecma-lex-env.h rename to src/ecma/operations/ecma-lex-env.h index 3828c83a8..5b40f1aeb 100644 --- a/src/libecmaoperations/ecma-lex-env.h +++ b/src/ecma/operations/ecma-lex-env.h @@ -18,7 +18,7 @@ #include "ecma-globals.h" #include "ecma-reference.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-number-arithmetic.cpp b/src/ecma/operations/ecma-number-arithmetic.cpp similarity index 100% rename from src/libecmaoperations/ecma-number-arithmetic.cpp rename to src/ecma/operations/ecma-number-arithmetic.cpp diff --git a/src/libecmaoperations/ecma-number-arithmetic.h b/src/ecma/operations/ecma-number-arithmetic.h similarity index 100% rename from src/libecmaoperations/ecma-number-arithmetic.h rename to src/ecma/operations/ecma-number-arithmetic.h diff --git a/src/libecmaoperations/ecma-number-object.cpp b/src/ecma/operations/ecma-number-object.cpp similarity index 100% rename from src/libecmaoperations/ecma-number-object.cpp rename to src/ecma/operations/ecma-number-object.cpp diff --git a/src/libecmaoperations/ecma-number-object.h b/src/ecma/operations/ecma-number-object.h similarity index 100% rename from src/libecmaoperations/ecma-number-object.h rename to src/ecma/operations/ecma-number-object.h diff --git a/src/libecmaoperations/ecma-objects-arguments.cpp b/src/ecma/operations/ecma-objects-arguments.cpp similarity index 99% rename from src/libecmaoperations/ecma-objects-arguments.cpp rename to src/ecma/operations/ecma-objects-arguments.cpp index 808feecfa..5ffbb113f 100644 --- a/src/libecmaoperations/ecma-objects-arguments.cpp +++ b/src/ecma/operations/ecma-objects-arguments.cpp @@ -31,7 +31,7 @@ #include "ecma-objects-arguments.h" #include "ecma-objects-general.h" #include "ecma-try-catch-macro.h" -#include "globals.h" +#include "jrt.h" /** * Arguments object creation operation. diff --git a/src/libecmaoperations/ecma-objects-arguments.h b/src/ecma/operations/ecma-objects-arguments.h similarity index 100% rename from src/libecmaoperations/ecma-objects-arguments.h rename to src/ecma/operations/ecma-objects-arguments.h diff --git a/src/libecmaoperations/ecma-objects-general.cpp b/src/ecma/operations/ecma-objects-general.cpp similarity index 100% rename from src/libecmaoperations/ecma-objects-general.cpp rename to src/ecma/operations/ecma-objects-general.cpp diff --git a/src/libecmaoperations/ecma-objects-general.h b/src/ecma/operations/ecma-objects-general.h similarity index 100% rename from src/libecmaoperations/ecma-objects-general.h rename to src/ecma/operations/ecma-objects-general.h diff --git a/src/libecmaoperations/ecma-objects.cpp b/src/ecma/operations/ecma-objects.cpp similarity index 100% rename from src/libecmaoperations/ecma-objects.cpp rename to src/ecma/operations/ecma-objects.cpp diff --git a/src/libecmaoperations/ecma-objects.h b/src/ecma/operations/ecma-objects.h similarity index 100% rename from src/libecmaoperations/ecma-objects.h rename to src/ecma/operations/ecma-objects.h diff --git a/src/libecmaoperations/ecma-operations.h b/src/ecma/operations/ecma-operations.h similarity index 92% rename from src/libecmaoperations/ecma-operations.h rename to src/ecma/operations/ecma-operations.h index e5dbaa29d..492f967fe 100644 --- a/src/libecmaoperations/ecma-operations.h +++ b/src/ecma/operations/ecma-operations.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef JERRY_ECMA_OPERATIONS_H #define JERRY_ECMA_OPERATIONS_H -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-reference.cpp b/src/ecma/operations/ecma-reference.cpp similarity index 99% rename from src/libecmaoperations/ecma-reference.cpp rename to src/ecma/operations/ecma-reference.cpp index 3bf249354..904bb3b78 100644 --- a/src/libecmaoperations/ecma-reference.cpp +++ b/src/ecma/operations/ecma-reference.cpp @@ -18,7 +18,7 @@ #include "ecma-helpers.h" #include "ecma-lex-env.h" #include "ecma-reference.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-reference.h b/src/ecma/operations/ecma-reference.h similarity index 98% rename from src/libecmaoperations/ecma-reference.h rename to src/ecma/operations/ecma-reference.h index edb431c6e..33d7c2d60 100644 --- a/src/libecmaoperations/ecma-reference.h +++ b/src/ecma/operations/ecma-reference.h @@ -17,7 +17,7 @@ #define ECMA_REFERENCE_H #include "ecma-globals.h" -#include "globals.h" +#include "jrt.h" /** \addtogroup ecma ECMA * @{ diff --git a/src/libecmaoperations/ecma-string-object.cpp b/src/ecma/operations/ecma-string-object.cpp similarity index 100% rename from src/libecmaoperations/ecma-string-object.cpp rename to src/ecma/operations/ecma-string-object.cpp diff --git a/src/libecmaoperations/ecma-string-object.h b/src/ecma/operations/ecma-string-object.h similarity index 100% rename from src/libecmaoperations/ecma-string-object.h rename to src/ecma/operations/ecma-string-object.h diff --git a/src/libecmaoperations/ecma-try-catch-macro.h b/src/ecma/operations/ecma-try-catch-macro.h similarity index 100% rename from src/libecmaoperations/ecma-try-catch-macro.h rename to src/ecma/operations/ecma-try-catch-macro.h diff --git a/src/generated.h b/src/generated.h deleted file mode 100644 index 1f37c709e..000000000 --- a/src/generated.h +++ /dev/null @@ -1,2618 +0,0 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "globals.h" - -static char generated_source [] = -{ - 'v', - 'a', - 'r', - ' ', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ' ', - '=', - ' ', - '0', - ';', - 'v', - 'a', - 'r', - ' ', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ' ', - '=', - ' ', - '1', - ';', - 'v', - 'a', - 'r', - ' ', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ' ', - '=', - ' ', - '2', - ';', - 'v', - 'a', - 'r', - ' ', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ' ', - '=', - ' ', - '3', - ';', - ' ', - 'f', - 'u', - 'n', - 'c', - 't', - 'i', - 'o', - 'n', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'o', - 'u', - 'p', - ',', - ' ', - 'o', - 'n', - ')', - '{', - ' ', - ' ', - 'i', - 'f', - ' ', - '(', - 'o', - 'n', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'O', - 'n', - ' ', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'o', - 'u', - 'p', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'O', - 'n', - ' ', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'o', - 'u', - 'p', - ' ', - '+', - ' ', - '4', - ')', - ';', - ' ', - ' ', - '}', - ' ', - ' ', - 'e', - 'l', - 's', - 'e', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'O', - 'f', - 'f', - ' ', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'o', - 'u', - 'p', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'O', - 'f', - 'f', - ' ', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'o', - 'u', - 'p', - ' ', - '+', - ' ', - '4', - ')', - ';', - ' ', - ' ', - '}', - '}', - ' ', - 'v', - 'a', - 'r', - ' ', - 't', - 'm', - 'p', - ',', - ' ', - 'a', - ',', - ' ', - 'b', - ' ', - '=', - ' ', - '1', - ',', - ' ', - 'c', - ' ', - '=', - ' ', - '2', - ',', - ' ', - 'd', - ',', - ' ', - 'e', - ' ', - '=', - ' ', - '3', - ',', - ' ', - 'g', - ' ', - '=', - ' ', - '4', - ';', - ' ', - 'v', - 'a', - 'r', - ' ', - 'c', - 'o', - 'u', - 'n', - 't', - ' ', - '=', - ' ', - '1', - '0', - '0', - '0', - ';', - ' ', - 't', - 'm', - 'p', - ' ', - '=', - ' ', - 'b', - ' ', - '*', - ' ', - 'c', - ';', - 'a', - ' ', - '=', - ' ', - 't', - 'm', - 'p', - ' ', - '+', - ' ', - 'g', - ';', - 'd', - ' ', - '=', - ' ', - 't', - 'm', - 'p', - ' ', - '*', - ' ', - 'e', - ' ', - '+', - ' ', - 'a', - ';', - ' ', - 'v', - 'a', - 'r', - ' ', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '=', - ' ', - '6', - '0', - ';', - 'v', - 'a', - 'r', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ' ', - '=', - ' ', - '1', - '0', - ';', - ' ', - 'w', - 'h', - 'i', - 'l', - 'e', - ' ', - '(', - '1', - ')', - '{', - ' ', - ' ', - 'f', - 'o', - 'r', - ' ', - '(', - 'v', - 'a', - 'r', - ' ', - 'j', - ' ', - '=', - ' ', - '0', - ';', - ' ', - 'j', - ' ', - '<', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ';', - ' ', - 'j', - ' ', - '+', - '=', - ' ', - '1', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '*', - ' ', - '2', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '*', - ' ', - '2', - ')', - ';', - ' ', - ' ', - '}', - ' ', - ' ', - ' ', - 'f', - 'o', - 'r', - ' ', - '(', - 'v', - 'a', - 'r', - ' ', - 'j', - ' ', - '=', - ' ', - '0', - ';', - ' ', - 'j', - ' ', - '<', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ';', - ' ', - 'j', - ' ', - '+', - '=', - ' ', - '1', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - '}', - ' ', - ' ', - ' ', - 'f', - 'o', - 'r', - ' ', - '(', - 'v', - 'a', - 'r', - ' ', - 'j', - ' ', - '=', - ' ', - '0', - ';', - ' ', - 'j', - ' ', - '<', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ';', - ' ', - 'j', - ' ', - '+', - '=', - ' ', - '1', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - '}', - ' ', - ' ', - ' ', - 'f', - 'o', - 'r', - ' ', - '(', - 'v', - 'a', - 'r', - ' ', - 'j', - ' ', - '=', - ' ', - '0', - ';', - ' ', - 'j', - ' ', - '<', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ';', - ' ', - 'j', - ' ', - '+', - '=', - ' ', - '1', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '2', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '2', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '2', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '2', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - '}', - ' ', - ' ', - ' ', - 'f', - 'o', - 'r', - ' ', - '(', - 'v', - 'a', - 'r', - ' ', - 'j', - ' ', - '=', - ' ', - '0', - ';', - ' ', - 'j', - ' ', - '<', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ';', - ' ', - 'j', - ' ', - '+', - '=', - ' ', - '1', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '3', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '3', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '3', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '3', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - '}', - ' ', - ' ', - ' ', - 'f', - 'o', - 'r', - ' ', - '(', - 'v', - 'a', - 'r', - ' ', - 'j', - ' ', - '=', - ' ', - '0', - ';', - ' ', - 'j', - ' ', - '<', - ' ', - 'n', - 'u', - 'm', - 'O', - 'f', - 'I', - 't', - 'e', - 'r', - 'a', - 't', - 'i', - 'o', - 'n', - 's', - ';', - ' ', - 'j', - ' ', - '+', - '=', - ' ', - '1', - ')', - ' ', - ' ', - '{', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '6', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'g', - 'r', - 'e', - 'e', - 'n', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '6', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'o', - 'r', - 'a', - 'n', - 'g', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '6', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'r', - 'e', - 'd', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 't', - 'r', - 'u', - 'e', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'w', - 'a', - 'i', - 't', - '(', - 'w', - 'a', - 'i', - 't', - 'T', - 'i', - 'm', - 'e', - ' ', - '/', - ' ', - '6', - ')', - ';', - ' ', - ' ', - ' ', - ' ', - 'L', - 'E', - 'D', - 'S', - 'e', - 't', - '(', - 'l', - 'e', - 'd', - '_', - 'b', - 'l', - 'u', - 'e', - ',', - ' ', - 'f', - 'a', - 'l', - 's', - 'e', - ')', - ';', - ' ', - ' ', - '}', - '}', - 0 -}; diff --git a/src/libruntime/jerry-exit.cpp b/src/jrt/jerry-exit.cpp similarity index 97% rename from src/libruntime/jerry-exit.cpp rename to src/jrt/jerry-exit.cpp index 02174bf28..f011ab9c1 100644 --- a/src/libruntime/jerry-exit.cpp +++ b/src/jrt/jerry-exit.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * Implementation of exit with specified status code. */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" /* diff --git a/src/libruntime/jerry-libc-printf.cpp b/src/jrt/jerry-libc-printf.cpp similarity index 99% rename from src/libruntime/jerry-libc-printf.cpp rename to src/jrt/jerry-libc-printf.cpp index 8fe0331d8..ea7c56032 100644 --- a/src/libruntime/jerry-libc-printf.cpp +++ b/src/jrt/jerry-libc-printf.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ * Jerry printf implementation */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include diff --git a/src/libruntime/jerry-libc.cpp b/src/jrt/jerry-libc.cpp similarity index 100% rename from src/libruntime/jerry-libc.cpp rename to src/jrt/jerry-libc.cpp diff --git a/src/libruntime/jerry-libc.h b/src/jrt/jerry-libc.h similarity index 99% rename from src/libruntime/jerry-libc.h rename to src/jrt/jerry-libc.h index 1c693fe82..b88784583 100644 --- a/src/libruntime/jerry-libc.h +++ b/src/jrt/jerry-libc.h @@ -19,7 +19,7 @@ #ifndef JERRY_LIBC_H #define JERRY_LIBC_H -#include "globals.h" +#include "jrt.h" typedef void _FILE; diff --git a/src/libruntime/jrt-bit-fields.cpp b/src/jrt/jrt-bit-fields.cpp similarity index 97% rename from src/libruntime/jrt-bit-fields.cpp rename to src/jrt/jrt-bit-fields.cpp index 7ae4d2079..37bb678d4 100644 --- a/src/libruntime/jrt-bit-fields.cpp +++ b/src/jrt/jrt-bit-fields.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "jrt-bit-fields.h" /** diff --git a/src/libruntime/jrt-bit-fields.h b/src/jrt/jrt-bit-fields.h similarity index 100% rename from src/libruntime/jrt-bit-fields.h rename to src/jrt/jrt-bit-fields.h diff --git a/src/globals.h b/src/jrt/jrt.h similarity index 100% rename from src/globals.h rename to src/jrt/jrt.h diff --git a/src/libruntime/target/linux/asm_arm.h b/src/jrt/target/linux/asm_arm.h similarity index 100% rename from src/libruntime/target/linux/asm_arm.h rename to src/jrt/target/linux/asm_arm.h diff --git a/src/libruntime/target/linux/asm_x64.h b/src/jrt/target/linux/asm_x64.h similarity index 100% rename from src/libruntime/target/linux/asm_x64.h rename to src/jrt/target/linux/asm_x64.h diff --git a/src/libruntime/target/linux/asm_x86.h b/src/jrt/target/linux/asm_x86.h similarity index 100% rename from src/libruntime/target/linux/asm_x86.h rename to src/jrt/target/linux/asm_x86.h diff --git a/src/libruntime/target/linux/jerry-asm.S b/src/jrt/target/linux/jerry-asm.S similarity index 100% rename from src/libruntime/target/linux/jerry-asm.S rename to src/jrt/target/linux/jerry-asm.S diff --git a/src/libruntime/target/linux/jerry-assert.cpp b/src/jrt/target/linux/jerry-assert.cpp similarity index 97% rename from src/libruntime/target/linux/jerry-assert.cpp rename to src/jrt/target/linux/jerry-assert.cpp index 3141a5dec..c806d4bc3 100644 --- a/src/libruntime/target/linux/jerry-assert.cpp +++ b/src/jrt/target/linux/jerry-assert.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" /** diff --git a/src/libruntime/target/linux/jerry-libc.cpp b/src/jrt/target/linux/jerry-libc.cpp similarity index 99% rename from src/libruntime/target/linux/jerry-libc.cpp rename to src/jrt/target/linux/jerry-libc.cpp index 664fa6f4e..d9d5d8f3c 100644 --- a/src/libruntime/target/linux/jerry-libc.cpp +++ b/src/jrt/target/linux/jerry-libc.cpp @@ -17,7 +17,7 @@ * Jerry libc platform-specific functions linux implementation */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include diff --git a/src/libruntime/target/stm32f3/abi.S b/src/jrt/target/stm32f3/abi.S similarity index 100% rename from src/libruntime/target/stm32f3/abi.S rename to src/jrt/target/stm32f3/abi.S diff --git a/src/libruntime/target/stm32f4/jerry-assert.cpp b/src/jrt/target/stm32f3/jerry-assert.cpp similarity index 96% rename from src/libruntime/target/stm32f4/jerry-assert.cpp rename to src/jrt/target/stm32f3/jerry-assert.cpp index a986cda97..eed6a3f9c 100644 --- a/src/libruntime/target/stm32f4/jerry-assert.cpp +++ b/src/jrt/target/stm32f3/jerry-assert.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" /** diff --git a/src/libruntime/target/stm32f3/jerry-libc.cpp b/src/jrt/target/stm32f3/jerry-libc.cpp similarity index 100% rename from src/libruntime/target/stm32f3/jerry-libc.cpp rename to src/jrt/target/stm32f3/jerry-libc.cpp diff --git a/src/libruntime/target/stm32f4/abi.S b/src/jrt/target/stm32f4/abi.S similarity index 100% rename from src/libruntime/target/stm32f4/abi.S rename to src/jrt/target/stm32f4/abi.S diff --git a/src/libruntime/target/stm32f3/jerry-assert.cpp b/src/jrt/target/stm32f4/jerry-assert.cpp similarity index 96% rename from src/libruntime/target/stm32f3/jerry-assert.cpp rename to src/jrt/target/stm32f4/jerry-assert.cpp index a986cda97..eed6a3f9c 100644 --- a/src/libruntime/target/stm32f3/jerry-assert.cpp +++ b/src/jrt/target/stm32f4/jerry-assert.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" /** diff --git a/src/libruntime/target/stm32f4/jerry-libc.cpp b/src/jrt/target/stm32f4/jerry-libc.cpp similarity index 100% rename from src/libruntime/target/stm32f4/jerry-libc.cpp rename to src/jrt/target/stm32f4/jerry-libc.cpp diff --git a/src/main.cpp b/src/main.cpp index 5d09ba809..ef4e8079f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,11 +17,14 @@ #include "common-io.h" #include "actuators.h" #include "sensors.h" -#include "generated.h" + +#include JERRY_MCU_SCRIPT_HEADER +static const char generated_source [] = JERRY_MCU_SCRIPT; + #endif -#include "globals.h" -#include "interpreter.h" +#include "jrt.h" +#include "vm.h" #include "jerry-libc.h" #include "lexer.h" #include "parser.h" diff --git a/src/liballocator/mem-allocator-internal.h b/src/mem/mem-allocator-internal.h similarity index 100% rename from src/liballocator/mem-allocator-internal.h rename to src/mem/mem-allocator-internal.h diff --git a/src/liballocator/mem-allocator.cpp b/src/mem/mem-allocator.cpp similarity index 99% rename from src/liballocator/mem-allocator.cpp rename to src/mem/mem-allocator.cpp index c1a1cb559..09e2b5d50 100644 --- a/src/liballocator/mem-allocator.cpp +++ b/src/mem/mem-allocator.cpp @@ -17,7 +17,7 @@ * Allocator implementation */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include "mem-allocator.h" #include "mem-heap.h" diff --git a/src/liballocator/mem-allocator.h b/src/mem/mem-allocator.h similarity index 97% rename from src/liballocator/mem-allocator.h rename to src/mem/mem-allocator.h index b8b036b2f..d9fb5ab12 100644 --- a/src/liballocator/mem-allocator.h +++ b/src/mem/mem-allocator.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ #ifndef JERRY_MEM_ALLOCATOR_H #define JERRY_MEM_ALLOCATOR_H -#include "globals.h" +#include "jrt.h" #include "mem-config.h" #include "mem-heap.h" #include "mem-poolman.h" diff --git a/src/liballocator/mem-config.h b/src/mem/mem-config.h similarity index 100% rename from src/liballocator/mem-config.h rename to src/mem/mem-config.h diff --git a/src/liballocator/mem-heap.cpp b/src/mem/mem-heap.cpp similarity index 99% rename from src/liballocator/mem-heap.cpp rename to src/mem/mem-heap.cpp index 2e6244b53..c4ab6df11 100644 --- a/src/liballocator/mem-heap.cpp +++ b/src/mem/mem-heap.cpp @@ -24,7 +24,7 @@ * Heap implementation */ -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include "mem-allocator.h" #include "mem-config.h" diff --git a/src/liballocator/mem-heap.h b/src/mem/mem-heap.h similarity index 99% rename from src/liballocator/mem-heap.h rename to src/mem/mem-heap.h index a1e78651f..37f398401 100644 --- a/src/liballocator/mem-heap.h +++ b/src/mem/mem-heap.h @@ -26,7 +26,7 @@ #ifndef JERRY_MEM_HEAP_H #define JERRY_MEM_HEAP_H -#include "globals.h" +#include "jrt.h" /** * Type of allocation (argument of mem_Alloc) diff --git a/src/liballocator/mem-pool.cpp b/src/mem/mem-pool.cpp similarity index 99% rename from src/liballocator/mem-pool.cpp rename to src/mem/mem-pool.cpp index 09d127582..f0f804723 100644 --- a/src/liballocator/mem-pool.cpp +++ b/src/mem/mem-pool.cpp @@ -26,7 +26,7 @@ #define JERRY_MEM_POOL_INTERNAL -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include "mem-allocator.h" #include "mem-pool.h" diff --git a/src/liballocator/mem-pool.h b/src/mem/mem-pool.h similarity index 100% rename from src/liballocator/mem-pool.h rename to src/mem/mem-pool.h diff --git a/src/liballocator/mem-poolman.cpp b/src/mem/mem-poolman.cpp similarity index 99% rename from src/liballocator/mem-poolman.cpp rename to src/mem/mem-poolman.cpp index 233330c1a..e94958d1b 100644 --- a/src/liballocator/mem-poolman.cpp +++ b/src/mem/mem-poolman.cpp @@ -26,7 +26,7 @@ #define JERRY_MEM_POOL_INTERNAL -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include "mem-allocator.h" #include "mem-heap.h" diff --git a/src/liballocator/mem-poolman.h b/src/mem/mem-poolman.h similarity index 95% rename from src/liballocator/mem-poolman.h rename to src/mem/mem-poolman.h index 15b380a77..1df452b65 100644 --- a/src/liballocator/mem-poolman.h +++ b/src/mem/mem-poolman.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ #ifndef JERRY_MEM_POOLMAN_H #define JERRY_MEM_POOLMAN_H -#include "globals.h" +#include "jrt.h" extern void mem_pools_init (void); extern void mem_pools_finalize (void); diff --git a/src/libintstructs/array-list.cpp b/src/parser/collections/array-list.cpp similarity index 100% rename from src/libintstructs/array-list.cpp rename to src/parser/collections/array-list.cpp diff --git a/src/libintstructs/array-list.h b/src/parser/collections/array-list.h similarity index 94% rename from src/libintstructs/array-list.h rename to src/parser/collections/array-list.h index 2623f322f..e65df8da2 100644 --- a/src/libintstructs/array-list.h +++ b/src/parser/collections/array-list.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef ARRAY_LIST_H #define ARRAY_LIST_H -#include "globals.h" +#include "jrt.h" typedef uint8_t* array_list; #define null_list NULL diff --git a/src/libintstructs/hash-table.cpp b/src/parser/collections/hash-table.cpp similarity index 100% rename from src/libintstructs/hash-table.cpp rename to src/parser/collections/hash-table.cpp diff --git a/src/libintstructs/hash-table.h b/src/parser/collections/hash-table.h similarity index 100% rename from src/libintstructs/hash-table.h rename to src/parser/collections/hash-table.h diff --git a/src/libintstructs/linked-list.cpp b/src/parser/collections/linked-list.cpp similarity index 99% rename from src/libintstructs/linked-list.cpp rename to src/parser/collections/linked-list.cpp index 453485adf..de14c42ae 100644 --- a/src/libintstructs/linked-list.cpp +++ b/src/parser/collections/linked-list.cpp @@ -15,7 +15,7 @@ #include "linked-list.h" #include "jerry-libc.h" -#include "globals.h" +#include "jrt.h" #include "mem-heap.h" #include "lp-string.h" diff --git a/src/libintstructs/linked-list.h b/src/parser/collections/linked-list.h similarity index 92% rename from src/libintstructs/linked-list.h rename to src/parser/collections/linked-list.h index 2bde37e5f..4147307e4 100644 --- a/src/libintstructs/linked-list.h +++ b/src/parser/collections/linked-list.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef LINKED_LIST_H #define LINKED_LIST_H -#include "globals.h" +#include "jrt.h" typedef uint8_t* linked_list; #define null_list NULL diff --git a/src/liboptimizer/lit-id-hash-table.cpp b/src/parser/collections/lit-id-hash-table.cpp similarity index 100% rename from src/liboptimizer/lit-id-hash-table.cpp rename to src/parser/collections/lit-id-hash-table.cpp diff --git a/src/liboptimizer/lit-id-hash-table.h b/src/parser/collections/lit-id-hash-table.h similarity index 94% rename from src/liboptimizer/lit-id-hash-table.h rename to src/parser/collections/lit-id-hash-table.h index 53a99a729..73d268d81 100644 --- a/src/liboptimizer/lit-id-hash-table.h +++ b/src/parser/collections/lit-id-hash-table.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef LIT_ID_HASH_TABLE #define LIT_ID_HASH_TABLE -#include "globals.h" +#include "jrt.h" #include "ecma-globals.h" #include "opcodes.h" diff --git a/src/libintstructs/literal.cpp b/src/parser/collections/literal.cpp similarity index 100% rename from src/libintstructs/literal.cpp rename to src/parser/collections/literal.cpp diff --git a/src/libintstructs/literal.h b/src/parser/collections/literal.h similarity index 100% rename from src/libintstructs/literal.h rename to src/parser/collections/literal.h diff --git a/src/libintstructs/lp-string.cpp b/src/parser/collections/lp-string.cpp similarity index 100% rename from src/libintstructs/lp-string.cpp rename to src/parser/collections/lp-string.cpp diff --git a/src/libintstructs/lp-string.h b/src/parser/collections/lp-string.h similarity index 100% rename from src/libintstructs/lp-string.h rename to src/parser/collections/lp-string.h diff --git a/src/libintstructs/stack.h b/src/parser/collections/stack.h similarity index 100% rename from src/libintstructs/stack.h rename to src/parser/collections/stack.h diff --git a/src/libintstructs/tree.h b/src/parser/collections/tree.h similarity index 100% rename from src/libintstructs/tree.h rename to src/parser/collections/tree.h diff --git a/docs/links.txt b/src/parser/js.new similarity index 100% rename from docs/links.txt rename to src/parser/js.new diff --git a/src/liboptimizer/bytecode-data.h b/src/parser/js/bytecode-data.h similarity index 100% rename from src/liboptimizer/bytecode-data.h rename to src/parser/js/bytecode-data.h diff --git a/src/liboptimizer/deserializer.cpp b/src/parser/js/deserializer.cpp similarity index 100% rename from src/liboptimizer/deserializer.cpp rename to src/parser/js/deserializer.cpp diff --git a/src/liboptimizer/deserializer.h b/src/parser/js/deserializer.h similarity index 94% rename from src/liboptimizer/deserializer.h rename to src/parser/js/deserializer.h index 6541796c6..9fbb32fb0 100644 --- a/src/liboptimizer/deserializer.h +++ b/src/parser/js/deserializer.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef DESERIALIZER_H #define DESERIALIZER_H -#include "globals.h" +#include "jrt.h" #include "ecma-globals.h" #include "opcodes.h" #include "scopes-tree.h" diff --git a/src/libjsparser/lexer.cpp b/src/parser/js/lexer.cpp similarity index 100% rename from src/libjsparser/lexer.cpp rename to src/parser/js/lexer.cpp diff --git a/src/libjsparser/lexer.h b/src/parser/js/lexer.h similarity index 98% rename from src/libjsparser/lexer.h rename to src/parser/js/lexer.h index 6ff88a7c3..e022d8607 100644 --- a/src/libjsparser/lexer.h +++ b/src/parser/js/lexer.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef LEXER_H #define LEXER_H -#include "globals.h" +#include "jrt.h" #include "ecma-globals.h" #include "literal.h" #include "opcodes.h" diff --git a/src/libjsparser/opcodes-dumper.cpp b/src/parser/js/opcodes-dumper.cpp similarity index 99% rename from src/libjsparser/opcodes-dumper.cpp rename to src/parser/js/opcodes-dumper.cpp index 1f2272d8c..e4f13d03d 100644 --- a/src/libjsparser/opcodes-dumper.cpp +++ b/src/parser/js/opcodes-dumper.cpp @@ -16,7 +16,7 @@ #include "opcodes-dumper.h" #include "serializer.h" #include "deserializer.h" -#include "globals.h" +#include "jrt.h" #include "lexer.h" #include "stack.h" #include "syntax-errors.h" diff --git a/src/libjsparser/opcodes-dumper.h b/src/parser/js/opcodes-dumper.h similarity index 100% rename from src/libjsparser/opcodes-dumper.h rename to src/parser/js/opcodes-dumper.h diff --git a/src/liboptimizer/optimizer-passes.cpp b/src/parser/js/optimizer-passes.cpp similarity index 100% rename from src/liboptimizer/optimizer-passes.cpp rename to src/parser/js/optimizer-passes.cpp diff --git a/src/liboptimizer/optimizer-passes.h b/src/parser/js/optimizer-passes.h similarity index 91% rename from src/liboptimizer/optimizer-passes.h rename to src/parser/js/optimizer-passes.h index 8534ab214..1adcdd6ae 100644 --- a/src/liboptimizer/optimizer-passes.h +++ b/src/parser/js/optimizer-passes.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef OPTIMIZER_PASSES_H #define OPTIMIZER_PASSES_H -#include "globals.h" +#include "jrt.h" #include "opcodes.h" void optimizer_run_passes (opcode_t *); diff --git a/src/libjsparser/parser.cpp b/src/parser/js/parser.cpp similarity index 99% rename from src/libjsparser/parser.cpp rename to src/parser/js/parser.cpp index f4e5d3e43..357eef5bb 100644 --- a/src/libjsparser/parser.cpp +++ b/src/parser/js/parser.cpp @@ -18,7 +18,7 @@ #include "parser.h" #include "opcodes.h" #include "serializer.h" -#include "interpreter.h" +#include "vm.h" #include "stack.h" #include "hash-table.h" #include "deserializer.h" diff --git a/src/libjsparser/parser.h b/src/parser/js/parser.h similarity index 91% rename from src/libjsparser/parser.h rename to src/parser/js/parser.h index 16ca1e4d0..c0cb0ec7b 100644 --- a/src/libjsparser/parser.h +++ b/src/parser/js/parser.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ #ifndef PARSER_H #define PARSER_H -#include "globals.h" +#include "jrt.h" void parser_init (const char *, size_t, bool); void parser_parse_program (void); diff --git a/src/libjsparser/scopes-tree.cpp b/src/parser/js/scopes-tree.cpp similarity index 100% rename from src/libjsparser/scopes-tree.cpp rename to src/parser/js/scopes-tree.cpp diff --git a/src/libjsparser/scopes-tree.h b/src/parser/js/scopes-tree.h similarity index 100% rename from src/libjsparser/scopes-tree.h rename to src/parser/js/scopes-tree.h diff --git a/src/liboptimizer/serializer.cpp b/src/parser/js/serializer.cpp similarity index 99% rename from src/liboptimizer/serializer.cpp rename to src/parser/js/serializer.cpp index f1d328bcc..dae306faf 100644 --- a/src/liboptimizer/serializer.cpp +++ b/src/parser/js/serializer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "serializer.h" #include "parser.h" #include "jerry-libc.h" diff --git a/src/liboptimizer/serializer.h b/src/parser/js/serializer.h similarity index 93% rename from src/liboptimizer/serializer.h rename to src/parser/js/serializer.h index f42068111..214c45250 100644 --- a/src/liboptimizer/serializer.h +++ b/src/parser/js/serializer.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,10 @@ #ifndef SERIALIZER_H #define SERIALIZER_H -#include "globals.h" +#include "jrt.h" #include "ecma-globals.h" #include "opcodes.h" -#include "interpreter.h" +#include "vm.h" #include "literal.h" #include "scopes-tree.h" diff --git a/src/libjsparser/syntax-errors.cpp b/src/parser/js/syntax-errors.cpp similarity index 99% rename from src/libjsparser/syntax-errors.cpp rename to src/parser/js/syntax-errors.cpp index d8f26e1d2..914c39b70 100644 --- a/src/libjsparser/syntax-errors.cpp +++ b/src/parser/js/syntax-errors.cpp @@ -15,7 +15,7 @@ #include "syntax-errors.h" #include "stack.h" -#include "globals.h" +#include "jrt.h" #include "parser.h" #include "jerry-libc.h" #include "ecma-helpers.h" diff --git a/src/libjsparser/syntax-errors.h b/src/parser/js/syntax-errors.h similarity index 100% rename from src/libjsparser/syntax-errors.h rename to src/parser/js/syntax-errors.h diff --git a/src/libcoreint/opcodes-agnostic.cpp b/src/vm/opcodes-agnostic.cpp similarity index 100% rename from src/libcoreint/opcodes-agnostic.cpp rename to src/vm/opcodes-agnostic.cpp diff --git a/src/libcoreint/opcodes-ecma-arithmetics.cpp b/src/vm/opcodes-ecma-arithmetics.cpp similarity index 100% rename from src/libcoreint/opcodes-ecma-arithmetics.cpp rename to src/vm/opcodes-ecma-arithmetics.cpp diff --git a/src/libcoreint/opcodes-ecma-bitwise.cpp b/src/vm/opcodes-ecma-bitwise.cpp similarity index 100% rename from src/libcoreint/opcodes-ecma-bitwise.cpp rename to src/vm/opcodes-ecma-bitwise.cpp diff --git a/src/libcoreint/opcodes-ecma-equality.cpp b/src/vm/opcodes-ecma-equality.cpp similarity index 100% rename from src/libcoreint/opcodes-ecma-equality.cpp rename to src/vm/opcodes-ecma-equality.cpp diff --git a/src/libcoreint/opcodes-ecma-relational.cpp b/src/vm/opcodes-ecma-relational.cpp similarity index 100% rename from src/libcoreint/opcodes-ecma-relational.cpp rename to src/vm/opcodes-ecma-relational.cpp diff --git a/src/libcoreint/opcodes-ecma-support.h b/src/vm/opcodes-ecma-support.h similarity index 100% rename from src/libcoreint/opcodes-ecma-support.h rename to src/vm/opcodes-ecma-support.h diff --git a/src/libcoreint/opcodes-ecma-try-catch-finally.cpp b/src/vm/opcodes-ecma-try-catch-finally.cpp similarity index 99% rename from src/libcoreint/opcodes-ecma-try-catch-finally.cpp rename to src/vm/opcodes-ecma-try-catch-finally.cpp index ba3770498..594273c68 100644 --- a/src/libcoreint/opcodes-ecma-try-catch-finally.cpp +++ b/src/vm/opcodes-ecma-try-catch-finally.cpp @@ -13,8 +13,8 @@ * limitations under the License. */ -#include "globals.h" -#include "interpreter.h" +#include "jrt.h" +#include "vm.h" #include "opcodes.h" #include "opcodes-ecma-support.h" diff --git a/src/libcoreint/opcodes-helpers-variables.cpp b/src/vm/opcodes-helpers-variables.cpp similarity index 100% rename from src/libcoreint/opcodes-helpers-variables.cpp rename to src/vm/opcodes-helpers-variables.cpp diff --git a/src/libcoreint/opcodes-native-call.cpp b/src/vm/opcodes-native-call.cpp similarity index 99% rename from src/libcoreint/opcodes-native-call.cpp rename to src/vm/opcodes-native-call.cpp index 80a7852e8..80b51cbc4 100644 --- a/src/libcoreint/opcodes-native-call.cpp +++ b/src/vm/opcodes-native-call.cpp @@ -15,8 +15,8 @@ #include "opcodes-ecma-support.h" -#include "globals.h" -#include "interpreter.h" +#include "jrt.h" +#include "vm.h" #include "opcodes.h" #include "opcodes-native-call.h" diff --git a/src/libcoreint/opcodes-native-call.h b/src/vm/opcodes-native-call.h similarity index 100% rename from src/libcoreint/opcodes-native-call.h rename to src/vm/opcodes-native-call.h diff --git a/src/libcoreint/opcodes-varg.cpp b/src/vm/opcodes-varg.cpp similarity index 98% rename from src/libcoreint/opcodes-varg.cpp rename to src/vm/opcodes-varg.cpp index 6f0c78366..61f8fd4f0 100644 --- a/src/libcoreint/opcodes-varg.cpp +++ b/src/vm/opcodes-varg.cpp @@ -15,8 +15,8 @@ #include "opcodes-ecma-support.h" -#include "globals.h" -#include "interpreter.h" +#include "jrt.h" +#include "vm.h" #include "opcodes.h" /** diff --git a/src/libcoreint/opcodes.cpp b/src/vm/opcodes.cpp similarity index 99% rename from src/libcoreint/opcodes.cpp rename to src/vm/opcodes.cpp index fe748344d..acc5bda56 100644 --- a/src/libcoreint/opcodes.cpp +++ b/src/vm/opcodes.cpp @@ -14,8 +14,8 @@ */ #include "deserializer.h" -#include "globals.h" -#include "interpreter.h" +#include "jrt.h" +#include "vm.h" #include "opcodes.h" #include "opcodes-ecma-support.h" diff --git a/src/libcoreint/opcodes.h b/src/vm/opcodes.h similarity index 99% rename from src/libcoreint/opcodes.h rename to src/vm/opcodes.h index 88aa1a0d4..5e8d58a6d 100644 --- a/src/libcoreint/opcodes.h +++ b/src/vm/opcodes.h @@ -18,7 +18,7 @@ #include "ecma-globals.h" #include "ecma-stack.h" -#include "globals.h" +#include "jrt.h" /* Maximum opcodes number in bytecode. */ #define MAX_OPCODES (256*256 - 1) diff --git a/src/liboptimizer/pretty-printer.cpp b/src/vm/pretty-printer.cpp similarity index 99% rename from src/liboptimizer/pretty-printer.cpp rename to src/vm/pretty-printer.cpp index d373de6c4..71ebef395 100644 --- a/src/liboptimizer/pretty-printer.cpp +++ b/src/vm/pretty-printer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #ifdef JERRY_ENABLE_PP #include "pretty-printer.h" #include "jerry-libc.h" diff --git a/src/liboptimizer/pretty-printer.h b/src/vm/pretty-printer.h similarity index 90% rename from src/liboptimizer/pretty-printer.h rename to src/vm/pretty-printer.h index f9e2b512c..2002a1bb7 100644 --- a/src/liboptimizer/pretty-printer.h +++ b/src/vm/pretty-printer.h @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ #ifndef PRETTY_PRINTER #define PRETTY_PRINTER -#include "globals.h" +#include "jrt.h" #ifdef JERRY_ENABLE_PP -#include "interpreter.h" +#include "vm.h" #include "literal.h" #include "scopes-tree.h" diff --git a/src/libcoreint/interpreter.cpp b/src/vm/vm.cpp similarity index 99% rename from src/libcoreint/interpreter.cpp rename to src/vm/vm.cpp index 065a29330..8e18045ed 100644 --- a/src/libcoreint/interpreter.cpp +++ b/src/vm/vm.cpp @@ -21,8 +21,8 @@ #include "ecma-lex-env.h" #include "ecma-operations.h" #include "ecma-stack.h" -#include "globals.h" -#include "interpreter.h" +#include "jrt.h" +#include "vm.h" #include "jerry-libc.h" #include "mem-allocator.h" diff --git a/src/libcoreint/interpreter.h b/src/vm/vm.h similarity index 92% rename from src/libcoreint/interpreter.h rename to src/vm/vm.h index 7363b7f0d..809cd6faa 100644 --- a/src/libcoreint/interpreter.h +++ b/src/vm/vm.h @@ -13,11 +13,11 @@ * limitations under the License. */ -#ifndef INTERPRETER_H -#define INTERPRETER_H +#ifndef VM_H +#define VM_H #include "ecma-globals.h" -#include "globals.h" +#include "jrt.h" #include "opcodes.h" void init_int (const opcode_t* program_p, bool dump_mem_stats); @@ -31,5 +31,5 @@ ecma_completion_value_t run_int_from_pos (opcode_counter_t start_pos, opcode_t read_opcode (opcode_counter_t counter); -#endif /* INTERPRETER_H */ +#endif /* VM_H */ diff --git a/tests/assert.js b/tests/assert.js deleted file mode 100644 index 586dc06b5..000000000 --- a/tests/assert.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -function assertTrue (what) { - if (what !== true) - exit (1); -} - -function assertFalse (what) { - if (what !== false) - exit (1); -} - -function assertNull (what) { - if (what !== null) - exit (1); -} - -function assertNotNull (what) { - if (what === null) - exit (1); -} - -function assertEquals (arg1, arg2) { - if (arg1 !== arg2) - exit (1); -} - -function assertUnreachable () { - exit (1); -} diff --git a/benchmarks/jerry/function_loop.js b/tests/benchmarks/jerry/function_loop.js similarity index 100% rename from benchmarks/jerry/function_loop.js rename to tests/benchmarks/jerry/function_loop.js diff --git a/benchmarks/jerry/loop_arithmetics_10kk.js b/tests/benchmarks/jerry/loop_arithmetics_10kk.js similarity index 100% rename from benchmarks/jerry/loop_arithmetics_10kk.js rename to tests/benchmarks/jerry/loop_arithmetics_10kk.js diff --git a/benchmarks/jerry/loop_arithmetics_1kk.js b/tests/benchmarks/jerry/loop_arithmetics_1kk.js similarity index 100% rename from benchmarks/jerry/loop_arithmetics_1kk.js rename to tests/benchmarks/jerry/loop_arithmetics_1kk.js diff --git a/tests/blinky.js b/tests/blinky.js new file mode 100644 index 000000000..459bcac09 --- /dev/null +++ b/tests/blinky.js @@ -0,0 +1,69 @@ +// Copyright 2015 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var led_green = 0; +var led_orange = 1; +var led_red = 2; +var led_blue = 3; + +var leds = new Array (led_green, led_orange, led_red, led_blue); +var waitDivisors = new Array (1, 2, 3, 6); +var waitTime = 60; +var numOfIterations = 10; + +while (1) +{ + for (var j = 0; j < numOfIterations; j += 1) + { + for (var led = 0; led < leds.length; led++) + { + LEDOn (leds [led]); + } + + wait (waitTime * 2); + + for (var led = 0; led < leds.length; led++) + { + LEDOff (leds [led]); + } + + wait (waitTime * 2); + } + + for (var j = 0; j < numOfIterations; j += 1) + { + for (var led = 0; led < leds.length; led++) + { + LEDOn (leds [led]); + wait (waitTime); + LEDOff (leds [led]); + wait (waitTime); + } + } + + for (var d = 0; d < waitDivisors.length; d++) + { + var divisor = waitDivisors [d]; + + for (var j = 0; j < numOfIterations; j += 1) + { + for (var led = 0; led < leds.length; led++) + { + LEDOn (leds [led]); + wait (waitTime / divisor); + LEDOff (leds [led]); + } + } + } +} diff --git a/tests/unit/test_heap.cpp b/tests/unit/test_heap.cpp index 318676877..2dbc63c90 100644 --- a/tests/unit/test_heap.cpp +++ b/tests/unit/test_heap.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "mem-allocator.h" extern "C" diff --git a/tests/unit/test_number_to_string.cpp b/tests/unit/test_number_to_string.cpp index 21a267a06..1a44c44fc 100644 --- a/tests/unit/test_number_to_string.cpp +++ b/tests/unit/test_number_to_string.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ #include "ecma-globals.h" #include "ecma-helpers.h" -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include diff --git a/tests/unit/test_pool.cpp b/tests/unit/test_pool.cpp index 2f2f68113..e3709831e 100644 --- a/tests/unit/test_pool.cpp +++ b/tests/unit/test_pool.cpp @@ -15,7 +15,7 @@ #define JERRY_MEM_POOL_INTERNAL -#include "globals.h" +#include "jrt.h" #include "mem-allocator.h" #include "mem-pool.h" #include "mem-poolman.h" diff --git a/tests/unit/test_poolman.cpp b/tests/unit/test_poolman.cpp index 9bb825ee7..8f28a58a6 100644 --- a/tests/unit/test_poolman.cpp +++ b/tests/unit/test_poolman.cpp @@ -19,7 +19,7 @@ #define JERRY_MEM_POOL_INTERNAL -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include "mem-allocator.h" #include "mem-pool.h" diff --git a/tests/unit/test_preparser.cpp b/tests/unit/test_preparser.cpp index db952a882..b3f26edc5 100644 --- a/tests/unit/test_preparser.cpp +++ b/tests/unit/test_preparser.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "globals.h" +#include "jrt.h" #include "mem-allocator.h" #include "opcodes.h" #include "deserializer.h" diff --git a/tests/unit/test_string_to_number.cpp b/tests/unit/test_string_to_number.cpp index d45e51304..e9af47b86 100644 --- a/tests/unit/test_string_to_number.cpp +++ b/tests/unit/test_string_to_number.cpp @@ -1,4 +1,4 @@ -/* Copyright 2014 Samsung Electronics Co., Ltd. +/* Copyright 2014-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ #include "ecma-globals.h" #include "ecma-helpers.h" -#include "globals.h" +#include "jrt.h" #include "jerry-libc.h" #include diff --git a/tools/generator.sh b/tools/generator.sh index 48a2747d5..81695b3d8 100755 --- a/tools/generator.sh +++ b/tools/generator.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Samsung Electronics Co., Ltd. +# Copyright 2014-2015 Samsung Electronics Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,11 +14,9 @@ #!/bin/bash -echo "#include \"globals.h\"" > $2 -echo "" >> $2 -echo "static char generated_source [] =" >> $2 +echo "#define JERRY_MCU_SCRIPT \\" > $2 cat $1 | while read line do - echo "\"$line\n\"" >> $2 + echo "\"$line\n\" \\" >> $2 done -echo ";" >> $2 +echo >> $2 diff --git a/tools/push.sh b/tools/push.sh index c2b1a62ec..c1e01f426 100755 --- a/tools/push.sh +++ b/tools/push.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Samsung Electronics Co., Ltd. +# Copyright 2014-2015 Samsung Electronics Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -122,7 +122,7 @@ do # echo # BENCH_ENGINE="./out/release.linux/jerry" -# BENCH_SCRIPT="./benchmarks/jerry/loop_arithmetics_1kk.js" +# BENCH_SCRIPT="./tests/benchmarks/jerry/loop_arithmetics_1kk.js" # PERF_ITERS="5" # PERF_INFO=`echo -e "$BENCH_SCRIPT:\n\t"``./tools/perf.sh $PERF_ITERS $BENCH_ENGINE $BENCH_SCRIPT`" seconds" # MEM_INFO=`echo -e "$BENCH_SCRIPT:\n"``./tools/rss_measure.sh $BENCH_ENGINE $BENCH_SCRIPT` diff --git a/tools/run_benchmarks.sh b/tools/run_benchmarks.sh index 98e35c031..efe2188ad 100755 --- a/tools/run_benchmarks.sh +++ b/tools/run_benchmarks.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Samsung Electronics Co., Ltd. +# Copyright 2014-2015 Samsung Electronics Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ ENGINE=$1 function run () { echo "Running test: $1.js" - ./tools/perf.sh 5 $ENGINE ./benchmarks/$1.js - ./tools/rss_measure.sh $ENGINE ./benchmarks/$1.js + ./tools/perf.sh 5 $ENGINE ./tests/benchmarks/$1.js + ./tools/rss_measure.sh $ENGINE ./tests/benchmarks/$1.js } echo "Running Sunspider:" diff --git a/tools/test_stability.sh b/tools/test_stability.sh index c440e04e7..b508dc8aa 100755 --- a/tools/test_stability.sh +++ b/tools/test_stability.sh @@ -1,4 +1,4 @@ -# Copyright 2014 Samsung Electronics Co., Ltd. +# Copyright 2014-2015 Samsung Electronics Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ #!/bin/bash NUM_COMMITS=$1 -BENCH=./benchmarks/jerry/loop_arithmetics_1kk.js +BENCH=./tests/benchmarks/jerry/loop_arithmetics_1kk.js TARGET=release.linux trap ctrl_c INT