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

Unified Diff: src/cfg.h

Issue 162007: Fix the debugger in multipass mode by introducing phantome... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 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
Index: src/cfg.h
===================================================================
--- src/cfg.h (revision 2631)
+++ src/cfg.h (working copy)
@@ -306,7 +306,9 @@
class Instruction : public ZoneObject {
public:
// Every instruction has a location where its result is stored (which may
- // be Effect).
+ // be Effect, the default).
+ Instruction() : loc_(CfgGlobals::current()->effect_location()) {}
+
explicit Instruction(Location* loc) : loc_(loc) {}
virtual ~Instruction() {}
@@ -334,6 +336,30 @@
};
+// A phantom instruction that indicates the start of a statement. It
+// causes the statement position to be recorded in the relocation
+// information but generates no code.
+class PositionInstr : public Instruction {
+ public:
+ explicit PositionInstr(int pos) : pos_(pos) {}
+
+ // Support for fast-compilation mode.
+ void Compile(MacroAssembler* masm);
+
+ // This should not be called. The last instruction of the previous
+ // statement should not have a temporary as its location.
+ void FastAllocate(TempLocation* temp) { UNREACHABLE(); }
+
+#ifdef DEBUG
+ // Printing support. Print nothing.
+ void Print() {}
+#endif
+
+ private:
+ int pos_;
+};
+
+
// Perform a (non-short-circuited) binary operation on a pair of values,
// leaving the result in a location.
class BinaryOpInstr : public Instruction {
@@ -365,10 +391,7 @@
class ReturnInstr : public Instruction {
public:
// Location is always Effect.
- explicit ReturnInstr(Value* value)
- : Instruction(CfgGlobals::current()->effect_location()),
- value_(value) {
- }
+ explicit ReturnInstr(Value* value) : value_(value) {}
virtual ~ReturnInstr() {}

Powered by Google App Engine
This is Rietveld 408576698