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

Unified Diff: src/hydrogen.cc

Issue 6693066: Extend crankshaft support for global stores (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 years, 9 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/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 433618f713214412d983343acec4406cb6382719..1748258d614285889e056659c69a4504d74b4e4c 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3296,12 +3296,24 @@ void HGraphBuilder::HandleGlobalVariableAssignment(Variable* var,
bool check_hole = !lookup.IsDontDelete() || lookup.IsReadOnly();
Handle<GlobalObject> global(info()->global_object());
Handle<JSGlobalPropertyCell> cell(global->GetPropertyCell(&lookup));
- HInstruction* instr = new HStoreGlobal(value, cell, check_hole);
+ HInstruction* instr = new HStoreGlobalCell(value, cell, check_hole);
instr->set_position(position);
AddInstruction(instr);
if (instr->HasSideEffects()) AddSimulate(ast_id);
} else {
- BAILOUT("global store only supported for cells");
+ HContext* context = new HContext;
+ AddInstruction(context);
+ HGlobalObject* global_object = new HGlobalObject(context);
+ AddInstruction(global_object);
+ HStoreGlobalGeneric* instr =
+ new HStoreGlobalGeneric(context,
+ global_object,
+ var->name(),
+ value);
+ instr->set_position(position);
+ AddInstruction(instr);
+ ASSERT(instr->HasSideEffects());
+ if (instr->HasSideEffects()) AddSimulate(ast_id);
}
}
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698