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

Unified Diff: runtime/vm/code_patcher_arm64.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/code_patcher_arm.cc ('k') | runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_arm64.cc
diff --git a/runtime/vm/code_patcher_arm64.cc b/runtime/vm/code_patcher_arm64.cc
index f44da2f507d9d01aed0f54fa5f81a55fc9637a4b..166ee42d3a8d50fb4ce35bb961c8ca90b5014b9e 100644
--- a/runtime/vm/code_patcher_arm64.cc
+++ b/runtime/vm/code_patcher_arm64.cc
@@ -25,7 +25,7 @@ class PoolPointerCall : public ValueObject {
public:
PoolPointerCall(uword pc, const Code& code)
: end_(pc),
- object_pool_(Array::Handle(code.ObjectPool())) {
+ object_pool_(ObjectPool::Handle(code.GetObjectPool())) {
// Last instruction: blr ip0.
ASSERT(*(reinterpret_cast<uint32_t*>(end_) - 1) == 0xd63f0200);
InstructionPattern::DecodeLoadWordFromPool(
@@ -37,19 +37,18 @@ class PoolPointerCall : public ValueObject {
}
uword Target() const {
- return reinterpret_cast<uword>(object_pool_.At(pp_index()));
+ return reinterpret_cast<uword>(object_pool_.RawValueAt(pp_index()));
}
void SetTarget(uword target) const {
- const Smi& smi = Smi::Handle(reinterpret_cast<RawSmi*>(target));
- object_pool_.SetAt(pp_index(), smi);
+ object_pool_.SetRawValueAt(pp_index(), target);
// No need to flush the instruction cache, since the code is not modified.
}
private:
static const int kCallPatternSize = 3 * Instr::kInstrSize;
uword end_;
- const Array& object_pool_;
+ const ObjectPool& object_pool_;
Register reg_;
intptr_t index_;
DISALLOW_IMPLICIT_CONSTRUCTORS(PoolPointerCall);
@@ -126,7 +125,8 @@ RawFunction* CodePatcher::GetUnoptimizedStaticCallAt(
class EdgeCounter : public ValueObject {
public:
EdgeCounter(uword pc, const Code& code)
- : end_(pc - kAdjust), object_pool_(Array::Handle(code.ObjectPool())) {
+ : end_(pc - kAdjust),
+ object_pool_(ObjectPool::Handle(code.GetObjectPool())) {
// An IsValid predicate is complicated and duplicates the code in the
// decoding function. Instead we rely on decoding the pattern which
// will assert partial validity.
@@ -137,7 +137,7 @@ class EdgeCounter : public ValueObject {
intptr_t index;
InstructionPattern::DecodeLoadWordFromPool(end_, &ignored, &index);
ASSERT(ignored == R0);
- return object_pool_.At(index);
+ return object_pool_.ObjectAt(index);
}
private:
@@ -149,7 +149,7 @@ class EdgeCounter : public ValueObject {
static const intptr_t kAdjust = 3 * Instr::kInstrSize;
uword end_;
- const Array& object_pool_;
+ const ObjectPool& object_pool_;
};
« no previous file with comments | « runtime/vm/code_patcher_arm.cc ('k') | runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698