mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
Add retype for get_exception
Add retype processing for GET_EXCEPTION opcode Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAWEEF Signed-off-by: wangyuxin <wangyuxin53@huawei.com> Change-Id: Ib74d441c402a6e9f72f83baa0d991ca901cfd1df
This commit is contained in:
parent
5b16122995
commit
8fb913d057
@ -346,6 +346,7 @@ GateRef NumberSpeculativeRetype::VisitGate(GateRef gate)
|
||||
case OpCode::ARRAY_SORT:
|
||||
case OpCode::FINISH_ALLOCATE:
|
||||
case OpCode::IS_CALLABLE_CHECK:
|
||||
case OpCode::GET_EXCEPTION:
|
||||
return VisitOthers(gate);
|
||||
default:
|
||||
return Circuit::NullGate();
|
||||
|
@ -347,6 +347,7 @@ group("ark_aot_ts_test") {
|
||||
"webkit_call_convention",
|
||||
"retype_isnan",
|
||||
"inline_abs",
|
||||
"retype_test",
|
||||
]
|
||||
|
||||
if (!is_debug) {
|
||||
|
21
test/aottest/retype_test/BUILD.gn
Normal file
21
test/aottest/retype_test/BUILD.gn
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2024 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("retype_test") {
|
||||
deps = []
|
||||
is_enable_pgo = true
|
||||
is_enable_opt_inlining = true
|
||||
is_enable_native_inline = true
|
||||
}
|
14
test/aottest/retype_test/expect_output.txt
Normal file
14
test/aottest/retype_test/expect_output.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
-2147483648
|
14
test/aottest/retype_test/pgo_expect_output.txt
Normal file
14
test/aottest/retype_test/pgo_expect_output.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2024 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.
|
||||
|
||||
-2147483648
|
27
test/aottest/retype_test/retype_test.ts
Normal file
27
test/aottest/retype_test/retype_test.ts
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2024 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.
|
||||
*/
|
||||
|
||||
let v1 = -2147483648
|
||||
const arr1 = new Uint8Array(1)
|
||||
|
||||
try {
|
||||
function func(){}
|
||||
func()
|
||||
} catch (e){
|
||||
v1 = e
|
||||
}
|
||||
|
||||
arr1.set(v1)
|
||||
print(v1)
|
Loading…
Reference in New Issue
Block a user