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

Unified Diff: src/ast.h

Issue 11563: Fixing the detection of aliased eval so that it is exact.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 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 | « no previous file | src/ast.cc » ('j') | test/cctest/test-api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 805)
+++ src/ast.h (working copy)
@@ -864,13 +864,20 @@
class Call: public Expression {
public:
+ enum EvalType {
+ ALIASED, // Either not eval or an aliased eval.
+ POTENTIALLY_DIRECT // Looks like a direct eval at codegen time.
+ // Needs to be determined at runtime whether the
+ // eval is direct.
+ };
+
Call(Expression* expression,
ZoneList<Expression*>* arguments,
- bool is_eval,
+ EvalType eval_type,
int pos)
: expression_(expression),
arguments_(arguments),
- is_eval_(is_eval),
+ eval_type_(eval_type),
pos_(pos) { }
virtual void Accept(Visitor* v);
@@ -880,7 +887,7 @@
Expression* expression() const { return expression_; }
ZoneList<Expression*>* arguments() const { return arguments_; }
- bool is_eval() { return is_eval_; }
+ EvalType eval_type() { return eval_type_; }
int position() { return pos_; }
static Call* sentinel() { return &sentinel_; }
@@ -888,7 +895,7 @@
private:
Expression* expression_;
ZoneList<Expression*>* arguments_;
- bool is_eval_;
+ EvalType eval_type_;
int pos_;
static Call sentinel_;
@@ -898,7 +905,7 @@
class CallNew: public Call {
public:
CallNew(Expression* expression, ZoneList<Expression*>* arguments, int pos)
- : Call(expression, arguments, false, pos) { }
+ : Call(expression, arguments, ALIASED, pos) { }
virtual void Accept(Visitor* v);
};
« no previous file with comments | « no previous file | src/ast.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698