diff options
author | 2016-07-26 09:02:02 -0700 | |
---|---|---|
committer | 2016-08-01 18:54:48 -0700 | |
commit | 542451cc546779f5c67840e105c51205a1b0a8fd (patch) | |
tree | 11e09bb5abaee12dddffefbe7e425291076dfa7a /runtime/interpreter/interpreter_common.cc | |
parent | 85c4a4b8c9eabfe16e4e49f9b4aa78c1bf4be023 (diff) |
ART: Convert pointer size to enum
Move away from size_t to dedicated enum (class).
Bug: 30373134
Bug: 30419309
Test: m test-art-host
Change-Id: Id453c330f1065012e7d4f9fc24ac477cc9bb9269
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r-- | runtime/interpreter/interpreter_common.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index 53d5e43989..11b7ef433d 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -18,6 +18,7 @@ #include <cmath> +#include "base/enums.h" #include "debugger.h" #include "entrypoints/runtime_asm_entrypoints.h" #include "jit/jit.h" @@ -537,7 +538,7 @@ void ArtInterpreterToCompiledCodeBridge(Thread* self, } method->Invoke(self, shadow_frame->GetVRegArgs(arg_offset), (shadow_frame->NumberOfVRegs() - arg_offset) * sizeof(uint32_t), - result, method->GetInterfaceMethodIfProxy(sizeof(void*))->GetShorty()); + result, method->GetInterfaceMethodIfProxy(kRuntimePointerSize)->GetShorty()); } void SetStringInitValueToAllAliases(ShadowFrame* shadow_frame, @@ -656,7 +657,8 @@ static inline bool DoCallCommon(ArtMethod* called_method, // As a special case for proxy methods, which are not dex-backed, // we have to retrieve type information from the proxy's method // interface method instead (which is dex backed since proxies are never interfaces). - ArtMethod* method = new_shadow_frame->GetMethod()->GetInterfaceMethodIfProxy(sizeof(void*)); + ArtMethod* method = + new_shadow_frame->GetMethod()->GetInterfaceMethodIfProxy(kRuntimePointerSize); // We need to do runtime check on reference assignment. We need to load the shorty // to get the exact type of each reference argument. @@ -686,7 +688,7 @@ static inline bool DoCallCommon(ArtMethod* called_method, case 'L': { Object* o = shadow_frame.GetVRegReference(src_reg); if (do_assignability_check && o != nullptr) { - size_t pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); + PointerSize pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); Class* arg_type = method->GetClassFromTypeIndex( params->GetTypeItem(shorty_pos).type_idx_, true /* resolve */, pointer_size); |