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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 727623002: Support verified heap pointer writes on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/flow_graph_compiler.h ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 41785)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -18,6 +18,7 @@
#include "vm/stack_frame.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
+#include "vm/verified_memory.h"
namespace dart {
@@ -1265,11 +1266,20 @@
counter.SetAt(0, Smi::Handle(Smi::New(0)));
__ Comment("Edge counter");
__ LoadObject(RAX, counter, PP);
- __ AddImmediate(FieldAddress(RAX, Array::element_offset(0)),
- Immediate(Smi::RawValue(1)), PP);
+#if defined(DEBUG)
+ intptr_t increment_start = assembler_->CodeSize();
+#endif // DEBUG
+ __ IncrementSmiField(FieldAddress(RAX, Array::element_offset(0)), 1);
+ DEBUG_ASSERT((assembler_->CodeSize() - increment_start) ==
+ EdgeCounterIncrementSizeInBytes());
}
+int32_t FlowGraphCompiler::EdgeCounterIncrementSizeInBytes() {
+ return VerifiedMemory::enabled() ? 70 : 5;
+}
+
+
void FlowGraphCompiler::EmitOptimizedInstanceCall(
ExternalLabel* target_label,
const ICData& ic_data,
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698