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

Unified Diff: src/ast.h

Issue 615423006: Squeeze the layout of expression nodes a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « no previous file | src/ast.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 c55505ffd7fe8d231924cc96235e167bd1bb782c..4bd65aee205cad8a5e463a3809fe0e34dd3d24b3 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -363,9 +363,12 @@ class Expression : public AstNode {
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 increase_parenthesization_level() { ++parenthesization_level_; }
+ bool is_parenthesized() const { return is_parenthesized_; }
+ bool is_multi_parenthesized() const { return is_multi_parenthesized_; }
+ void increase_parenthesization_level() {
+ is_multi_parenthesized_ = is_parenthesized_;
+ is_parenthesized_ = true;
+ }
// Type feedback information for assignments and properties.
virtual bool IsMonomorphic() {
@@ -391,16 +394,18 @@ class Expression : public AstNode {
protected:
Expression(Zone* zone, int pos, IdGen* id_gen)
: AstNode(pos),
+ is_parenthesized_(false),
+ is_multi_parenthesized_(false),
bounds_(Bounds::Unbounded(zone)),
- parenthesization_level_(0),
id_(id_gen->GetNextId()),
test_id_(id_gen->GetNextId()) {}
void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
private:
- Bounds bounds_;
byte to_boolean_types_;
- unsigned parenthesization_level_;
+ bool is_parenthesized_ : 1;
+ bool is_multi_parenthesized_ : 1;
+ Bounds bounds_;
const BailoutId id_;
const TypeFeedbackId test_id_;
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698