1 /*
2  * Copyright (C) 2016 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 #ifndef ART_RUNTIME_MIRROR_EMULATED_STACK_FRAME_INL_H_
18 #define ART_RUNTIME_MIRROR_EMULATED_STACK_FRAME_INL_H_
19 
20 #include "emulated_stack_frame.h"
21 
22 #include "obj_ptr-inl.h"
23 #include "object-inl.h"
24 #include "object_array-inl.h"
25 
26 namespace art {
27 namespace mirror {
28 
GetType()29 inline ObjPtr<mirror::MethodType> EmulatedStackFrame::GetType() {
30   return GetFieldObject<MethodType>(OFFSET_OF_OBJECT_MEMBER(EmulatedStackFrame, type_));
31 }
32 
GetReceiver()33 inline ObjPtr<mirror::Object> EmulatedStackFrame::GetReceiver() {
34   return GetReferences()->Get(0);
35 }
36 
GetReferences()37 inline ObjPtr<mirror::ObjectArray<mirror::Object>> EmulatedStackFrame::GetReferences() {
38   return GetFieldObject<mirror::ObjectArray<mirror::Object>>(
39       OFFSET_OF_OBJECT_MEMBER(EmulatedStackFrame, references_));
40 }
41 
GetStackFrame()42 inline ObjPtr<mirror::ByteArray> EmulatedStackFrame::GetStackFrame() {
43   return GetFieldObject<mirror::ByteArray>(
44       OFFSET_OF_OBJECT_MEMBER(EmulatedStackFrame, stack_frame_));
45 }
46 
47 }  // namespace mirror
48 }  // namespace art
49 
50 #endif  // ART_RUNTIME_MIRROR_EMULATED_STACK_FRAME_INL_H_
51