Remove redundancy between all-in-one and all-in-one-source builds
by keeping only the second, and adopt the more established term
"amalgamated" build for it. This change includes the following:
- Replace `ENABLE_ALL_IN_ONE` and `ENABLE_ALL_IN_ONE_SOURCE` cmake
options with `ENABLE_AMALGAM` top-level option.
- Replace `--all-in-one` option of `build.py` helper with
`--amalgam`.
- Merge the `srcmerger.py` and `srcgenerator.py` tool scripts into
`amalgam.py` (with improvements).
- Update documentation.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
ecma_op_function_get_function_realm now can process proxy and bound functions.
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
With older CMake (for example 2.8.12.2) the feature check of HAVE_M_LIB
reports false positive fail due to -Werror=strict-prototypes. It is already
fixed in CMake https://gitlab.kitware.com/cmake/cmake/-/commit/4bc17345
The feature is present and works, so we should only ignore this build warning.
Additionally the necessary GCC/Clang guard added to the similar
CMake feature check in jerry-port/default/CMakeLists.txt
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
Travis CI became very slow lately. Most of the jobs have already
been moved to GH Actions. This commit finishes the migration.
- IRC notification is adapted (result of jobs is not reported).
- Sonar integration is dropped without replacement, as its GH
Action does not support C projects.
- Coverity Scan integration is dropped without replacement as it
has no GH Action at all.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This allows users to specify a build type other than `MinSizeRel`
or `Debug` for `tools/build.py`. (Build type was already freely
configurable by invoking cmake directly with a custom
`CMAKE_BUILD_TYPE` option.)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The pkgconfig specified `include/jerry-math` as the include
directory, but cmake installs header to `include/jerryscript-math`.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
- Make jobs run on latest versions of the OS's (except for
"Checks", which relies on specific versions of checkers coming
with Ubuntu 18.04)
- Bump actions/checkout to v2
- Rewrite `apt-get` to `apt` (almost the same, but `apt` is the
2nd gen tool)
- Drop step names (they took too much vertical space, didn't add
too much useful information, and were very typo-prone)
- Move superfluous environment variables (e.g., `BUILD_OPTIONS` or
`SKIP_LIST`) to their expansion sites (use YAML block scalars
`>-` where appropriate to enhance readability)
- Fix duplicate installation of pylint in the "Checks" job
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Normally, it is more usual and safe to use a toolchain's native
math library. Especially, if multiple components of a project use
math functions, in which case all components should be linked
against the same libm.
The libjerry-math can be used, of course, but as it needs extra
care and consideration, it should be opt-in.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
When shifting a negative BigInt value if the
shift count is very "big" the result should be -1.
eg.:
```
(-2n >> (2n*32n)) === -1n
```
Note: the `-2n >> (2n*31n)` already returned `-1n` prior this change.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Proxy flags (IsCallable, IsConstructor) can't be stored on the
property list compressed pointer. As adding a Proxy to a WeakSet
would add a property to the Proxy object causing failures down the line.
The prototype internal "slot" can be used to store there flags as
it is not used in case of Proxies (as per standard).
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
That "libm" in the name of the library resulted in awkward naming
on *nix systems (`libjerry-libm.*`, "lib" occurring twice). And the
name of the corresponding header is `math.h` anyway.
Note that this is a breaking change in some sense. The commit
contains no API change, but the build system does change for users
of the math library.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Less operator is not supported between int and None in Python 3. Fix
that Python 2 legacy in test262-harness.py.
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
When an error occurs accessing a property during JSON stringify call
the wrapper object is not freed at the correct place.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Extended the `jerry_type_t` enum with `JERRY_TYPE_BIGINT` and added it to
the `jerry_value_get_type`.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
The assert in the reduce and filter methods did not checked if the given value
is a BigInt. This missing check caused the assert to fail.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
- Rework symbols to have the same value across realms
- Support realms for native functions
- Support test262
- Use new.target realms for constructing intrinsics
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
- Type for realm objects is introduced (ecma_global_object_t)
- Realm reference is added to built-in objects and ECMAScript functions
- Resolving built-ins, global environments, and scopes require realm object
- Unnecessary global object accesses are removed from the code
Missing: external functions and static snapshot functions have no realm reference
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Few test-cases in test262 uses a $262 object to run a few method (for example detachedArrayBuffer)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu