blob: d9394d258167969d62711cb5709ccba9523e540e [file] [log] [blame]
Ian Rogers57b86d42012-03-27 16:05:41 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "callee_save_frame.h"
18#include "runtime_support.h"
19
20namespace art {
21
22extern "C" Object* artAllocObjectFromCode(uint32_t type_idx, Method* method,
23 Thread* self, Method** sp) {
24 FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
25 return AllocObjectFromCode(type_idx, method, self, false);
26}
27
28extern "C" Object* artAllocObjectFromCodeWithAccessCheck(uint32_t type_idx, Method* method,
29 Thread* self, Method** sp) {
30 FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
31 return AllocObjectFromCode(type_idx, method, self, true);
32}
33
34extern "C" Array* artAllocArrayFromCode(uint32_t type_idx, Method* method, int32_t component_count,
35 Thread* self, Method** sp) {
36 FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
37 return AllocArrayFromCode(type_idx, method, component_count, self, false);
38}
39
40extern "C" Array* artAllocArrayFromCodeWithAccessCheck(uint32_t type_idx, Method* method,
41 int32_t component_count,
42 Thread* self, Method** sp) {
43 FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
44 return AllocArrayFromCode(type_idx, method, component_count, self, true);
45}
46
47extern "C" Array* artCheckAndAllocArrayFromCode(uint32_t type_idx, Method* method,
48 int32_t component_count, Thread* self, Method** sp) {
49 FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
50 return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, false);
51}
52
53extern "C" Array* artCheckAndAllocArrayFromCodeWithAccessCheck(uint32_t type_idx, Method* method,
54 int32_t component_count,
55 Thread* self, Method** sp) {
56 FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
57 return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, true);
58}
59
60} // namespace art