mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Add NewTarget parameter to builtin functions
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
0d45add63e
commit
e32b181f4f
42 changed files with 482 additions and 479 deletions
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace Escargot {
|
||||
|
||||
static Value builtinAsyncGeneratorFunction(ExecutionState& state, Value thisValue, size_t argc, Value* argv, bool isNewExpression)
|
||||
static Value builtinAsyncGeneratorFunction(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Value newTarget)
|
||||
{
|
||||
size_t argumentVectorCount = argc > 1 ? argc - 1 : 0;
|
||||
Value sourceValue = argc >= 1 ? argv[argc - 1] : Value(String::emptyString);
|
||||
|
|
@ -34,17 +34,17 @@ static Value builtinAsyncGeneratorFunction(ExecutionState& state, Value thisValu
|
|||
return new ScriptAsyncGeneratorFunctionObject(state, functionSource.codeBlock, functionSource.outerEnvironment);
|
||||
}
|
||||
|
||||
static Value builtinAsyncGeneratorNext(ExecutionState& state, Value thisValue, size_t argc, Value* argv, bool isNewExpression)
|
||||
static Value builtinAsyncGeneratorNext(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Value newTarget)
|
||||
{
|
||||
return AsyncGeneratorObject::asyncGeneratorEnqueue(state, thisValue, AsyncGeneratorObject::AsyncGeneratorEnqueueType::Next, argv[0]);
|
||||
}
|
||||
|
||||
static Value builtinAsyncGeneratorReturn(ExecutionState& state, Value thisValue, size_t argc, Value* argv, bool isNewExpression)
|
||||
static Value builtinAsyncGeneratorReturn(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Value newTarget)
|
||||
{
|
||||
return AsyncGeneratorObject::asyncGeneratorEnqueue(state, thisValue, AsyncGeneratorObject::AsyncGeneratorEnqueueType::Return, argv[0]);
|
||||
}
|
||||
|
||||
static Value builtinAsyncGeneratorThrow(ExecutionState& state, Value thisValue, size_t argc, Value* argv, bool isNewExpression)
|
||||
static Value builtinAsyncGeneratorThrow(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Value newTarget)
|
||||
{
|
||||
return AsyncGeneratorObject::asyncGeneratorEnqueue(state, thisValue, AsyncGeneratorObject::AsyncGeneratorEnqueueType::Throw, argv[0]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue