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

Unified Diff: src/ast.h

Issue 342035: Move the Location class into the AST Expression class as a member.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/ast.h
===================================================================
--- src/ast.h (revision 3174)
+++ src/ast.h (working copy)
@@ -28,7 +28,6 @@
#ifndef V8_AST_H_
#define V8_AST_H_
-#include "location.h"
#include "execution.h"
#include "factory.h"
#include "jsregexp.h"
@@ -162,8 +161,14 @@
class Expression: public AstNode {
public:
- Expression() : location_(Location::Uninitialized()) {}
+ enum Context {
+ kUninitialized,
+ kEffect,
+ kValue
+ };
+ Expression() : context_(kUninitialized) {}
+
virtual Expression* AsExpression() { return this; }
virtual bool IsValidJSON() { return false; }
@@ -177,12 +182,12 @@
// Static type information for this expression.
SmiAnalysis* type() { return &type_; }
- Location location() { return location_; }
- void set_location(Location loc) { location_ = loc; }
+ Context context() { return context_; }
+ void set_context(Context context) { context_ = context; }
private:
SmiAnalysis type_;
- Location location_;
+ Context context_;
};

Powered by Google App Engine
This is Rietveld 408576698