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

Unified Diff: runtime/vm/code_patcher_ia32.cc

Issue 685003002: Add missing StoreIntoObject calls in generated code. (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/code_patcher.h ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_ia32.cc
===================================================================
--- runtime/vm/code_patcher_ia32.cc (revision 41605)
+++ runtime/vm/code_patcher_ia32.cc (working copy)
@@ -274,7 +274,8 @@
// b8 imm32 mov EAX, immediate
class EdgeCounter : public ValueObject {
public:
- EdgeCounter(uword pc, const Code& ignored) : end_(pc - kAdjust) {
+ EdgeCounter(uword pc, const Code& ignored)
+ : end_(pc - CodePatcher::EdgeCounterIncrementSizeInBytes()) {
ASSERT(IsValid(end_));
}
@@ -287,15 +288,18 @@
}
private:
+ uword end_;
+};
+
+
+int32_t CodePatcher::EdgeCounterIncrementSizeInBytes() {
// The edge counter load is followed by the fixed-size edge counter
// incrementing code:
// 83 40 0b 02 add [eax+0xb],0x2
- static const intptr_t kAdjust = 4;
+ return 4;
+}
- uword end_;
-};
-
RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) {
ASSERT(code.ContainsInstructionAt(pc));
EdgeCounter counter(pc, code);
« no previous file with comments | « runtime/vm/code_patcher.h ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698