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

Unified Diff: src/ast.h

Issue 7599024: Fix a bug in named getter/setter compilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporate review comments. Created 9 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
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 23df48b8b1e09a00ee434be3da2f4d2340559d26..b4705f6ab853e2373bb66be3e4bee5b3044a7701 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1711,6 +1711,12 @@ class Throw: public Expression {
class FunctionLiteral: public Expression {
public:
+ enum Type {
+ ANONYMOUS_EXPRESSION,
+ NAMED_EXPRESSION,
+ DECLARATION
+ };
+
FunctionLiteral(Isolate* isolate,
Handle<String> name,
Scope* scope,
@@ -1722,7 +1728,7 @@ class FunctionLiteral: public Expression {
int num_parameters,
int start_position,
int end_position,
- bool is_expression,
+ Type type,
bool has_duplicate_parameters)
: Expression(isolate),
name_(name),
@@ -1738,7 +1744,8 @@ class FunctionLiteral: public Expression {
end_position_(end_position),
function_token_position_(RelocInfo::kNoPosition),
inferred_name_(HEAP->empty_string()),
- is_expression_(is_expression),
+ is_expression_(type != DECLARATION),
+ is_anonymous_(type == ANONYMOUS_EXPRESSION),
pretenure_(false),
has_duplicate_parameters_(has_duplicate_parameters) {
}
@@ -1753,6 +1760,7 @@ class FunctionLiteral: public Expression {
int start_position() const { return start_position_; }
int end_position() const { return end_position_; }
bool is_expression() const { return is_expression_; }
+ bool is_anonymous() const { return is_anonymous_; }
bool strict_mode() const;
int materialized_literal_count() { return materialized_literal_count_; }
@@ -1797,6 +1805,7 @@ class FunctionLiteral: public Expression {
int function_token_position_;
Handle<String> inferred_name_;
bool is_expression_;
+ bool is_anonymous_;
bool pretenure_;
bool has_duplicate_parameters_;
};
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698