* Remove some unused function, variables
* Remove LexicalEnvironment from NativeFunctionObject
* Don't save stack-allocated LexicalEnvironment on ScriptFunctionObject. it may cause memory leak from stack
* Don't store newTarget, ThisBinded value on FunctionEnvironmentRecord if possible(we don't need these values except class functions)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
- Introduce INIT_STATIC_STRING macro to make adding new static string much easier.
- Introduce AtomicString::initStaticString to append static string to the static string set directly
without lookup for an already existing name.
- Add a number list and remove the dtoa function call for the initialization of string numbers.
- Split the single character initialization to ASCII and Latin1 string part.
Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
- Store lexcial block informantion in InterpretedCodeBlock.
- If lexcial block has no lexcial variables, we should collapse the block.
- If there is no heap-allocated variables in lexcial environment, we can skip allocation of the environment.
- Implement Indexed storage for lexcial environment.
- Allocate lexcial variables in function stack storage if possible.
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
* each ScannerResult is now allocated on the stack if it is really necessary
* reduce the reference count overhead for each ScannerResult
* ALLOC_TOKEN macro is newly added for allocation of each ScannerResult token
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
Rewamped a little bit of code, reported by SonarCloud for code smell.
Redudant parenthesis, and empty if statement code blocks.
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
The code had the place for parsing octal numbers like `0o543` and
`0O543`, but due to an implementation error the code returned with
`Unexpected token ILLEGAL`.
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
There is a lot of code duplication for parser and scanner.
Source code duplications can be reduced by templates without sacrificing performance.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Start hiding private helper functions from outside world. Next step
will be hiding private data members.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Introduce EmptyCodePoint constant to represent the empty case.
Also hex conversion is simplified.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Instead of maintaining a structure in memory simply re-scan the
right brace when a template is parsed.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Currently the parser is a very large file and hard to maintain. This patch is
the first which splits it into smaller files.
During the move some style fixes are applied. The identifer start
detection is improved as well.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com