| Index: src/hydrogen.h
|
| ===================================================================
|
| --- src/hydrogen.h (revision 7145)
|
| +++ src/hydrogen.h (working copy)
|
| @@ -445,6 +445,8 @@
|
| // the instruction as value.
|
| virtual void ReturnInstruction(HInstruction* instr, int ast_id) = 0;
|
|
|
| + virtual bool IsTypeof() { return false; }
|
| +
|
| protected:
|
| AstContext(HGraphBuilder* owner, Expression::Context kind);
|
| virtual ~AstContext();
|
| @@ -479,12 +481,17 @@
|
| class ValueContext: public AstContext {
|
| public:
|
| explicit ValueContext(HGraphBuilder* owner)
|
| - : AstContext(owner, Expression::kValue) {
|
| + : AstContext(owner, Expression::kValue), is_typeof_(false) {
|
| }
|
| virtual ~ValueContext();
|
|
|
| virtual void ReturnValue(HValue* value);
|
| virtual void ReturnInstruction(HInstruction* instr, int ast_id);
|
| + virtual bool IsTypeof() { return is_typeof_; }
|
| + void MarkAsTypeof() { is_typeof_ = true; }
|
| +
|
| + private:
|
| + bool is_typeof_;
|
| };
|
|
|
|
|
| @@ -727,6 +734,7 @@
|
| void Bind(Variable* var, HValue* value) { environment()->Bind(var, value); }
|
|
|
| void VisitForValue(Expression* expr);
|
| + void VisitForTypeofValue(Expression* expr);
|
| void VisitForEffect(Expression* expr);
|
| void VisitForControl(Expression* expr,
|
| HBasicBlock* true_block,
|
| @@ -762,7 +770,7 @@
|
| HBasicBlock* CreateLoopHeaderBlock();
|
|
|
| // Helpers for flow graph construction.
|
| - void LookupGlobalPropertyCell(Variable* var,
|
| + bool LookupGlobalPropertyCell(Variable* var,
|
| LookupResult* lookup,
|
| bool is_store);
|
|
|
|
|