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

Unified Diff: src/ast.cc

Issue 398053002: Introduce FLAG_vector_ics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Register passed in hydrogen, fixed some test failures. Created 6 years, 5 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/bootstrapper.cc » ('j') | src/flag-definitions.h » ('J')
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 9cce1da71df71fa3c11854a9a15a4a4f87593fa8..cff4928f38f12bb9f9bba3da3e8974ab58ff680a 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -65,7 +65,8 @@ VariableProxy::VariableProxy(Zone* zone, Variable* var, int position)
var_(NULL), // Will be set by the call to BindTo.
is_this_(var->is_this()),
is_assigned_(false),
- interface_(var->interface()) {
+ interface_(var->interface()),
+ variable_feedback_slot_(kInvalidFeedbackSlot) {
BindTo(var);
}
@@ -80,7 +81,8 @@ VariableProxy::VariableProxy(Zone* zone,
var_(NULL),
is_this_(is_this),
is_assigned_(false),
- interface_(interface) {
+ interface_(interface),
+ variable_feedback_slot_(kInvalidFeedbackSlot) {
}
@@ -1030,7 +1032,14 @@ CaseClause::CaseClause(Zone* zone,
set_dont_optimize_reason(k##NodeType); \
add_flag(kDontSelfOptimize); \
}
-#define DONT_SELFOPTIMIZE_NODE(NodeType) \
+#define DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(NodeType) \
+ void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
+ increase_node_count(); \
+ add_slot_node(node); \
+ set_dont_optimize_reason(k##NodeType); \
+ add_flag(kDontSelfOptimize); \
+ }
+#define DONT_SELFOPTIMIZE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
increase_node_count(); \
add_flag(kDontSelfOptimize); \
@@ -1068,7 +1077,7 @@ REGULAR_NODE(RegExpLiteral)
REGULAR_NODE(FunctionLiteral)
REGULAR_NODE(Assignment)
REGULAR_NODE(Throw)
-REGULAR_NODE(Property)
+REGULAR_NODE_WITH_FEEDBACK_SLOTS(Property)
REGULAR_NODE(UnaryOperation)
REGULAR_NODE(CountOperation)
REGULAR_NODE(BinaryOperation)
@@ -1081,7 +1090,8 @@ REGULAR_NODE_WITH_FEEDBACK_SLOTS(CallNew)
// set_dont_optimize_reason(kReferenceToAVariableWhichRequiresDynamicLookup);
// But node->var() is usually not bound yet at VariableProxy creation time, and
// LOOKUP variables only result from constructs that cannot be inlined anyway.
-REGULAR_NODE(VariableProxy)
+
+REGULAR_NODE_WITH_FEEDBACK_SLOTS(VariableProxy)
// We currently do not optimize any modules.
DONT_OPTIMIZE_NODE(ModuleDeclaration)
@@ -1091,7 +1101,7 @@ DONT_OPTIMIZE_NODE(ModuleVariable)
DONT_OPTIMIZE_NODE(ModulePath)
DONT_OPTIMIZE_NODE(ModuleUrl)
DONT_OPTIMIZE_NODE(ModuleStatement)
-DONT_OPTIMIZE_NODE(Yield)
+DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(Yield)
Toon Verwaest 2014/07/18 09:52:16 Some sorting would be nice...
mvstanton 2014/07/18 13:35:04 Done.
DONT_OPTIMIZE_NODE(WithStatement)
DONT_OPTIMIZE_NODE(TryCatchStatement)
DONT_OPTIMIZE_NODE(TryFinallyStatement)
@@ -1109,6 +1119,7 @@ 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.
set_dont_optimize_reason(kCallToAJavaScriptRuntimeFunction);
« no previous file with comments | « src/ast.h ('k') | src/bootstrapper.cc » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698