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

Unified Diff: runtime/vm/instructions_dbc.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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_dbc.h ('k') | runtime/vm/instructions_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_dbc.cc
diff --git a/runtime/vm/instructions_dbc.cc b/runtime/vm/instructions_dbc.cc
index 7667a5f2b6b56f2bc0e92ca08f05303c21be9cc8..88115c59485824ce09f14bd2c084b4379a91f20c 100644
--- a/runtime/vm/instructions_dbc.cc
+++ b/runtime/vm/instructions_dbc.cc
@@ -37,7 +37,6 @@ static bool HasLoadFromPool(Instr instr) {
}
}
-
static bool GetLoadedObjectAt(uword pc,
const ObjectPool& object_pool,
Object* obj) {
@@ -52,7 +51,6 @@ static bool GetLoadedObjectAt(uword pc,
return false;
}
-
CallPattern::CallPattern(uword pc, const Code& code)
: object_pool_(ObjectPool::Handle(code.GetObjectPool())),
end_(pc),
@@ -67,7 +65,6 @@ CallPattern::CallPattern(uword pc, const Code& code)
target_code_pool_index_ = Bytecode::DecodeD(call_instr);
}
-
NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
: object_pool_(ObjectPool::Handle(code.GetObjectPool())),
end_(pc),
@@ -76,31 +73,26 @@ NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
UNIMPLEMENTED();
}
-
RawCode* NativeCallPattern::target() const {
return reinterpret_cast<RawCode*>(
object_pool_.ObjectAt(target_code_pool_index_));
}
-
void NativeCallPattern::set_target(const Code& new_target) const {
object_pool_.SetObjectAt(target_code_pool_index_, new_target);
// No need to flush the instruction cache, since the code is not modified.
}
-
NativeFunction NativeCallPattern::native_function() const {
return reinterpret_cast<NativeFunction>(
object_pool_.RawValueAt(native_function_pool_index_));
}
-
void NativeCallPattern::set_native_function(NativeFunction func) const {
object_pool_.SetRawValueAt(native_function_pool_index_,
reinterpret_cast<uword>(func));
}
-
// Decodes a load sequence ending at 'end' (the last instruction of the load
// sequence is the instruction before the one at end). Returns a pointer to
// the first instruction in the sequence. Returns the register being loaded
@@ -114,7 +106,6 @@ uword InstructionPattern::DecodeLoadObject(uword end,
return 0;
}
-
// Decodes a load sequence ending at 'end' (the last instruction of the load
// sequence is the instruction before the one at end). Returns a pointer to
// the first instruction in the sequence. Returns the register being loaded
@@ -127,7 +118,6 @@ uword InstructionPattern::DecodeLoadWordImmediate(uword end,
return 0;
}
-
// Decodes a load sequence ending at 'end' (the last instruction of the load
// sequence is the instruction before the one at end). Returns a pointer to
// the first instruction in the sequence. Returns the register being loaded
@@ -140,14 +130,12 @@ uword InstructionPattern::DecodeLoadWordFromPool(uword end,
return 0;
}
-
bool DecodeLoadObjectFromPoolOrThread(uword pc, const Code& code, Object* obj) {
ASSERT(code.ContainsInstructionAt(pc));
const ObjectPool& pool = ObjectPool::Handle(code.object_pool());
return GetLoadedObjectAt(pc, pool, obj);
}
-
RawICData* CallPattern::IcData() {
if (ic_data_.IsNull()) {
bool found = GetLoadedObjectAt(ic_data_load_end_, object_pool_, &ic_data_);
@@ -156,18 +144,15 @@ RawICData* CallPattern::IcData() {
return ic_data_.raw();
}
-
RawCode* CallPattern::TargetCode() const {
return reinterpret_cast<RawCode*>(
object_pool_.ObjectAt(target_code_pool_index_));
}
-
void CallPattern::SetTargetCode(const Code& target_code) const {
object_pool_.SetObjectAt(target_code_pool_index_, target_code);
}
-
void CallPattern::InsertDeoptCallAt(uword pc) {
const uint8_t argc = Bytecode::IsCallOpcode(Bytecode::At(pc))
? Bytecode::DecodeArgc(Bytecode::At(pc))
@@ -175,7 +160,6 @@ void CallPattern::InsertDeoptCallAt(uword pc) {
*reinterpret_cast<Instr*>(pc) = Bytecode::Encode(Bytecode::kDeopt, argc, 0);
}
-
SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
: object_pool_(ObjectPool::Handle(code.GetObjectPool())),
data_pool_index_(-1),
@@ -183,34 +167,28 @@ SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
UNIMPLEMENTED();
}
-
RawObject* SwitchableCallPattern::data() const {
return object_pool_.ObjectAt(data_pool_index_);
}
-
RawCode* SwitchableCallPattern::target() const {
return reinterpret_cast<RawCode*>(object_pool_.ObjectAt(target_pool_index_));
}
-
void SwitchableCallPattern::SetData(const Object& data) const {
ASSERT(!Object::Handle(object_pool_.ObjectAt(data_pool_index_)).IsCode());
object_pool_.SetObjectAt(data_pool_index_, data);
}
-
void SwitchableCallPattern::SetTarget(const Code& target) const {
ASSERT(Object::Handle(object_pool_.ObjectAt(target_pool_index_)).IsCode());
object_pool_.SetObjectAt(target_pool_index_, target);
}
-
ReturnPattern::ReturnPattern(uword pc) : pc_(pc) {
USE(pc_);
}
-
bool ReturnPattern::IsValid() const {
UNIMPLEMENTED();
return false;
« no previous file with comments | « runtime/vm/instructions_dbc.h ('k') | runtime/vm/instructions_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698