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

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

Issue 473263004: Towards removing dependency from generic lowering on compilation info. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add strict mode to store nodes. Created 6 years, 4 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/js-generic-lowering.cc » ('j') | src/compiler/pipeline.h » ('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 66a371bcebd8bf4e70c4e67d409ab47a58f7f117..61e6ea45b229309ea66e2f2907c0e7e85e93b4b3 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -899,7 +899,8 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
Node* value = environment()->Pop();
PrintableUnique<Name> name = MakeUnique(key->AsPropertyName());
Node* store =
- NewNode(javascript()->StoreNamed(name), literal, value);
+ NewNode(javascript()->StoreNamed(info()->strict_mode(), name),
Michael Starzinger 2014/08/25 14:15:57 nit: s/info()->strict_mode()/strict_mode()/ here a
+ literal, value);
PrepareFrameState(store, key->id());
} else {
VisitForEffect(property->value());
@@ -992,7 +993,8 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
VisitForValue(subexpr);
Node* value = environment()->Pop();
Node* index = jsgraph()->Constant(i);
- Node* store = NewNode(javascript()->StoreProperty(), literal, index, value);
+ Node* store = NewNode(javascript()->StoreProperty(info()->strict_mode()),
+ literal, index, value);
PrepareFrameState(store, expr->GetIdForElement(i));
}
@@ -1023,7 +1025,8 @@ void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value) {
value = environment()->Pop();
PrintableUnique<Name> name =
MakeUnique(property->key()->AsLiteral()->AsPropertyName());
- Node* store = NewNode(javascript()->StoreNamed(name), object, value);
+ Node* store = NewNode(
+ javascript()->StoreNamed(info()->strict_mode(), name), object, value);
// TODO(jarin) Fill in the correct bailout id.
PrepareFrameState(store, BailoutId::None());
break;
@@ -1035,7 +1038,8 @@ void AstGraphBuilder::VisitForInAssignment(Expression* expr, Node* value) {
Node* key = environment()->Pop();
Node* object = environment()->Pop();
value = environment()->Pop();
- Node* store = NewNode(javascript()->StoreProperty(), object, key, value);
+ Node* store = NewNode(javascript()->StoreProperty(info()->strict_mode()),
+ object, key, value);
// TODO(jarin) Fill in the correct bailout id.
PrepareFrameState(store, BailoutId::None());
break;
@@ -1116,14 +1120,16 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
Node* object = environment()->Pop();
PrintableUnique<Name> name =
MakeUnique(property->key()->AsLiteral()->AsPropertyName());
- Node* store = NewNode(javascript()->StoreNamed(name), object, value);
+ Node* store = NewNode(
+ javascript()->StoreNamed(info()->strict_mode(), name), object, value);
PrepareFrameState(store, expr->AssignmentId());
break;
}
case KEYED_PROPERTY: {
Node* key = environment()->Pop();
Node* object = environment()->Pop();
- Node* store = NewNode(javascript()->StoreProperty(), object, key, value);
+ Node* store = NewNode(javascript()->StoreProperty(info()->strict_mode()),
+ object, key, value);
PrepareFrameState(store, expr->AssignmentId());
break;
}
@@ -1421,14 +1427,16 @@ void AstGraphBuilder::VisitCountOperation(CountOperation* expr) {
Node* object = environment()->Pop();
PrintableUnique<Name> name =
MakeUnique(property->key()->AsLiteral()->AsPropertyName());
- Node* store = NewNode(javascript()->StoreNamed(name), object, value);
+ Node* store = NewNode(
+ javascript()->StoreNamed(info()->strict_mode(), name), object, value);
PrepareFrameState(store, expr->AssignmentId());
break;
}
case KEYED_PROPERTY: {
Node* key = environment()->Pop();
Node* object = environment()->Pop();
- Node* store = NewNode(javascript()->StoreProperty(), object, key, value);
+ Node* store = NewNode(javascript()->StoreProperty(info()->strict_mode()),
+ object, key, value);
PrepareFrameState(store, expr->AssignmentId());
break;
}
@@ -1838,7 +1846,7 @@ Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value,
// Global var, const, or let variable.
Node* global = BuildLoadGlobalObject();
PrintableUnique<Name> name = MakeUnique(variable->name());
- Operator* op = javascript()->StoreNamed(name);
+ Operator* op = javascript()->StoreNamed(info()->strict_mode(), name);
Node* store = NewNode(op, global, value);
PrepareFrameState(store, bailout_id);
return store;
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | src/compiler/pipeline.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698