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

Unified Diff: src/hydrogen.cc

Issue 6814012: Strict mode fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index e27951550a8b11c84814dfb2bae1cdb4b1d635c5..5fff464ed1a348122ee3300aa92a10f103409acf 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -2981,7 +2981,12 @@ void HGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
HValue* value = Pop();
Handle<String> name = Handle<String>::cast(key->handle());
HStoreNamedGeneric* store =
- new(zone()) HStoreNamedGeneric(context, literal, name, value);
+ new(zone()) HStoreNamedGeneric(
+ context,
+ literal,
+ name,
+ value,
+ function_strict_mode());
AddInstruction(store);
AddSimulate(key->id());
} else {
@@ -3122,7 +3127,12 @@ HInstruction* HGraphBuilder::BuildStoreNamedGeneric(HValue* object,
HValue* value) {
HContext* context = new(zone()) HContext;
AddInstruction(context);
- return new(zone()) HStoreNamedGeneric(context, object, name, value);
+ return new(zone()) HStoreNamedGeneric(
+ context,
+ object,
+ name,
+ value,
+ function_strict_mode());
}
@@ -3318,7 +3328,8 @@ void HGraphBuilder::HandleGlobalVariableAssignment(Variable* var,
new(zone()) HStoreGlobalGeneric(context,
global_object,
var->name(),
- value);
+ value,
+ function_strict_mode());
instr->set_position(position);
AddInstruction(instr);
ASSERT(instr->HasSideEffects());
@@ -3633,7 +3644,12 @@ HInstruction* HGraphBuilder::BuildStoreKeyedGeneric(HValue* object,
HValue* value) {
HContext* context = new(zone()) HContext;
AddInstruction(context);
- return new(zone()) HStoreKeyedGeneric(context, object, key, value);
+ return new(zone()) HStoreKeyedGeneric(
+ context,
+ object,
+ key,
+ value,
+ function_strict_mode());
}

Powered by Google App Engine
This is Rietveld 408576698