Builtins inlining off

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IABD6F?from=project-issue
Signed-off-by: 刘智杰 <liuzhijie9@huawei.com>
Change-Id: If5af504b6909c1d911acb4758b55fdf6a95eafa9
This commit is contained in:
刘智杰 2024-07-08 15:43:00 +08:00
parent 3d15b0df15
commit 72251b6ce8
4 changed files with 5 additions and 21 deletions

View File

@ -344,15 +344,6 @@ void NativeInlineLowering::RunNativeInlineLowering()
case BuiltinsStubCSigns::ID::ReflectApply:
TryInlineReflectApply(gate, argc, id, skipThis);
break;
case BuiltinsStubCSigns::ID::FunctionPrototypeApply:
TryInlineFunctionPrototypeApply(gate, argc, id, skipThis);
break;
case BuiltinsStubCSigns::ID::FunctionPrototypeBind:
TryInlineFunctionPrototypeBind(gate, argc, id, skipThis);
break;
case BuiltinsStubCSigns::ID::FunctionPrototypeCall:
TryInlineFunctionPrototypeCall(gate, argc, id, skipThis);
break;
case BuiltinsStubCSigns::ID::FunctionPrototypeHasInstance:
TryInlineFunctionPrototypeHasInstance(gate, argc, id, skipThis);
break;

View File

@ -345,6 +345,7 @@ JSTaggedValue ObjectFastOperator::TrySetPropertyByNameThroughCacheAtLocal(JSThre
JSTaggedValue key, JSTaggedValue value)
{
bool isTagged = true;
JSTaggedValue originValue = value;
auto *hclass = receiver.GetTaggedObject()->GetClass();
if (LIKELY(!hclass->IsDictionaryMode())) {
ASSERT(!TaggedArray::Cast(JSObject::Cast(receiver)->GetProperties().GetTaggedObject())->IsDictionaryMode());
@ -376,16 +377,16 @@ JSTaggedValue ObjectFastOperator::TrySetPropertyByNameThroughCacheAtLocal(JSThre
return JSTaggedValue::Hole();
}
JSHandle<JSObject> objHandle(thread, receiver);
JSHandle<JSTaggedValue> keyHandle(thread, key);
JSHandle<JSTaggedValue> valueHandle(thread, value);
auto actualValue = JSHClass::ConvertOrTransitionWithRep(thread, objHandle,
keyHandle, JSHandle<JSTaggedValue>(thread, value), attr);
JSHandle<JSTaggedValue>(thread, key), valueHandle, attr);
receiver = objHandle.GetTaggedValue();
key = keyHandle.GetTaggedValue();
originValue = valueHandle.GetTaggedValue();
value = actualValue.value;
isTagged = actualValue.isTagged;
}
if (receiver.IsJSShared()) {
if (!ClassHelper::MatchFieldType(attr.GetSharedFieldType(), value)) {
if (!ClassHelper::MatchFieldType(attr.GetSharedFieldType(), originValue)) {
THROW_TYPE_ERROR_AND_RETURN((thread), GET_MESSAGE_STRING(SetTypeMismatchedSharedProperty),
JSTaggedValue::Exception());
}

View File

@ -84,11 +84,8 @@ print(time.getTime()); //: NaN
time = new Date(50000000000)
let true_func = time.getTime
//aot: [trace] aot inline builtin: Function.prototype.call, caller function name:func_main_0@builtinDateGetTime
print(true_func.call(time)) //: 50000000000
//aot: [trace] aot inline builtin: Function.prototype.call, caller function name:func_main_0@builtinDateGetTime
print(true_func.call(time, 1)) //: 50000000000
//aot: [trace] aot inline builtin: Function.prototype.call, caller function name:func_main_0@builtinDateGetTime
print(true_func.call(time, 1, 2)) //: 50000000000
if (ArkTools.isAOTCompiled(printDateGetTimeOneParam)) {

View File

@ -17,18 +17,13 @@ declare function print(arg:any):string;
function foo(a: any, b: any) {
return this + a + b;
}
//aot: [trace] aot inline builtin: Function.prototype.apply, caller function name:func_main_0@builtinFunctionFunction
print(foo.apply(1, [2, 3])); //: 6
//aot: [trace] aot inline builtin: Function.prototype.apply, caller function name:func_main_0@builtinFunctionFunction
print(foo.apply(1)); //: NaN
//aot: [trace] aot inline builtin: Function.prototype.bind, caller function name:func_main_0@builtinFunctionFunction
let bfoo = foo.bind(2);
print(bfoo(3, 4)); //: 9
let bfoo1 = foo.bind(5, 6);
print(bfoo1(7)); //: 18
//aot: [trace] aot inline builtin: Function.prototype.call, caller function name:func_main_0@builtinFunctionFunction
print(foo.call(10, 20)); //: NaN
//aot: [trace] aot inline builtin: Function.prototype.call, caller function name:func_main_0@builtinFunctionFunction
print(foo.call(10, 20, 30)); //: 60
class C {}
//aot: [trace] aot inline builtin: Function.prototype.hasInstance, caller function name:func_main_0@builtinFunctionFunction