mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
parent
b5bcbfe58c
commit
67b8cd621a
12 changed files with 94 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include "jit/VMFunctions.h"
|
||||
#include "js/UniquePtr.h"
|
||||
#include "vm/AsyncFunction.h"
|
||||
#include "vm/AsyncIteration.h"
|
||||
#include "vm/EnvironmentObject.h"
|
||||
#include "vm/Interpreter.h"
|
||||
#include "vm/TraceLogging.h"
|
||||
|
|
@ -3914,6 +3915,28 @@ BaselineCompiler::emit_JSOP_TOASYNC()
|
|||
return true;
|
||||
}
|
||||
|
||||
typedef JSObject* (*ToAsyncGenFn)(JSContext*, HandleFunction);
|
||||
static const VMFunction ToAsyncGenInfo =
|
||||
FunctionInfo<ToAsyncGenFn>(js::WrapAsyncGenerator, "ToAsyncGen");
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_TOASYNCGEN()
|
||||
{
|
||||
frame.syncStack(0);
|
||||
masm.unboxObject(frame.addressOfStackValue(frame.peek(-1)), R0.scratchReg());
|
||||
|
||||
prepareVMCall();
|
||||
pushArg(R0.scratchReg());
|
||||
|
||||
if (!callVM(ToAsyncGenInfo))
|
||||
return false;
|
||||
|
||||
masm.tagValue(JSVAL_TYPE_OBJECT, ReturnReg, R0);
|
||||
frame.pop();
|
||||
frame.push(R0);
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef bool (*ThrowObjectCoercibleFn)(JSContext*, HandleValue);
|
||||
static const VMFunction ThrowObjectCoercibleInfo =
|
||||
FunctionInfo<ThrowObjectCoercibleFn>(ThrowObjectCoercible, "ThrowObjectCoercible");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue