!8018 [BaselineJIT] eliminate redundancy in baseline

Merge pull request !8018 from cly/bljit_dev
This commit is contained in:
openharmony_ci 2024-07-08 11:55:16 +00:00 committed by Gitee
commit 8eb8f487a0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 411 additions and 1264 deletions

View File

@ -455,7 +455,7 @@ void AOTFileManager::InitializeStubEntries(const std::vector<AnFileInfo::FuncEnt
} else if (des.IsBaselineStub()) {
thread->SetBaselineStubEntry(des.indexInKindOrMethodId_, des.codeAddr_);
#if ECMASCRIPT_ENABLE_ASM_FILE_LOAD_LOG
int start = GET_MESSAGE_STRING_ID(BaselineLdObjByName);
int start = GET_MESSAGE_STRING_ID(BaselineTryLdGLobalByNameImm8ID16);
std::string format = MessageString::GetMessageString(des.indexInKindOrMethodId_ + start - 1); // -1: NONE
LOG_ECMA(DEBUG) << "baseline stub index: " << std::dec << des.indexInKindOrMethodId_ << " :" << format
<< " addr: 0x" << std::hex << des.codeAddr_;

View File

@ -38,24 +38,6 @@ namespace panda::ecmascript::kungfu {
VariableType::INT32(), \
}
DEF_CALL_SIGNATURE(BaselineLdObjByName)
{
// 6 : 6 input parameters
CallSignature signature("BaselineLdObjByName", 0, 6,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 6 : 6 input parameters
std::array<VariableType, 6> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::JS_POINTER(),
VariableType::INT32(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineTryLdGLobalByNameImm8ID16)
{
// 4 : 4 input parameters
@ -90,15 +72,14 @@ DEF_CALL_SIGNATURE(BaselineStToGlobalRecordImm16ID16)
DEF_CALL_SIGNATURE(BaselineLdaStrID16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineLdaStrID16", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineLdaStrID16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -122,28 +103,26 @@ DEF_CALL_SIGNATURE(BaselineCallArg1Imm8V8)
DEF_CALL_SIGNATURE(BaselineLdsymbol)
{
// 2 : 2 input parameters
CallSignature signature("BaselineLdsymbol", 0, 2,
// 1 : 1 input parameters
CallSignature signature("BaselineLdsymbol", 0, 1,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
// 1 : 1 input parameters
std::array<VariableType, 1> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineLdglobal)
{
// 2 : 2 input parameters
CallSignature signature("BaselineLdglobal", 0, 2,
// 1 : 1 input parameters
CallSignature signature("BaselineLdglobal", 0, 1,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
// 1 : 1 input parameters
std::array<VariableType, 1> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
@ -177,35 +156,16 @@ DEF_CALL_SIGNATURE(BaselineGetunmappedargs)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineJmpImm16)
{
// 6 : 6 input parameters
CallSignature signature("BaselineJmpImm16", 0, 6,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 6 : 6 input parameters
std::array<VariableType, 6> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_POINTER(),
VariableType::JS_POINTER(),
VariableType::INT16(),
VariableType::INT16(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineAsyncfunctionenter)
{
// 3 : 3 input parameters
CallSignature signature("BaselineAsyncfunctionenter", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineAsyncfunctionenter", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
@ -747,7 +707,16 @@ DEF_CALL_SIGNATURE(BaselineXor2Imm8V8)
DEF_CALL_SIGNATURE(BaselineExpImm8V8)
{
BINARY_OP_SIGNATURE_DESC("BaselineExpImm8V8");
// 3 : 3 input parameters
CallSignature signature("BaselineExpImm8V8", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
@ -939,15 +908,14 @@ DEF_CALL_SIGNATURE(BaselineCallthisrangeImm8Imm8V8)
DEF_CALL_SIGNATURE(BaselineSupercallthisrangeImm8Imm8V8)
{
// 6 : 6 input parameters
CallSignature signature("BaselineSupercallthisrangeImm8Imm8V8", 0, 6,
// 5 : 5 input parameters
CallSignature signature("BaselineSupercallthisrangeImm8Imm8V8", 0, 5,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 6 : 6 input parameters
std::array<VariableType, 6> params = {
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT16(),
VariableType::INT16(),
VariableType::INT32(),
@ -1143,14 +1111,13 @@ DEF_CALL_SIGNATURE(BaselineCallrangeImm8Imm8V8)
DEF_CALL_SIGNATURE(BaselineLdexternalmodulevarImm8)
{
// 3 : 3 input parameters
CallSignature signature("BaselineLdexternalmodulevarImm8", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineLdexternalmodulevarImm8", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT8(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -1300,15 +1267,14 @@ DEF_CALL_SIGNATURE(BaselineStthisbyvalueImm16V8)
DEF_CALL_SIGNATURE(BaselineDynamicimport)
{
// 3 : 3 input parameters
CallSignature signature("BaselineDynamicimport", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineDynamicimport", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
@ -1421,38 +1387,6 @@ DEF_CALL_SIGNATURE(BaselineGetnextpropnameV8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineJeqzImm8)
{
// 4 : 4 input parameters
CallSignature signature("BaselineJeqzImm8", 0, 4,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::JS_ANY(),
VariableType::INT8(),
VariableType::JS_POINTER(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineJeqzImm16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineJeqzImm16", 0, 4,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::JS_ANY(),
VariableType::INT8(),
VariableType::JS_POINTER(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineSetobjectwithprotoImm8V8)
{
// 4 : 4 input parameters
@ -1863,14 +1797,13 @@ DEF_CALL_SIGNATURE(BaselineCopyrestargsImm8)
DEF_CALL_SIGNATURE(BaselineLdlexvarImm4Imm4)
{
// 4 : 4 input parameters
CallSignature signature("BaselineLdlexvarImm4Imm4", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineLdlexvarImm4Imm4", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
VariableType::INT32(),
};
@ -1896,14 +1829,13 @@ DEF_CALL_SIGNATURE(BaselineStlexvarImm4Imm4)
DEF_CALL_SIGNATURE(BaselineGetmodulenamespaceImm8)
{
// 3 : 3 input parameters
CallSignature signature("BaselineGetmodulenamespaceImm8", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineGetmodulenamespaceImm8", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2107,15 +2039,14 @@ DEF_CALL_SIGNATURE(BaselineStownbynameImm16Id16V8)
DEF_CALL_SIGNATURE(BaselineLdsuperbynameImm8Id16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineLdsuperbynameImm8Id16", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineLdsuperbynameImm8Id16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2123,15 +2054,14 @@ DEF_CALL_SIGNATURE(BaselineLdsuperbynameImm8Id16)
DEF_CALL_SIGNATURE(BaselineLdsuperbynameImm16Id16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineLdsuperbynameImm16Id16", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineLdsuperbynameImm16Id16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2173,14 +2103,13 @@ DEF_CALL_SIGNATURE(BaselineStsuperbynameImm16Id16V8)
DEF_CALL_SIGNATURE(BaselineLdlocalmodulevarImm8)
{
// 3 : 3 input parameters
CallSignature signature("BaselineLdlocalmodulevarImm8", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineLdlocalmodulevarImm8", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT8(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2202,78 +2131,6 @@ DEF_CALL_SIGNATURE(BaselineStconsttoglobalrecordImm16Id16)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, FUNC, OFFSET
DEF_CALL_SIGNATURE(BaselineJeqzImm32)
{
// 5 : 5 input parameters
CallSignature signature("BaselineJeqzImm32", 0, 5,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::NATIVE_POINTER(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, FUNC, OFFSET
DEF_CALL_SIGNATURE(BaselineJnezImm8)
{
// 5 : 5 input parameters
CallSignature signature("BaselineJnezImm8", 0, 5,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::JS_POINTER(),
VariableType::INT8(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, FUNC, OFFSET
DEF_CALL_SIGNATURE(BaselineJnezImm16)
{
// 5 : 5 input parameters
CallSignature signature("BaselineJnezImm16", 0, 5,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::JS_POINTER(),
VariableType::INT16(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, FUNC, OFFSET
DEF_CALL_SIGNATURE(BaselineJnezImm32)
{
// 5 : 5 input parameters
CallSignature signature("BaselineJnezImm32", 0, 5,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::JS_POINTER(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, RECEIVER, PROP_KEY
DEF_CALL_SIGNATURE(BaselineStownbyvaluewithnamesetImm8V8V8)
{
@ -2362,54 +2219,15 @@ DEF_CALL_SIGNATURE(BaselineLdbigintId16)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, FUNC, PROFILE_TYPE_INFO, HOTNESS_COUNTER, OFFSET
DEF_CALL_SIGNATURE(BaselineJmpImm8)
{
// 6 : 6 input parameters
CallSignature signature("BaselineJmpImm8", 0, 6,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 6 : 6 input parameters
std::array<VariableType, 6> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_POINTER(),
VariableType::JS_POINTER(),
VariableType::INT32(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, FUNC, PROFILE_TYPE_INFO, HOTNESS_COUNTER, OFFSET
DEF_CALL_SIGNATURE(BaselineJmpImm32)
{
// 6 : 6 input parameter
CallSignature signature("BaselineJmpImm32", 0, 6,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 6 : 6 input parameter
std::array<VariableType, 6> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_POINTER(),
VariableType::JS_POINTER(),
VariableType::INT32(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// ACC, IMM
// IMM
DEF_CALL_SIGNATURE(BaselineFldaiImm64)
{
// 2 : 2 input parameters
CallSignature signature("BaselineFldaiImm64", 0, 2,
// 1 : 1 input parameters
CallSignature signature("BaselineFldaiImm64", 0, 1,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::JS_ANY(),
// 1 : 1 input parameters
std::array<VariableType, 1> params = {
VariableType::INT64(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2435,13 +2253,12 @@ DEF_CALL_SIGNATURE(BaselineReturn)
// ACC, LEVEL, SLOT, FRAME
DEF_CALL_SIGNATURE(BaselineLdlexvarImm8Imm8)
{
// 4 : 4 input parameters
CallSignature signature("BaselineLdlexvarImm8Imm8", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineLdlexvarImm8Imm8", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::JS_ANY(),
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::INT32(),
VariableType::INT32(),
VariableType::NATIVE_POINTER(),
@ -2498,19 +2315,6 @@ DEF_CALL_SIGNATURE(BaselineAsyncgeneratorrejectV8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
DEF_CALL_SIGNATURE(BaselineNop)
{
// 1 : 1 input parameters
CallSignature signature("BaselineNop", 0, 1,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 1 : 1 input parameters
std::array<VariableType, 1> params = {
VariableType::NATIVE_POINTER(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, INDEX
DEF_CALL_SIGNATURE(BaselineSetgeneratorstateImm8)
{
@ -2599,16 +2403,15 @@ DEF_CALL_SIGNATURE(BaselineTestInImm8Imm16Imm16)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// ACC, SP
// SP
DEF_CALL_SIGNATURE(BaselineDeprecatedLdlexenvPrefNone)
{
// 2 : 2 input parameters
CallSignature signature("BaselineDeprecatedLdlexenvPrefNone", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
// 1 : 1 input parameters
CallSignature signature("BaselineDeprecatedLdlexenvPrefNone", 0, 1,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::JS_ANY(),
// 1 : 1 input parameters
std::array<VariableType, 1> params = {
VariableType::NATIVE_POINTER(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2878,23 +2681,22 @@ DEF_CALL_SIGNATURE(BaselineThrowConstassignmentPrefV8)
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::INT8(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, V0
// GLUE, SP, V0
DEF_CALL_SIGNATURE(BaselineDeprecatedTonumberPrefV8)
{
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedTonumberPrefV8", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineDeprecatedTonumberPrefV8", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT8(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2930,23 +2732,22 @@ DEF_CALL_SIGNATURE(BaselineThrowIfnotobjectPrefV8)
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::INT8(),
VariableType::JS_ANY(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, V0
// GLUE, SP, V0
DEF_CALL_SIGNATURE(BaselineDeprecatedTonumericPrefV8)
{
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedTonumericPrefV8", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineDeprecatedTonumericPrefV8", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT8(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -2987,17 +2788,16 @@ DEF_CALL_SIGNATURE(BaselineThrowUndefinedifholePrefV8V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, CONST_POOL, STRING_ID
// GLUE, CONST_POOL, STRING_ID
DEF_CALL_SIGNATURE(BaselineThrowUndefinedifholewithnamePrefId16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineThrowUndefinedifholewithnamePrefId16", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineThrowUndefinedifholewithnamePrefId16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::VOID());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::NATIVE_POINTER(),
VariableType::INT32(),
};
@ -3224,18 +3024,16 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedCallarg1PrefV8V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, LEVEL, SLOT
// SP, LEVEL, SLOT
DEF_CALL_SIGNATURE(BaselineWideLdlexvarPrefImm16Imm16)
{
// 5 : 5 input parameters
CallSignature signature("BaselineWideLdlexvarPrefImm16Imm16", 0, 5,
// 3 : 3 input parameters
CallSignature signature("BaselineWideLdlexvarPrefImm16Imm16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
VariableType::INT32(),
};
@ -3298,17 +3096,16 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedCallargs3PrefV8V8V8V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, INDEX
// GLUE, INDEX
DEF_CALL_SIGNATURE(BaselineWideGetmodulenamespacePrefImm16)
{
// 3 : 3 input parameters
CallSignature signature("BaselineWideGetmodulenamespacePrefImm16", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineWideGetmodulenamespacePrefImm16", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT16(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -3366,17 +3163,16 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedCallspreadPrefV8V8V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, INDEX
// GLUE, INDEX
DEF_CALL_SIGNATURE(BaselineWideLdlocalmodulevarPrefImm16)
{
// 3 : 3 input parameters
CallSignature signature("BaselineWideLdlocalmodulevarPrefImm16", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineWideLdlocalmodulevarPrefImm16", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT16(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -3400,17 +3196,16 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedCallthisrangePrefImm16V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, INDEX
// GLUE, INDEX
DEF_CALL_SIGNATURE(BaselineWideLdexternalmodulevarPrefImm16)
{
// 3 : 3 input parameters
CallSignature signature("BaselineWideLdexternalmodulevarPrefImm16", 0, 3,
// 2 : 2 input parameters
CallSignature signature("BaselineWideLdexternalmodulevarPrefImm16", 0, 2,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT16(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -3435,18 +3230,17 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedDefineclasswithbufferPrefId16Imm16Imm16V8V8
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, INDEX
// GLUE, SP, INDEX
DEF_CALL_SIGNATURE(BaselineWideLdpatchvarPrefImm16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineWideLdpatchvarPrefImm16", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineWideLdpatchvarPrefImm16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -3622,18 +3416,17 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedSetobjectwithprotoPrefV8V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, V0, V1
// GLUE, SP, V0, V1
DEF_CALL_SIGNATURE(BaselineDeprecatedLdobjbyvaluePrefV8V8)
{
// 5 : 5 input parameters
CallSignature signature("BaselineDeprecatedLdobjbyvaluePrefV8V8", 0, 5,
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedLdobjbyvaluePrefV8V8", 0, 4,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT8(),
VariableType::INT8(),
};
@ -3762,17 +3555,16 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedStlexvarPrefImm16Imm16V8)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, STRING_ID, CONST_POOL
// GLUE, STRING_ID, CONST_POOL
DEF_CALL_SIGNATURE(BaselineDeprecatedGetmodulenamespacePrefId32)
{
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedGetmodulenamespacePrefId32", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineDeprecatedGetmodulenamespacePrefId32", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
VariableType::NATIVE_POINTER(),
};
@ -3796,53 +3588,50 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedStmodulevarPrefId32)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, V0, STRING_ID, CONST_POOL
// GLUE, SP, V0, STRING_ID, CONST_POOL
DEF_CALL_SIGNATURE(BaselineDeprecatedLdobjbynamePrefId32V8)
{
// 5 : 5 input parameters
CallSignature signature("BaselineDeprecatedLdobjbynamePrefId32V8", 0, 5,
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedLdobjbynamePrefId32V8", 0, 4,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT8(),
VariableType::INT32(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, SP, ACC, STRING_ID, V0
// GLUE, SP, STRING_ID, V0
DEF_CALL_SIGNATURE(BaselineDeprecatedLdsuperbynamePrefId32V8)
{
// 5 : 5 input parameters
CallSignature signature("BaselineDeprecatedLdsuperbynamePrefId32V8", 0, 5,
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedLdsuperbynamePrefId32V8", 0, 4,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 5 : 655 input parameters
std::array<VariableType, 5> params = {
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
VariableType::INT8(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// GLUE, ACC, STRING_ID, FLAG_I8, CONST_POOL
// GLUE, STRING_ID, FLAG_I8, CONST_POOL
DEF_CALL_SIGNATURE(BaselineDeprecatedLdmodulevarPrefId32Imm8)
{
// 5 : 5 input parameters
CallSignature signature("BaselineDeprecatedLdmodulevarPrefId32Imm8", 0, 5,
// 4 : 4 input parameters
CallSignature signature("BaselineDeprecatedLdmodulevarPrefId32Imm8", 0, 4,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 5 : 5 input parameters
std::array<VariableType, 5> params = {
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT32(),
VariableType::INT8(),
VariableType::NATIVE_POINTER(),
@ -3901,16 +3690,15 @@ DEF_CALL_SIGNATURE(BaselineDeprecatedStclasstoglobalrecordPrefId32)
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
}
// ACC, SP
// SP
DEF_CALL_SIGNATURE(BaselineDeprecatedLdhomeobjectPrefNone)
{
// 2 : 2 input parameters
CallSignature signature("BaselineDeprecatedLdhomeobjectPrefNone", 0, 2,
// 1 : 1 input parameters
CallSignature signature("BaselineDeprecatedLdhomeobjectPrefNone", 0, 1,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 2 : 2 input parameters
std::array<VariableType, 2> params = {
VariableType::JS_ANY(),
// 1 : 1 input parameters
std::array<VariableType, 1> params = {
VariableType::NATIVE_POINTER(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();
@ -4128,15 +3916,14 @@ DEF_CALL_SIGNATURE(BaselineCallRuntimeDefineSendableClassPrefImm16Id16Id16Imm16V
DEF_CALL_SIGNATURE(BaselineCallRuntimeLdSendableClassPrefImm16)
{
// 4 : 4 input parameters
CallSignature signature("BaselineCallRuntimeLdSendableClassPrefImm16", 0, 4,
// 3 : 3 input parameters
CallSignature signature("BaselineCallRuntimeLdSendableClassPrefImm16", 0, 3,
ArgumentsOrder::DEFAULT_ORDER, VariableType::JS_ANY());
*callSign = signature;
// 4 : 4 input parameters
std::array<VariableType, 4> params = {
// 3 : 3 input parameters
std::array<VariableType, 3> params = {
VariableType::NATIVE_POINTER(),
VariableType::NATIVE_POINTER(),
VariableType::JS_ANY(),
VariableType::INT16(),
};
BASELINE_STUB_CALL_SIGNATURE_COMMON_SET();

View File

@ -56,33 +56,24 @@ static constexpr size_t NINTH_PARAMETER = 8;
BASELINE_COMPILER_BUILTIN_LIST(DECL_BASELINE_CALL_SIGNATURE)
// describe the parameters of the baseline builtins
DEFINE_PARAMETER_INDEX(BaselineLdObjByName,
GLUE, SP, ACC, PROFILE_TYPE_INFO, STRING_ID, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineTryLdGLobalByNameImm8ID16,
GLUE, SP, STRING_ID, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineStToGlobalRecordImm16ID16,
GLUE, SP, ACC, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineLdaStrID16,
GLUE, SP, ACC, STRING_ID)
GLUE, SP, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineCallArg1Imm8V8,
GLUE, SP, ARG0, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineJmpImm16,
GLUE, SP, FUNC, PROFILE_TYPE_INFO, HOTNESS_COUNTER, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineLdsymbol,
GLUE, ACC)
GLUE)
DEFINE_PARAMETER_INDEX(BaselineLdglobal,
GLUE, ACC)
GLUE)
DEFINE_PARAMETER_INDEX(BaselinePoplexenv,
GLUE, SP)
DEFINE_PARAMETER_INDEX(BaselineGetunmappedargs,
GLUE, SP, ACC)
DEFINE_PARAMETER_INDEX(BaselineAsyncfunctionenter,
GLUE, SP, ACC)
GLUE, SP)
DEFINE_PARAMETER_INDEX(BaselineCreateasyncgeneratorobjV8,
GLUE, SP, GEN_FUNC, ACC)
DEFINE_PARAMETER_INDEX(BaselineDebugger,
@ -172,7 +163,7 @@ DEFINE_PARAMETER_INDEX(BaselineOr2Imm8V8,
DEFINE_PARAMETER_INDEX(BaselineXor2Imm8V8,
GLUE, SP, LEFT, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineExpImm8V8,
GLUE, SP, BASE, SLOT_ID)
GLUE, SP, BASE)
DEFINE_PARAMETER_INDEX(BaselineTypeofImm8,
GLUE, ACC)
DEFINE_PARAMETER_INDEX(BaselineTypeofImm16,
@ -206,7 +197,7 @@ DEFINE_PARAMETER_INDEX(BaselineCallthis3Imm8V8V8V8V8,
DEFINE_PARAMETER_INDEX(BaselineCallthisrangeImm8Imm8V8,
GLUE, SP, ACTUAL_NUM_ARGS, THIS_REG, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineSupercallthisrangeImm8Imm8V8,
GLUE, SP, ACC, RANGE, V0, HOTNESS_COUNTER)
GLUE, SP, RANGE, V0, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineSupercallarrowrangeImm8Imm8V8,
GLUE, SP, ACC, RANGE, V0)
DEFINE_PARAMETER_INDEX(BaselineDefinefuncImm8Id16Imm8,
@ -230,7 +221,7 @@ DEFINE_PARAMETER_INDEX(BaselineCallargs3Imm8V8V8V8,
DEFINE_PARAMETER_INDEX(BaselineCallrangeImm8Imm8V8,
GLUE, SP, ACTUAL_NUM_ARGS, ARG_START, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineLdexternalmodulevarImm8,
GLUE, ACC, INDEX)
GLUE, INDEX)
DEFINE_PARAMETER_INDEX(BaselineLdthisbynameImm8Id16,
GLUE, SP, STRING_ID, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineDefinegettersetterbyvalueV8V8V8V8,
@ -250,7 +241,7 @@ DEFINE_PARAMETER_INDEX(BaselineStthisbyvalueImm8V8,
DEFINE_PARAMETER_INDEX(BaselineStthisbyvalueImm16V8,
GLUE, SP, SLOT_ID, PROP_KEY)
DEFINE_PARAMETER_INDEX(BaselineDynamicimport,
GLUE, SP, ACC)
GLUE, SP)
DEFINE_PARAMETER_INDEX(BaselineDefineclasswithbufferImm8Id16Id16Imm16V8,
GLUE, SP, METHOD_ID, LITERRAL_ID, LENGTH, V0)
DEFINE_PARAMETER_INDEX(BaselineDefineclasswithbufferImm16Id16Id16Imm16V8,
@ -265,10 +256,6 @@ DEFINE_PARAMETER_INDEX(BaselineGettemplateobjectImm16,
GLUE, SP, ACC)
DEFINE_PARAMETER_INDEX(BaselineGetnextpropnameV8,
GLUE, SP, ITER)
DEFINE_PARAMETER_INDEX(BaselineJeqzImm8,
ACC, OFFSET, PROFILE_TYPE_INFO, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineJeqzImm16,
ACC, OFFSET, PROFILE_TYPE_INFO, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineSetobjectwithprotoImm8V8,
GLUE, SP, ACC, PROTO)
DEFINE_PARAMETER_INDEX(BaselineDelobjpropV8,
@ -320,11 +307,11 @@ DEFINE_PARAMETER_INDEX(BaselineAsyncfunctionrejectV8,
DEFINE_PARAMETER_INDEX(BaselineCopyrestargsImm8,
GLUE, SP, ACC, REST_IDX)
DEFINE_PARAMETER_INDEX(BaselineLdlexvarImm4Imm4,
SP, ACC, LEVEL, SLOT)
SP, LEVEL, SLOT)
DEFINE_PARAMETER_INDEX(BaselineStlexvarImm4Imm4,
GLUE, SP, ACC, LEVEL, SLOT)
DEFINE_PARAMETER_INDEX(BaselineGetmodulenamespaceImm8,
GLUE, ACC, INDEX)
GLUE, INDEX)
DEFINE_PARAMETER_INDEX(BaselineStmodulevarImm8,
GLUE, ACC, INDEX)
DEFINE_PARAMETER_INDEX(BaselineTryldglobalbynameImm16Id16,
@ -350,27 +337,17 @@ DEFINE_PARAMETER_INDEX(BaselineStownbynameImm8Id16V8,
DEFINE_PARAMETER_INDEX(BaselineStownbynameImm16Id16V8,
GLUE, SP, RECEIVER, STRING_ID, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineLdsuperbynameImm8Id16,
GLUE, SP, ACC, STRING_ID)
GLUE, SP, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineLdsuperbynameImm16Id16,
GLUE, SP, ACC, STRING_ID)
GLUE, SP, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineStsuperbynameImm8Id16V8,
GLUE, SP, ACC, RECEIVER, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineStsuperbynameImm16Id16V8,
GLUE, SP, ACC, RECEIVER, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineLdlocalmodulevarImm8,
GLUE, ACC, INDEX)
GLUE, INDEX)
DEFINE_PARAMETER_INDEX(BaselineStconsttoglobalrecordImm16Id16,
GLUE, SP, ACC, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineJeqzImm32,
GLUE, SP, ACC, FUNC, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineJnezImm8,
GLUE, SP, ACC, FUNC, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineJnezImm16,
GLUE, SP, ACC, FUNC, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineJnezImm32,
GLUE, SP, ACC, FUNC, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineStownbyvaluewithnamesetImm8V8V8,
GLUE, SP, RECEIVER_ID, PROP_KEY_ID, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineStownbyvaluewithnamesetImm16V8V8,
@ -381,23 +358,17 @@ DEFINE_PARAMETER_INDEX(BaselineStownbynamewithnamesetImm16Id16V8,
GLUE, SP, STRING_ID, RECEIVER, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineLdbigintId16,
GLUE, SP, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineJmpImm8,
GLUE, SP, FUNC, PROFILE_TYPE_INFO, HOTNESS_COUNTER, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineJmpImm32,
GLUE, SP, FUNC, PROFILE_TYPE_INFO, HOTNESS_COUNTER, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineFldaiImm64,
ACC, IMM)
IMM)
DEFINE_PARAMETER_INDEX(BaselineReturn, GLUE, SP, OFFSET)
DEFINE_PARAMETER_INDEX(BaselineLdlexvarImm8Imm8,
ACC, LEVEL, SLOT, SP)
LEVEL, SLOT, SP)
DEFINE_PARAMETER_INDEX(BaselineStlexvarImm8Imm8,
GLUE, ACC, LEVEL, SLOT, SP)
DEFINE_PARAMETER_INDEX(BaselineJnstricteqV8Imm16,
GLUE)
DEFINE_PARAMETER_INDEX(BaselineAsyncgeneratorrejectV8,
GLUE, SP, ACC, V0)
DEFINE_PARAMETER_INDEX(BaselineNop,
GLUE)
DEFINE_PARAMETER_INDEX(BaselineSetgeneratorstateImm8,
GLUE, ACC, INDEX)
DEFINE_PARAMETER_INDEX(BaselineGetasynciteratorImm8,
@ -409,7 +380,7 @@ DEFINE_PARAMETER_INDEX(BaselineStPrivatePropertyImm8Imm16Imm16V8,
DEFINE_PARAMETER_INDEX(BaselineTestInImm8Imm16Imm16,
GLUE, SP, ACC, INDEX0, INDEX1, ENV)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdlexenvPrefNone,
ACC, SP)
SP)
DEFINE_PARAMETER_INDEX(BaselineWideCreateobjectwithexcludedkeysPrefImm16V8V8,
GLUE, SP, V0, V1, V2)
DEFINE_PARAMETER_INDEX(BaselineThrowPrefNone,
@ -443,19 +414,19 @@ DEFINE_PARAMETER_INDEX(BaselineWideCallrangePrefImm16V8,
DEFINE_PARAMETER_INDEX(BaselineThrowConstassignmentPrefV8,
GLUE, SP, V0)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedTonumberPrefV8,
GLUE, SP, ACC, V0)
GLUE, SP, V0)
DEFINE_PARAMETER_INDEX(BaselineWideCallthisrangePrefImm16V8,
GLUE, SP, ACC, ACTUAL_NUM_ARGS, VREG_ID, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineThrowIfnotobjectPrefV8,
GLUE, SP, V0)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedTonumericPrefV8,
GLUE, SP, ACC, V0)
GLUE, SP, V0)
DEFINE_PARAMETER_INDEX(BaselineWideSupercallthisrangePrefImm16V8,
GLUE, SP, RANGE, V0)
DEFINE_PARAMETER_INDEX(BaselineThrowUndefinedifholePrefV8V8,
GLUE, SP, V0, V1)
DEFINE_PARAMETER_INDEX(BaselineThrowUndefinedifholewithnamePrefId16,
GLUE, ACC, SP, STRING_ID)
GLUE, SP, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedNegPrefV8,
GLUE, SP, V0)
DEFINE_PARAMETER_INDEX(BaselineWideSupercallarrowrangePrefImm16V8,
@ -483,7 +454,7 @@ DEFINE_PARAMETER_INDEX(BaselineWideCopyrestargsPrefImm16,
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCallarg1PrefV8V8,
GLUE, SP, FUNC_REG, A0, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineWideLdlexvarPrefImm16Imm16,
GLUE, SP, ACC, LEVEL, SLOT)
SP, LEVEL, SLOT)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCallargs2PrefV8V8V8,
GLUE, SP, FUNC_REG, A0, A1, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineWideStlexvarPrefImm16Imm16,
@ -491,7 +462,7 @@ DEFINE_PARAMETER_INDEX(BaselineWideStlexvarPrefImm16Imm16,
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCallargs3PrefV8V8V8V8,
GLUE, SP, FUNC_REG, A0, A1, A2)
DEFINE_PARAMETER_INDEX(BaselineWideGetmodulenamespacePrefImm16,
GLUE, ACC, INDEX)
GLUE, INDEX)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCallrangePrefImm16V8,
GLUE, SP, INDEX, FUNC_REG, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineWideStmodulevarPrefImm16,
@ -499,15 +470,15 @@ DEFINE_PARAMETER_INDEX(BaselineWideStmodulevarPrefImm16,
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCallspreadPrefV8V8V8,
GLUE, SP, V0, V1, V2)
DEFINE_PARAMETER_INDEX(BaselineWideLdlocalmodulevarPrefImm16,
GLUE, ACC, INDEX)
GLUE, INDEX)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCallthisrangePrefImm16V8,
GLUE, SP, INDEX, FUNC_REG, HOTNESS_COUNTER)
DEFINE_PARAMETER_INDEX(BaselineWideLdexternalmodulevarPrefImm16,
GLUE, ACC, INDEX)
GLUE, INDEX)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedDefineclasswithbufferPrefId16Imm16Imm16V8V8,
GLUE, SP, METHOD_ID, LITERAL_ID, LENGTH, VREG_IDS)
DEFINE_PARAMETER_INDEX(BaselineWideLdpatchvarPrefImm16,
GLUE, SP, ACC, INDEX)
GLUE, SP, INDEX)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedResumegeneratorPrefV8,
GLUE, SP, ACC, V0)
DEFINE_PARAMETER_INDEX(BaselineWideStpatchvarPrefImm16,
@ -529,7 +500,7 @@ DEFINE_PARAMETER_INDEX(BaselineDeprecatedCopydatapropertiesPrefV8V8,
DEFINE_PARAMETER_INDEX(BaselineDeprecatedSetobjectwithprotoPrefV8V8,
GLUE, SP, ACC, V0, V1)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdobjbyvaluePrefV8V8,
GLUE, SP, ACC, V0, V1)
GLUE, SP, V0, V1)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdsuperbyvaluePrefV8V8,
GLUE, SP, V0, V1)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdobjbyindexPrefV8Imm32,
@ -545,15 +516,15 @@ DEFINE_PARAMETER_INDEX(BaselineDeprecatedStlexvarPrefImm8Imm8V8,
DEFINE_PARAMETER_INDEX(BaselineDeprecatedStlexvarPrefImm16Imm16V8,
GLUE, SP, LEVEL, SLOT, V0)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedGetmodulenamespacePrefId32,
GLUE, ACC, STRING_ID, SP)
GLUE, STRING_ID, SP)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedStmodulevarPrefId32,
GLUE, ACC, STRING_ID, SP)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdobjbynamePrefId32V8,
GLUE, SP, ACC, V0, STRING_ID)
GLUE, SP, V0, STRING_ID)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdsuperbynamePrefId32V8,
GLUE, SP, ACC, STRING_ID, V0)
GLUE, SP, STRING_ID, V0)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdmodulevarPrefId32Imm8,
GLUE, ACC, STRING_ID, FLAG_I8, SP)
GLUE, STRING_ID, FLAG_I8, SP)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedStconsttoglobalrecordPrefId32,
GLUE, ACC, STRING_ID, SP)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedStlettoglobalrecordPrefId32,
@ -561,7 +532,7 @@ DEFINE_PARAMETER_INDEX(BaselineDeprecatedStlettoglobalrecordPrefId32,
DEFINE_PARAMETER_INDEX(BaselineDeprecatedStclasstoglobalrecordPrefId32,
GLUE, ACC, STRING_ID, SP)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedLdhomeobjectPrefNone,
ACC, SP)
SP)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedCreateobjecthavingmethodPrefImm16,
GLUE, ACC, SP, IMM_I16)
DEFINE_PARAMETER_INDEX(BaselineDeprecatedDynamicimportPrefV8,
@ -587,7 +558,7 @@ DEFINE_PARAMETER_INDEX(BaselineCallRuntimeCallInitPrefImm8V8,
DEFINE_PARAMETER_INDEX(BaselineCallRuntimeDefineSendableClassPrefImm16Id16Id16Imm16V8,
GLUE, SP, METHOD_ID, LITERAL_ID, LENGTH, V0)
DEFINE_PARAMETER_INDEX(BaselineCallRuntimeLdSendableClassPrefImm16,
GLUE, SP, ACC, LEVEL)
GLUE, SP, LEVEL)
DEFINE_PARAMETER_INDEX(BaselineCallRuntimeIstruePrefImm8,
GLUE, SP, ACC, SLOT_ID)
DEFINE_PARAMETER_INDEX(BaselineCallRuntimeIsfalsePrefImm8,

View File

@ -345,7 +345,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDLEXVAR_IMM4_IMM4)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(level));
parameters.emplace_back(static_cast<int32_t>(slot));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
@ -386,7 +385,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDLEXVAR_IMM8_IMM8)
LOG_INST() << " solt: " << static_cast<int32_t>(slot);
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(level));
parameters.emplace_back(static_cast<int32_t>(slot));
parameters.emplace_back(BaselineSpecialParameter::SP);
@ -446,7 +444,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDSYMBOL)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
@ -462,7 +459,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDGLOBAL)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
@ -1080,7 +1076,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDSUPERBYNAME_IMM8_ID16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(stringId));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -1119,7 +1114,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDSUPERBYNAME_IMM16_ID16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(stringId));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -1198,7 +1192,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDA_STR_ID16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(stringId));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -1214,7 +1207,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(FLDAI_IMM64)
LOG_INST() << " BaselineFldaiImm64 Address: " << std::hex << builtinAddress << std::endl;
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(imm);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -1712,7 +1704,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDEXTERNALMODULEVAR_IMM8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(index);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -1783,7 +1774,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(LDLOCALMODULEVAR_IMM8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(index);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -2045,7 +2035,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(ASYNCFUNCTIONENTER)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
@ -2370,7 +2359,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(SUPERCALLTHISRANGE_IMM8_IMM8_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int16_t>(range));
parameters.emplace_back(static_cast<int16_t>(v0));
parameters.emplace_back(BaselineSpecialParameter::HOTNESS_COUNTER);
@ -2590,7 +2578,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(GETMODULENAMESPACE_IMM8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(index));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -2699,7 +2686,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DYNAMICIMPORT)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
@ -2977,19 +2963,16 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(XOR2_IMM8_V8)
BYTECODE_BASELINE_HANDLER_IMPLEMENT(EXP_IMM8_V8)
{
uint8_t vBaseId = READ_INST_8_1();
uint8_t slotId = READ_INST_8_0();
auto *thread = vm->GetAssociatedJSThread();
Address builtinAddress =
thread->GetBaselineStubEntry(BaselineStubCSigns::BaselineExpImm8V8);
LOG_INST() << " BaselineExpImm8V8 Address: " << std::hex << builtinAddress;
LOG_INST() << " slotId: " << static_cast<int32_t>(slotId);
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(VirtualRegister(vBaseId));
parameters.emplace_back(static_cast<int32_t>(slotId));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
@ -3767,7 +3750,7 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_COPYRESTARGS_PREF_IMM16)
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP, ACC, LEVEL, SLOT
// SP, LEVEL, SLOT
BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDLEXVAR_PREF_IMM16_IMM16)
{
uint16_t level = READ_INST_16_1();
@ -3780,9 +3763,7 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDLEXVAR_PREF_IMM16_IMM16)
LOG_INST() << " slot: " << static_cast<int32_t>(slot);
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(static_cast<int32_t>(level));
parameters.emplace_back(static_cast<int32_t>(slot));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
@ -3821,7 +3802,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_GETMODULENAMESPACE_PREF_IMM16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(index);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -3843,7 +3823,7 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_STMODULEVAR_PREF_IMM16)
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
}
// GLUE, ACC, INDEX
// GLUE, INDEX
BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDLOCALMODULEVAR_PREF_IMM16)
{
int16_t index = READ_INST_16_1();
@ -3854,13 +3834,12 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDLOCALMODULEVAR_PREF_IMM16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(index);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, ACC, INDEX
// GLUE, INDEX
BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDEXTERNALMODULEVAR_PREF_IMM16)
{
int16_t index = READ_INST_16_1();
@ -3871,13 +3850,12 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDEXTERNALMODULEVAR_PREF_IMM16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(index);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP, ACC, INDEX
// GLUE, SP, INDEX
BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDPATCHVAR_PREF_IMM16)
{
int16_t index = READ_INST_16_1();
@ -3889,7 +3867,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(WIDE_LDPATCHVAR_PREF_IMM16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(index);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -4125,7 +4102,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(THROW_PATTERNNONCOERCIBLE_PREF_NONE)
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
}
// GLUE
BYTECODE_BASELINE_HANDLER_IMPLEMENT(THROW_NOTEXISTS_PREF_NONE)
{
(void)bytecodeArray;
@ -4200,7 +4176,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(THROW_UNDEFINEDIFHOLEWITHNAME_PREF_ID16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(static_cast<int32_t>(stringId));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
@ -4236,11 +4211,10 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(THROW_IFNOTOBJECT_PREF_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(v0);
parameters.emplace_back(VirtualRegister(v0));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
}
// GLUE, SP, V0
BYTECODE_BASELINE_HANDLER_IMPLEMENT(THROW_CONSTASSIGNMENT_PREF_V8)
{
int8_t v0 = READ_INST_8_1();
@ -4252,7 +4226,7 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(THROW_CONSTASSIGNMENT_PREF_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(v0);
parameters.emplace_back(VirtualRegister(v0));
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
}
@ -4532,9 +4506,9 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDLEXENV_PREF_NONE)
LOG_INST() << " BaselineDeprecatedLdlexenvPrefNone Address: " << std::hex << builtinAddress;
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(BaselineSpecialParameter::SP);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP
@ -4611,7 +4585,7 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_CREATEOBJECTWITHBUFFER_PREF_IMM16
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP, ACC, V0
// GLUE, SP, V0
BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_TONUMBER_PREF_V8)
{
int8_t v0 = READ_INST_8_1();
@ -4623,13 +4597,12 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_TONUMBER_PREF_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(v0);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP, ACC, V0
// GLUE, SP, V0
BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_TONUMERIC_PREF_V8)
{
int8_t v0 = READ_INST_8_1();
@ -4641,7 +4614,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_TONUMERIC_PREF_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(v0);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -5023,7 +4995,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_SETOBJECTWITHPROTO_PREF_V8_V8)
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP, ACC, V0, V1
BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDOBJBYVALUE_PREF_V8_V8)
{
int8_t v0 = READ_INST_8_1();
@ -5036,7 +5007,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDOBJBYVALUE_PREF_V8_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(v0);
parameters.emplace_back(v1);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
@ -5188,7 +5158,7 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_STLEXVAR_PREF_IMM16_IMM16_V8)
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
}
// GLUE, ACC, STRING_ID, SP
// GLUE, STRING_ID, SP
BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_GETMODULENAMESPACE_PREF_ID32)
{
int32_t stringId = static_cast<int32_t>(READ_INST_32_1());
@ -5199,7 +5169,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_GETMODULENAMESPACE_PREF_ID32)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(stringId);
parameters.emplace_back(BaselineSpecialParameter::SP);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
@ -5222,7 +5191,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_STMODULEVAR_PREF_ID32)
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
}
// GLUE, SP, ACC, V0, STRING_ID
BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDOBJBYNAME_PREF_ID32_V8)
{
int32_t stringId = static_cast<int32_t>(READ_INST_32_1());
@ -5235,14 +5203,12 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDOBJBYNAME_PREF_ID32_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(v0);
parameters.emplace_back(stringId);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
}
// GLUE, SP, ACC, STRING_ID, V0
BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDSUPERBYNAME_PREF_ID32_V8)
{
int32_t stringId = static_cast<int32_t>(READ_INST_32_1());
@ -5255,7 +5221,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDSUPERBYNAME_PREF_ID32_V8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(stringId);
parameters.emplace_back(v0);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
@ -5273,7 +5238,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDMODULEVAR_PREF_ID32_IMM8)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(stringId);
parameters.emplace_back(flagI8);
parameters.emplace_back(BaselineSpecialParameter::SP);
@ -5343,7 +5307,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(DEPRECATED_LDHOMEOBJECT_PREF_NONE)
LOG_INST() << " BaselineDeprecatedLdhomeobjectPrefNone Address: " << std::hex << builtinAddress;
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(BaselineSpecialParameter::SP);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();
@ -5602,7 +5565,6 @@ BYTECODE_BASELINE_HANDLER_IMPLEMENT(CALLRUNTIME_LDSENDABLECLASS_PREF_IMM16)
std::vector<BaselineParameter> parameters;
parameters.emplace_back(BaselineSpecialParameter::GLUE);
parameters.emplace_back(BaselineSpecialParameter::SP);
parameters.emplace_back(BaselineSpecialParameter::ACC);
parameters.emplace_back(level);
GetBaselineAssembler().CallBuiltin(builtinAddress, parameters);
GetBaselineAssembler().SaveResultIntoAcc();

View File

@ -17,12 +17,10 @@
namespace panda::ecmascript::kungfu {
#define BASELINE_COMPILER_BUILTIN_LIST(V) \
V(BaselineLdObjByName) \
V(BaselineTryLdGLobalByNameImm8ID16) \
V(BaselineStToGlobalRecordImm16ID16) \
V(BaselineLdaStrID16) \
V(BaselineCallArg1Imm8V8) \
V(BaselineJmpImm16) \
V(BaselineLdsymbol) \
V(BaselineLdglobal) \
V(BaselinePoplexenv) \
@ -119,8 +117,6 @@ namespace panda::ecmascript::kungfu {
V(BaselineGettemplateobjectImm8) \
V(BaselineGettemplateobjectImm16) \
V(BaselineGetnextpropnameV8) \
V(BaselineJeqzImm8) \
V(BaselineJeqzImm16) \
V(BaselineSetobjectwithprotoImm8V8) \
V(BaselineDelobjpropV8) \
V(BaselineSuspendgeneratorV8) \
@ -168,24 +164,17 @@ namespace panda::ecmascript::kungfu {
V(BaselineStsuperbynameImm16Id16V8) \
V(BaselineLdlocalmodulevarImm8) \
V(BaselineStconsttoglobalrecordImm16Id16) \
V(BaselineJeqzImm32) \
V(BaselineJnezImm8) \
V(BaselineJnezImm16) \
V(BaselineJnezImm32) \
V(BaselineStownbyvaluewithnamesetImm8V8V8) \
V(BaselineStownbyvaluewithnamesetImm16V8V8) \
V(BaselineStownbynamewithnamesetImm8Id16V8) \
V(BaselineStownbynamewithnamesetImm16Id16V8) \
V(BaselineLdbigintId16) \
V(BaselineJmpImm8) \
V(BaselineJmpImm32) \
V(BaselineFldaiImm64) \
V(BaselineReturn) \
V(BaselineLdlexvarImm8Imm8) \
V(BaselineStlexvarImm8Imm8) \
V(BaselineJnstricteqV8Imm16) \
V(BaselineAsyncgeneratorrejectV8) \
V(BaselineNop) \
V(BaselineSetgeneratorstateImm8) \
V(BaselineGetasynciteratorImm8) \
V(BaselineLdPrivatePropertyImm8Imm16Imm16) \

View File

@ -47,7 +47,7 @@ void BaselineStubBuilder::CheckExceptionWithVar(GateRef glue, GateRef sp, GateRe
}
}
void BaselineStubBuilder::CheckException(GateRef glue, GateRef sp, GateRef res, GateRef acc)
void BaselineStubBuilder::CheckException(GateRef glue, GateRef sp, GateRef res)
{
auto env = GetEnvironment();
Label isException(env);
@ -55,6 +55,8 @@ void BaselineStubBuilder::CheckException(GateRef glue, GateRef sp, GateRef res,
Branch(TaggedIsException(res), &isException, &notException);
Bind(&isException);
{
GateRef frame = GetFrame(sp);
GateRef acc = GetAccFromFrame(frame);
DispatchLast(glue, sp, acc);
Return();
}
@ -64,7 +66,7 @@ void BaselineStubBuilder::CheckException(GateRef glue, GateRef sp, GateRef res,
}
}
void BaselineStubBuilder::CheckExceptionAndReturn(GateRef glue, GateRef sp, GateRef res, GateRef acc)
void BaselineStubBuilder::CheckExceptionReturn(GateRef glue, GateRef sp, GateRef res)
{
auto env = GetEnvironment();
Label isException(env);
@ -72,6 +74,8 @@ void BaselineStubBuilder::CheckExceptionAndReturn(GateRef glue, GateRef sp, Gate
Branch(TaggedIsException(res), &isException, &notException);
Bind(&isException);
{
GateRef frame = GetFrame(sp);
GateRef acc = GetAccFromFrame(frame);
DispatchLast(glue, sp, acc);
Return(acc);
}

File diff suppressed because it is too large Load Diff

View File

@ -74,8 +74,8 @@ public:
inline void SetEnvToFrame(GateRef glue, GateRef frame, GateRef value);
inline void CheckExceptionWithVar(GateRef glue, GateRef sp, GateRef res, GateRef acc);
inline void CheckException(GateRef glue, GateRef sp, GateRef res, GateRef acc);
inline void CheckExceptionAndReturn(GateRef glue, GateRef sp, GateRef res, GateRef acc);
inline void CheckException(GateRef glue, GateRef sp, GateRef res);
inline void CheckExceptionReturn(GateRef glue, GateRef sp, GateRef res);
inline void CheckExceptionWithJump(GateRef glue, GateRef sp, GateRef res, GateRef acc, Label *jump);
inline void CheckExceptionWithJumpAndReturn(GateRef glue, GateRef sp, GateRef res, GateRef acc, Label *jump);
inline void CheckPendingException(GateRef glue, GateRef sp, GateRef res, GateRef acc);