Property names were always required a string reference which consumed
a large amount of memory for arrays. This patch reduces this consumption
by directly storing the value part of certain strings.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
OS X build regularly reports some 39 warnings falling in 3 major
categories:
* "static function '...' is used in an inline function with
external linkage [-Wstatic-in-inline]": Some semantics around
`inline` have changed between C89 and C99, and gcc and clang seem
to disagree on how strict they should be about them. Solution
chosen is to use `-Wnostatic-in-inline` command line option for
clang.
* "implicit conversion turns floating-point number into integer:
'double' to 'bool' [-Wfloat-conversion]": `if (fmod (..., ...))`
was used at different places, which is not nice anyway, thus the
return value is compared explicitly against `ECMA_NUMBER_ZERO`.
* "format string is not a string literal [-Wformat-nonliteral]":
Console and log port I/O functions have a printf-like interface,
and the default implementations actually pass both format string
and the remaining arguments to a vfprintf. However, clang is
strict about the format string parameter of vfprintf and expects
a literal there. By annotating the port I/O functions with
`__attribute__ ((format (printf, ..., ...)))`, clang will check
the format string being a literal string earlier, when the port
functions are called, and will not complain within them when
vfprintf is called.
(Actually, this has revealed an incorrect format string, which
has been fixed as well.)
(There were also some single conversion errors not listed above.)
The patch was tested on OS X (where all warnings disappeared), but
it should help clang compilation on other OS's as well.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The internals have surprisingly large number of unused functions at
surprising places. This patch cleans them out to make maintenance
easier and to prevent dead code having effect on future decisions.
The patch intentionally does not try to clean up public API but
focuses on internal modules only that are/should not be reachable
from "outside".
However, unit tests do access private API, thus tests of literal
storage had to be adjusted.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Those macros are legacy and are not used consitently throughout the
code base. This patch eliminates their definitions and rewrites
their remaining occurrences to TODO comments.
All occurrences have been checked and made sure that the comments
used a consistent style.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Add another argument for the JERRY_STATIC_ASSERT with the description of the assert statement.
The release.linux build fails with enabled ALL_IN_ONE option.
There is no redefinition of typedef in C99.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
* Fix "end of file while inside a group" doxygen warnings.
* Fix "unknown command" doxygen warnings caused by incorrect
argument references. Instead of `@foo`, `@a foo` is the proper
format.
* Fix "unknown command" doxygen warnings caused by incorrect
parameter direction specifications. Instead of `@in`, `@out`,
and `@in-out`, `[in]`, `[out]`, and `[in,out]` are the proper
formats.
* Wrapping special characters in quotes to avoid doxygen
confusion. Raw pipe, semicolon, dot, backslash, etc. characters
can drive doxygen into various misinterpretations and warnings.
E.g.:
```
End of list marker found without any preceding list items
Found unknown command
```
Putting quotes around such text snipets eliminates the errors.
* Fix the documentation of `ecma_builtin_global_object_print`. Raw
<> and \ sequences confused doxygen in various ways (it tried to
interpret them as XML tags and doxygen commands).
* Fix "ignoring title that does not match old title" doxygen
warnings. At some places, the group titles were out of sync, at
others, the group names were incorrect.
* Fix "parameters are not documented" doxygen warnings. Fixing
various typos in the inline parameter documentations (`/*`,
`/**`, `/** <`, and `/**>` are all considered incorrect, the
right format is `/**<`).
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu