| 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() {}
|
|
|
|
|