mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2025-03-01 08:48:03 +00:00
workload bugfix: base64_test snakeyaml
issue #19PPRO Signed-off-by: transparent123123 <tanzirui@huawei.com> Change-Id: I8426c17395eab8c53c97c231b163b3830e15ea79 Signed-off-by: transparent123123 <tanzirui@huawei.com>
This commit is contained in:
parent
c77bad01b5
commit
96c9e9249a
@ -261,6 +261,8 @@ GateRef NumberSpeculativeRetype::VisitGate(GateRef gate)
|
||||
case OpCode::MAP_CLEAR:
|
||||
case OpCode::SET_CLEAR:
|
||||
return VisitOthers(gate, GateType::UndefinedType());
|
||||
case OpCode::CREATE_ARRAY_WITH_BUFFER:
|
||||
return VisitOthersWithoutConvert(gate);
|
||||
case OpCode::JS_BYTECODE:
|
||||
case OpCode::RUNTIME_CALL:
|
||||
case OpCode::PRIMITIVE_TYPE_CHECK:
|
||||
@ -298,6 +300,8 @@ GateRef NumberSpeculativeRetype::VisitGate(GateRef gate)
|
||||
case OpCode::TYPED_ARRAY_KEYS:
|
||||
case OpCode::TYPED_ARRAY_VALUES:
|
||||
case OpCode::SET_ADD:
|
||||
case OpCode::LOAD_BUILTIN_OBJECT:
|
||||
case OpCode::CREATE_ARRAY:
|
||||
return VisitOthers(gate);
|
||||
default:
|
||||
return Circuit::NullGate();
|
||||
@ -834,6 +838,14 @@ GateRef NumberSpeculativeRetype::VisitOthers(GateRef gate, GateType outputType)
|
||||
return Circuit::NullGate();
|
||||
}
|
||||
|
||||
GateRef NumberSpeculativeRetype::VisitOthersWithoutConvert(GateRef gate, GateType outputType)
|
||||
{
|
||||
if (IsRetype()) {
|
||||
return SetOutputType(gate, outputType);
|
||||
}
|
||||
return Circuit::NullGate();
|
||||
}
|
||||
|
||||
GateRef NumberSpeculativeRetype::VisitWithConstantValue(GateRef gate, size_t ignoreIndex)
|
||||
{
|
||||
if (IsRetype()) {
|
||||
|
@ -114,6 +114,7 @@ private:
|
||||
GateRef VisitDataViewGet(GateRef gate);
|
||||
GateRef VisitDataViewSet(GateRef gate);
|
||||
GateRef VisitOthers(GateRef gate, GateType outputType = GateType::AnyType());
|
||||
GateRef VisitOthersWithoutConvert(GateRef gate, GateType outputType = GateType::AnyType());
|
||||
GateRef VisitBigIntConstructor(GateRef gate);
|
||||
GateRef VisitTypeConvert(GateRef gate);
|
||||
GateRef VisitFrameState(GateRef gate);
|
||||
|
@ -88,11 +88,17 @@ public:
|
||||
|
||||
inline bool HasNumberType() const
|
||||
{
|
||||
if (LeftOrRightIsUndefinedOrNull()) {
|
||||
return false;
|
||||
}
|
||||
return pgoType_.HasNumber();
|
||||
}
|
||||
|
||||
inline bool IsStringType() const
|
||||
{
|
||||
if (LeftOrRightIsUndefinedOrNull()) {
|
||||
return false;
|
||||
}
|
||||
return pgoType_.IsString();
|
||||
}
|
||||
|
||||
|
@ -289,6 +289,7 @@ group("ark_aot_ts_test") {
|
||||
"definesendableclass",
|
||||
"sendableenv",
|
||||
"sendablecontext",
|
||||
"createarraywithbuffer2",
|
||||
]
|
||||
|
||||
if (!is_debug) {
|
||||
|
20
test/aottest/createarraywithbuffer2/BUILD.gn
Normal file
20
test/aottest/createarraywithbuffer2/BUILD.gn
Normal file
@ -0,0 +1,20 @@
|
||||
# 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("createarraywithbuffer2") {
|
||||
deps = []
|
||||
is_enable_pgo = true
|
||||
is_enable_opt_inlining = true
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
function basePullAll(array) {
|
||||
return array;
|
||||
}
|
||||
|
||||
function pullAll(array, values) {
|
||||
return (array && array.length && values && values.length)
|
||||
? basePullAll(array, values)
|
||||
: array;
|
||||
}
|
||||
|
||||
function pullAll_Test() {
|
||||
const source = ['a', 'b', 'c', 'a', 'b', 'c']
|
||||
let result = null;
|
||||
for (let i = 0; i < 10; i++) {
|
||||
result = pullAll(source, ['a', 'c']);
|
||||
}
|
||||
print(`done`)
|
||||
}
|
||||
|
||||
function lodash_Array_Test() {
|
||||
pullAll_Test()
|
||||
}
|
||||
|
||||
lodash_Array_Test()
|
14
test/aottest/createarraywithbuffer2/expect_output.txt
Normal file
14
test/aottest/createarraywithbuffer2/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.
|
||||
|
||||
done
|
14
test/aottest/createarraywithbuffer2/pgo_expect_output.txt
Normal file
14
test/aottest/createarraywithbuffer2/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.
|
||||
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user