Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: runtime/vm/instructions_arm.cc

Issue 1175523002: Object pool with support for untagged entries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/instructions_arm.h ('k') | runtime/vm/instructions_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_arm.cc
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index 2d14ba3d026ade241d7de121b2da5319d951cc18..6709c19c93f070173a06e95088e23f42dd85ca1c 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -14,7 +14,7 @@
namespace dart {
CallPattern::CallPattern(uword pc, const Code& code)
- : object_pool_(Array::Handle(code.ObjectPool())),
+ : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
end_(pc),
args_desc_load_end_(0),
ic_data_load_end_(0),
@@ -51,7 +51,7 @@ int CallPattern::LengthInBytes() {
// and the loaded object in the output parameters 'reg' and 'obj'
// respectively.
uword InstructionPattern::DecodeLoadObject(uword end,
- const Array& object_pool,
+ const ObjectPool& object_pool,
Register* reg,
Object* obj) {
uword start = 0;
@@ -60,7 +60,7 @@ uword InstructionPattern::DecodeLoadObject(uword end,
// ldr reg, [reg, #+offset]
intptr_t index = 0;
start = DecodeLoadWordFromPool(end, reg, &index);
- *obj = object_pool.At(index);
+ *obj = object_pool.ObjectAt(index);
} else {
intptr_t value = 0;
start = DecodeLoadWordImmediate(end, reg, &value);
@@ -186,20 +186,12 @@ RawArray* CallPattern::ClosureArgumentsDescriptor() {
uword CallPattern::TargetAddress() const {
- ASSERT(target_address_pool_index_ >= 0);
- const Object& target_address =
- Object::Handle(object_pool_.At(target_address_pool_index_));
- ASSERT(target_address.IsSmi());
- // The address is stored in the object array as a RawSmi.
- return reinterpret_cast<uword>(target_address.raw());
+ return object_pool_.RawValueAt(target_address_pool_index_);
}
void CallPattern::SetTargetAddress(uword target_address) const {
- ASSERT(Utils::IsAligned(target_address, 4));
- // The address is stored in the object array as a RawSmi.
- const Smi& smi = Smi::Handle(reinterpret_cast<RawSmi*>(target_address));
- object_pool_.SetAt(target_address_pool_index_, smi);
+ object_pool_.SetRawValueAt(target_address_pool_index_, target_address);
// No need to flush the instruction cache, since the code is not modified.
}
« no previous file with comments | « runtime/vm/instructions_arm.h ('k') | runtime/vm/instructions_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698