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

Unified Diff: runtime/vm/assembler_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/assembler_dbc.h ('k') | runtime/vm/assembler_dbc_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_dbc.cc
diff --git a/runtime/vm/assembler_dbc.cc b/runtime/vm/assembler_dbc.cc
index 73beb06750fc79806e80542c43b63fef7240c9ff..96600005f6a30b03366acaa6e897008fe5976a82 100644
--- a/runtime/vm/assembler_dbc.cc
+++ b/runtime/vm/assembler_dbc.cc
@@ -31,7 +31,6 @@ void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) {
Emit(Bytecode::FENCODE_##Signature(Bytecode::k##Name ENCODE_##Signature)); \
}
-
#define PARAMS_0
#define PARAMS_A_D uintptr_t ra, uintptr_t rd
#define PARAMS_D uintptr_t rd
@@ -59,34 +58,27 @@ void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) {
#define FENCODE_A_X EncodeSigned
#define FENCODE_X EncodeSigned
-
BYTECODES_LIST(DEFINE_EMIT)
-
#undef DEFINE_EMIT
-
void Assembler::Emit(int32_t value) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
buffer_.Emit<int32_t>(value);
}
-
const char* Assembler::RegisterName(Register reg) {
return Thread::Current()->zone()->PrintToString("R%d", reg);
}
-
static int32_t EncodeJump(int32_t relative_pc) {
return Bytecode::kJump | (relative_pc << 8);
}
-
static int32_t OffsetToPC(int32_t offset) {
return offset >> 2;
}
-
void Assembler::Jump(Label* label) {
if (label->IsBound()) {
Emit(EncodeJump(OffsetToPC(label->Position() - buffer_.Size())));
@@ -97,7 +89,6 @@ void Assembler::Jump(Label* label) {
}
}
-
void Assembler::Bind(Label* label) {
ASSERT(!label->IsBound());
ASSERT(!label->IsBound());
@@ -112,28 +103,23 @@ void Assembler::Bind(Label* label) {
label->BindTo(bound_pc);
}
-
void Assembler::Stop(const char* message) {
// TODO(vegorov) support passing a message to the bytecode.
Emit(Bytecode::kTrap);
}
-
void Assembler::PushConstant(const Object& obj) {
PushConstant(AddConstant(obj));
}
-
void Assembler::LoadConstant(uintptr_t ra, const Object& obj) {
LoadConstant(ra, AddConstant(obj));
}
-
intptr_t Assembler::AddConstant(const Object& obj) {
return object_pool_wrapper().FindObject(Object::ZoneHandle(obj.raw()));
}
-
} // namespace dart
#endif // defined TARGET_ARCH_DBC
« no previous file with comments | « runtime/vm/assembler_dbc.h ('k') | runtime/vm/assembler_dbc_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698