1 /** 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "runtime/tests/interpreter/test_runtime_interface.h" 17 18 namespace ark::interpreter::test { 19 20 RuntimeInterface::NullPointerExceptionData RuntimeInterface::npeData_; 21 22 RuntimeInterface::ArrayIndexOutOfBoundsExceptionData RuntimeInterface::arrayOobExceptionData_; 23 24 RuntimeInterface::NegativeArraySizeExceptionData RuntimeInterface::arrayNegSizeExceptionData_; 25 26 RuntimeInterface::ArithmeticException RuntimeInterface::arithmeticExceptionData_; 27 28 RuntimeInterface::ClassCastExceptionData RuntimeInterface::classCastExceptionData_; 29 30 RuntimeInterface::AbstractMethodError RuntimeInterface::abstractMethodErrorData_; 31 32 RuntimeInterface::ArrayStoreExceptionData RuntimeInterface::arrayStoreExceptionData_; 33 34 coretypes::Array *RuntimeInterface::arrayObject_; 35 36 Class *RuntimeInterface::arrayClass_; 37 38 uint32_t RuntimeInterface::arrayLength_; 39 40 Class *RuntimeInterface::resolvedClass_; 41 42 ObjectHeader *RuntimeInterface::object_; 43 44 Class *RuntimeInterface::objectClass_; 45 46 uint32_t RuntimeInterface::catchBlockPcOffset_; 47 48 // NOLINTNEXTLINE(fuchsia-statically-constructed-objects) 49 RuntimeInterface::InvokeMethodHandler RuntimeInterface::invokeHandler_; 50 DummyGC(ark::mem::ObjectAllocatorBase * objectAllocator,const ark::mem::GCSettings & settings)51DummyGC::DummyGC(ark::mem::ObjectAllocatorBase *objectAllocator, const ark::mem::GCSettings &settings) 52 : GC(objectAllocator, settings) 53 { 54 } 55 56 // NOLINTNEXTLINE(fuchsia-statically-constructed-objects) 57 DummyGC RuntimeInterface::dummyGc_(nullptr, ark::mem::GCSettings()); 58 59 Method *RuntimeInterface::resolvedMethod_; 60 61 Field *RuntimeInterface::resolvedField_; 62 63 const void *RuntimeInterface::entryPoint_; 64 65 uint32_t RuntimeInterface::jitThreshold_; 66 67 } // namespace ark::interpreter::test 68