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

Unified Diff: src/ast.cc

Issue 639123009: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase 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 | « src/ast.h ('k') | src/ast-numbering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 2acb2f5f365a0922c95e0e542439d11195b8fbc4..1df668ddf7ea90ede64991a9a0d175c1c546199e 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -59,13 +59,12 @@ bool Expression::IsUndefinedLiteral(Isolate* isolate) const {
}
-VariableProxy::VariableProxy(Zone* zone, Variable* var, int position,
- IdGen* id_gen)
- : Expression(zone, position, 0, id_gen),
+VariableProxy::VariableProxy(Zone* zone, Variable* var, int position)
+ : Expression(zone, position),
is_this_(var->is_this()),
is_assigned_(false),
is_resolved_(false),
- variable_feedback_slot_(FeedbackVectorSlot::Invalid()),
+ variable_feedback_slot_(FeedbackVectorICSlot::Invalid()),
raw_name_(var->raw_name()),
interface_(var->interface()) {
BindTo(var);
@@ -73,12 +72,12 @@ VariableProxy::VariableProxy(Zone* zone, Variable* var, int position,
VariableProxy::VariableProxy(Zone* zone, const AstRawString* name, bool is_this,
- Interface* interface, int position, IdGen* id_gen)
- : Expression(zone, position, 0, id_gen),
+ Interface* interface, int position)
+ : Expression(zone, position),
is_this_(is_this),
is_assigned_(false),
is_resolved_(false),
- variable_feedback_slot_(FeedbackVectorSlot::Invalid()),
+ variable_feedback_slot_(FeedbackVectorICSlot::Invalid()),
raw_name_(name),
interface_(interface) {}
@@ -98,8 +97,8 @@ void VariableProxy::BindTo(Variable* var) {
Assignment::Assignment(Zone* zone, Token::Value op, Expression* target,
- Expression* value, int pos, IdGen* id_gen)
- : Expression(zone, pos, num_ids(), id_gen),
+ Expression* value, int pos)
+ : Expression(zone, pos),
is_uninitialized_(false),
key_type_(ELEMENT),
store_mode_(STANDARD_STORE),
@@ -990,8 +989,8 @@ RegExpAlternative::RegExpAlternative(ZoneList<RegExpTree*>* nodes)
CaseClause::CaseClause(Zone* zone, Expression* label,
- ZoneList<Statement*>* statements, int pos, IdGen* id_gen)
- : Expression(zone, pos, num_ids(), id_gen),
+ ZoneList<Statement*>* statements, int pos)
+ : Expression(zone, pos),
label_(label),
statements_(statements),
compare_type_(Type::None(zone)) {}
@@ -999,36 +998,30 @@ CaseClause::CaseClause(Zone* zone, Expression* label,
#define REGULAR_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
}
#define REGULAR_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
add_slot_node(node); \
}
#define DONT_OPTIMIZE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
set_dont_crankshaft_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
#define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
add_slot_node(node); \
set_dont_crankshaft_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
#define DONT_TURBOFAN_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
set_dont_crankshaft_reason(k##NodeType); \
set_dont_turbofan_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
#define DONT_TURBOFAN_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
add_slot_node(node); \
set_dont_crankshaft_reason(k##NodeType); \
set_dont_turbofan_reason(k##NodeType); \
@@ -1036,18 +1029,15 @@ CaseClause::CaseClause(Zone* zone, Expression* label,
}
#define DONT_SELFOPTIMIZE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
add_flag(kDontSelfOptimize); \
}
#define DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
add_slot_node(node); \
add_flag(kDontSelfOptimize); \
}
#define DONT_CACHE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
- increase_node_count(); \
set_dont_crankshaft_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
add_flag(kDontCache); \
@@ -1121,7 +1111,6 @@ DONT_CACHE_NODE(ModuleLiteral)
void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
- increase_node_count();
add_slot_node(node);
if (node->is_jsruntime()) {
// Don't try to optimize JS runtime calls because we bailout on them.
« no previous file with comments | « src/ast.h ('k') | src/ast-numbering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698