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

Unified Diff: runtime/vm/object.cc

Issue 1367973002: VM: Initialize Instruction objects with break instructions instead of null. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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_x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2366142b7a56dacf9e74fbdcb5ace7e723b849d9..20ba0722f7fb4c3fe3d0a151bbc325cbb17e00fb 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1718,9 +1718,8 @@ void Object::InitializeObject(uword address,
intptr_t class_id,
intptr_t size,
bool is_vm_object) {
- // TODO(iposva): Get a proper halt instruction from the assembler which
- // would be needed here for code objects.
- uword initial_value = reinterpret_cast<uword>(null_);
+ uword initial_value = (class_id == kInstructionsCid)
+ ? Assembler::GetBreakInstructionFiller() : reinterpret_cast<uword>(null_);
uword cur = address;
uword end = address + size;
while (cur < end) {
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698