diff options
| author | 2014-05-07 15:43:14 -0700 | |
|---|---|---|
| committer | 2014-05-13 14:45:54 -0700 | |
| commit | eb8167a4f4d27fce0530f6724ab8032610cd146b (patch) | |
| tree | bcfeaf13ad78f2dd68466bbd0e20c71944f7e854 /compiler/utils/mips/assembler_mips.cc | |
| parent | 6fb66a2bc4e1c0b7931101153e58714991237af7 (diff) | |
Add Handle/HandleScope and delete SirtRef.
Delete SirtRef and replaced it with Handle. Handles are value types
which wrap around StackReference*.
Renamed StackIndirectReferenceTable to HandleScope.
Added a scoped handle wrapper which wraps around an Object** and
restores it in its destructor.
Renamed Handle::get -> Get.
Bug: 8473721
Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
Diffstat (limited to 'compiler/utils/mips/assembler_mips.cc')
| -rw-r--r-- | compiler/utils/mips/assembler_mips.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/compiler/utils/mips/assembler_mips.cc b/compiler/utils/mips/assembler_mips.cc index 9001f8a41f..8001dcd2fb 100644 --- a/compiler/utils/mips/assembler_mips.cc +++ b/compiler/utils/mips/assembler_mips.cc @@ -827,8 +827,8 @@ void MipsAssembler::MemoryBarrier(ManagedRegister) { UNIMPLEMENTED(FATAL) << "no mips implementation"; } -void MipsAssembler::CreateSirtEntry(ManagedRegister mout_reg, - FrameOffset sirt_offset, +void MipsAssembler::CreateHandleScopeEntry(ManagedRegister mout_reg, + FrameOffset handle_scope_offset, ManagedRegister min_reg, bool null_allowed) { MipsManagedRegister out_reg = mout_reg.AsMips(); MipsManagedRegister in_reg = min_reg.AsMips(); @@ -836,27 +836,27 @@ void MipsAssembler::CreateSirtEntry(ManagedRegister mout_reg, CHECK(out_reg.IsCoreRegister()) << out_reg; if (null_allowed) { Label null_arg; - // Null values get a SIRT entry value of 0. Otherwise, the SIRT entry is - // the address in the SIRT holding the reference. + // Null values get a handle scope entry value of 0. Otherwise, the handle scope entry is + // the address in the handle scope holding the reference. // e.g. out_reg = (handle == 0) ? 0 : (SP+handle_offset) if (in_reg.IsNoRegister()) { LoadFromOffset(kLoadWord, out_reg.AsCoreRegister(), - SP, sirt_offset.Int32Value()); + SP, handle_scope_offset.Int32Value()); in_reg = out_reg; } if (!out_reg.Equals(in_reg)) { LoadImmediate(out_reg.AsCoreRegister(), 0); } EmitBranch(in_reg.AsCoreRegister(), ZERO, &null_arg, true); - AddConstant(out_reg.AsCoreRegister(), SP, sirt_offset.Int32Value()); + AddConstant(out_reg.AsCoreRegister(), SP, handle_scope_offset.Int32Value()); Bind(&null_arg, false); } else { - AddConstant(out_reg.AsCoreRegister(), SP, sirt_offset.Int32Value()); + AddConstant(out_reg.AsCoreRegister(), SP, handle_scope_offset.Int32Value()); } } -void MipsAssembler::CreateSirtEntry(FrameOffset out_off, - FrameOffset sirt_offset, +void MipsAssembler::CreateHandleScopeEntry(FrameOffset out_off, + FrameOffset handle_scope_offset, ManagedRegister mscratch, bool null_allowed) { MipsManagedRegister scratch = mscratch.AsMips(); @@ -864,21 +864,21 @@ void MipsAssembler::CreateSirtEntry(FrameOffset out_off, if (null_allowed) { Label null_arg; LoadFromOffset(kLoadWord, scratch.AsCoreRegister(), SP, - sirt_offset.Int32Value()); - // Null values get a SIRT entry value of 0. Otherwise, the sirt entry is - // the address in the SIRT holding the reference. - // e.g. scratch = (scratch == 0) ? 0 : (SP+sirt_offset) + handle_scope_offset.Int32Value()); + // Null values get a handle scope entry value of 0. Otherwise, the handle scope entry is + // the address in the handle scope holding the reference. + // e.g. scratch = (scratch == 0) ? 0 : (SP+handle_scope_offset) EmitBranch(scratch.AsCoreRegister(), ZERO, &null_arg, true); - AddConstant(scratch.AsCoreRegister(), SP, sirt_offset.Int32Value()); + AddConstant(scratch.AsCoreRegister(), SP, handle_scope_offset.Int32Value()); Bind(&null_arg, false); } else { - AddConstant(scratch.AsCoreRegister(), SP, sirt_offset.Int32Value()); + AddConstant(scratch.AsCoreRegister(), SP, handle_scope_offset.Int32Value()); } StoreToOffset(kStoreWord, scratch.AsCoreRegister(), SP, out_off.Int32Value()); } -// Given a SIRT entry, load the associated reference. -void MipsAssembler::LoadReferenceFromSirt(ManagedRegister mout_reg, +// Given a handle scope entry, load the associated reference. +void MipsAssembler::LoadReferenceFromHandleScope(ManagedRegister mout_reg, ManagedRegister min_reg) { MipsManagedRegister out_reg = mout_reg.AsMips(); MipsManagedRegister in_reg = min_reg.AsMips(); |