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

Unified Diff: src/ast.h

Issue 160073006: Implement handling of arrow functions in the parser (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed ParamListFinder Created 6 years, 6 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/flag-definitions.h » ('j') | src/messages.js » ('J')
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 23f9eef477a9a318769ad67256b650e23ca11372..579082cd6ae42f40c88b0b4623631e9e3604091c 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -344,6 +344,17 @@ class Expression : public AstNode {
Bounds bounds() const { return bounds_; }
void set_bounds(Bounds bounds) { bounds_ = bounds; }
+ // Whether the expression is parenthesized
+ unsigned parenthesization_level() const { return parenthesization_level_; }
+ bool is_parenthesized() const { return parenthesization_level_ > 0; }
+ void set_is_parenthesized(bool value) {
marja 2014/06/26 14:38:13 Afaics this is never called with false (which woul
+ if (value) {
+ ++parenthesization_level_;
+ } else {
+ parenthesization_level_ = 0;
+ }
+ }
+
// Type feedback information for assignments and properties.
virtual bool IsMonomorphic() {
UNREACHABLE();
@@ -370,6 +381,7 @@ class Expression : public AstNode {
: AstNode(pos),
zone_(zone),
bounds_(Bounds::Unbounded(zone)),
+ parenthesization_level_(0),
id_(GetNextId(zone)),
test_id_(GetNextId(zone)) {}
void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
@@ -379,6 +391,7 @@ class Expression : public AstNode {
private:
Bounds bounds_;
byte to_boolean_types_;
+ unsigned parenthesization_level_;
const BailoutId id_;
const TypeFeedbackId test_id_;
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | src/messages.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698