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:
wangyuxin 2024-10-11 18:55:09 +08:00
parent 5b16122995
commit 8fb913d057
6 changed files with 78 additions and 0 deletions

View File

@ -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();

View File

@ -347,6 +347,7 @@ group("ark_aot_ts_test") {
"webkit_call_convention",
"retype_isnan",
"inline_abs",
"retype_test",
]
if (!is_debug) {

View 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
}

View 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

View 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

View 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)