* extract infrequently used m_rareData member from InterpretedCodeBlock
* InterpretedCodeBlockWithRareData handles InterpretedCodeBlockRareData inside itself
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* NativeCodeBlock is newly added for NativeFunctionObject
* all interpreter-related info is moved into InterpretedCodeBlock
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
Since the debugger breakpoint generation requires a continuously increasing series of LOC indices
the statement node infos should be constructed in the beginning of their parsing functions.
Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
* Set value as undefined when there is SyntaxError
* Fix memory leak related with throwing esprima::Error
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
The line info for each breakpoint can be calculated from the LOC index.
This patch resolves the problem, mentioned in #649.
Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
* Implement export * as {name} from {src} feature
* Update Script::resolveExport for following new spec
* Update test262 driver for running test cases correctly
* Implement changes of ModuleNamespaceObject::[[*]]
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Export default function declaration should treat as function declaration
* But there is no name on export function decl, we should the statement as function expression
* Check duplicate export name correctly
* Don't include FIXTURE files as testset in test262
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
but I don't want to add extra bytecodes for this.
and It is only needed when there is direct eval operation.
so I wrap each parameter block with small arrow function.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* When there is arrow function on class ctor, we should use heap-allocated lex env for class ctor.
because we need to compute this variable on run-time
* when there is super expression with computed case, we should load this binding first for testing binding
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
Declarations with assignment should insert breakpoints, while
declarations without assignment should not.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
* caller extension of ArgumentsObject is removed from recent ECMAScript standard
* __proto__ on object expression is changed.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Treat single `let` as Identifier in parsing ExpressionStatement
* The `let` contextual keyword must not contain Unicode escape sequences.
* U+180E had been changed to `Other, Format [Cf]` from `Separator, Space [Zs]`
see https://github.com/tc39/ecma262/pull/300, https://github.com/Microsoft/ChakraCore/issues/2120
* The `let` contextual keyword must not contain Unicode escape sequences
* We need to allocate new env on right side of for in-of head when there is lexical decl on left side
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Implement basic behavior of for-await-of statement
* for statement should allow `for (..) let {}` form
* Fix bug in yield*
* AsyncFromSyncIteratorContinuation is changed on newer drafted spec(11.0). I apply the change.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Generator is also executed until parameter initialize block when generator function is called
* Generator method in object should indicate correct place to start
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* apparent Identifier name is directly added to getter, setter function
* remove one LoadLiteral bytecode for each name of getter, setter function
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* add symbol name for property method if it is not an empty symbol
* MetaNode in parseLabelledStatement is fixed correctly
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* fix function length to represent the number of consecutive identifiers from the start of parameter list
* collect parameter names including the target names of patterns and rest element
* separate function length and parameter count
* simplify the process of parameter collecting and rename parameter related functions more intuitively
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* fix the order of BindingRestElement bytecode generation
* add implicit name for lexical binding
* reset firstCoverInitializedNameError for for statement header
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* fix to compare string/symbol correctly in marking enumerated key
* fix iterator close operation to call 'return' function of iterator and then throw exception
* add implicit name in object property parsing
* resolve each target of pattern first, and then store the value into it
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Fix parser error related with async arrow function
* CodeBlock may have diffrent source code start position data(from `function` keyword)
- new ECMAScript spec says we should make function source string from `function` keyword
* Apply new spec on builtin Function constructor
* AsyncFunctions must have correct initial properties
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* assignment in array/object pattern has conditional implicit names of class expression
* ClassExpression which also has 'name' static member should not have a implicit name
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Create new promiseCapability when async function called
* __{define,lookup}{Getter,Setter} should follow spec
* builtin String html functions should have correct name
* Fix parser bugs
- allow `{ let e; { function e(){} } }` case in parser
- disallow `try {} catch(e) { function e() {} }` case in parser
- recover await state correctly
* Date.prototype.setYear should use toInteger for input
* update tools/test/test262/make_excludelist.py and its resource
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Compress CompressibleStrings on GC reclaim end event
- if there is reference about data of CompressibleString on stack, we should give up compressing.
we don't need to search heap space because I redesigned StringView
(we should not store string buffer data on heap without owner)
* Redesign StringView
- Don't save string buffer address as its member. because buffer of CompressibleString can be deleted
- If we don't save string buffer address on StringView, parser performance may dropped.
becuase parser access string data a lot.
so I introduce ParserStringView. it saves buffer address. we should ParserStringView on parser only.
we can save string buffer address while parsing. because GC is disabled while parsing.
* Enable CompressibleString always
* Implement cache of RegExpOptionStrings
* Implement finding system locale function on RuntimeICUBinder avoiding call uloc_getDefault.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* check and convert to strict mode ahead of following tokens
* identifier which has a valid keyword in strict mode is also converted to the complete keyword
* fixes#513
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
* Store array length property in its member variable not value vector
- This can reduce one of GC_MALLOC call if there is not value in ArrayObject other than fastmode value
* Prevent memory leak from VMInstance, Context
* Change vector capacity reserve strategy
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
* Reduce size of RopeString
* Use fit memory if possible for ArrayObject fastModeData
* Re-implement ByteCode pruning logic
* Re-implement inline-cache for reducing memory usage
* Remove std::vector with gc_allocator. it can cause memory leak
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>