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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 568783002: Remove deoptimization by patching the call stack. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 3 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/code-generator.h » ('j') | src/compiler/code-generator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 25cde42670d6d68494f3e1d80024a922758d9e89..1877a681154fa5b047d26a70c15e5a319e9f58cf 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -956,7 +956,8 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
Node* attr = jsgraph()->Constant(NONE);
const Operator* op =
javascript()->Runtime(Runtime::kDefineAccessorPropertyUnchecked, 5);
- NewNode(op, literal, name, getter, setter, attr);
+ Node* call = NewNode(op, literal, name, getter, setter, attr);
+ PrepareFrameState(call, it->first->id());
}
// Transform literals that contain functions to fast properties.
@@ -1421,8 +1422,10 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
switch (assign_type) {
case VARIABLE: {
Variable* variable = expr->expression()->AsVariableProxy()->var();
+ environment()->Push(value);
BuildVariableAssignment(variable, value, expr->op(),
expr->AssignmentId());
+ environment()->Pop();
break;
}
case NAMED_PROPERTY: {
@@ -1431,7 +1434,9 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
MakeUnique(property->key()->AsLiteral()->AsPropertyName());
Node* store =
NewNode(javascript()->StoreNamed(strict_mode(), name), object, value);
+ environment()->Push(value);
PrepareFrameState(store, expr->AssignmentId());
+ environment()->Pop();
break;
}
case KEYED_PROPERTY: {
@@ -1439,7 +1444,9 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
Node* object = environment()->Pop();
Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object,
key, value);
+ environment()->Push(value);
PrepareFrameState(store, expr->AssignmentId());
+ environment()->Pop();
break;
}
}
« no previous file with comments | « no previous file | src/compiler/code-generator.h » ('j') | src/compiler/code-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698