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

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: 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 433618f713214412d983343acec4406cb6382719..0bc4faf90bf96a359d40aaa846f5734fba095584 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3296,12 +3296,25 @@ 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);
+ //ast_context()->ReturnInstruction(instr, expr->id());
fschneider 2011/04/04 13:47:50 Remove commented code.
Søren Thygesen Gjesse 2011/04/04 14:16:34 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698