Chromium Code Reviews| 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.
|
| } |
| } |