mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 04:00:37 +00:00
Fix ORDINARY_HAS_INSTANCE retype bug
Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8VPSO?from=project-issue Signed-off-by: liuzhijie <liuzhijie9@huawei.com> Change-Id: I8751442342065fbbba515189b01704ff10325bb0
This commit is contained in:
parent
c84ed8cba7
commit
cc8e05d551
@ -155,6 +155,7 @@ GateRef NumberSpeculativeRetype::VisitGate(GateRef gate)
|
||||
case OpCode::LD_LOCAL_MODULE_VAR:
|
||||
case OpCode::STORE_MODULE_VAR:
|
||||
case OpCode::STRING_FROM_SINGLE_CHAR_CODE:
|
||||
case OpCode::ORDINARY_HAS_INSTANCE:
|
||||
return VisitOthers(gate);
|
||||
default:
|
||||
return Circuit::NullGate();
|
||||
|
@ -188,6 +188,7 @@ group("ark_aot_ts_test") {
|
||||
"optimization",
|
||||
"optimized_call",
|
||||
"or",
|
||||
"ordinaryhasinstance",
|
||||
"pgo_call",
|
||||
"pgo_call_js",
|
||||
"pgo_class_operation",
|
||||
|
18
test/aottest/ordinaryhasinstance/BUILD.gn
Normal file
18
test/aottest/ordinaryhasinstance/BUILD.gn
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//arkcompiler/ets_runtime/test/test_helper.gni")
|
||||
|
||||
host_aot_test_action("ordinaryhasinstance") {
|
||||
deps = []
|
||||
}
|
12
test/aottest/ordinaryhasinstance/expect_output.txt
Normal file
12
test/aottest/ordinaryhasinstance/expect_output.txt
Normal file
@ -0,0 +1,12 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
25
test/aottest/ordinaryhasinstance/ordinaryhasinstance.ts
Normal file
25
test/aottest/ordinaryhasinstance/ordinaryhasinstance.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
class Matrix {
|
||||
static isMatrix(value: Matrix): boolean {
|
||||
return value !== null && value instanceof Matrix;
|
||||
}
|
||||
}
|
||||
|
||||
let trainingSet: Matrix = new Matrix();
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
Matrix.isMatrix(trainingSet);
|
||||
}
|
Loading…
Reference in New Issue
Block a user