mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
!8064 Builtins inlining off
Merge pull request !8064 from 刘智杰/builtins_inlining
This commit is contained in:
commit
b3ca23133e
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user