| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 6538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6549 Variable* var, | 6549 Variable* var, |
| 6550 HValue* value, | 6550 HValue* value, |
| 6551 BailoutId ast_id) { | 6551 BailoutId ast_id) { |
| 6552 Handle<GlobalObject> global(current_info()->global_object()); | 6552 Handle<GlobalObject> global(current_info()->global_object()); |
| 6553 | 6553 |
| 6554 if (FLAG_harmony_scoping) { | 6554 if (FLAG_harmony_scoping) { |
| 6555 Handle<ScriptContextTable> script_contexts( | 6555 Handle<ScriptContextTable> script_contexts( |
| 6556 global->native_context()->script_context_table()); | 6556 global->native_context()->script_context_table()); |
| 6557 ScriptContextTable::LookupResult lookup; | 6557 ScriptContextTable::LookupResult lookup; |
| 6558 if (ScriptContextTable::Lookup(script_contexts, var->name(), &lookup)) { | 6558 if (ScriptContextTable::Lookup(script_contexts, var->name(), &lookup)) { |
| 6559 if (lookup.mode == CONST) { |
| 6560 return Bailout(kNonInitializerAssignmentToConst); |
| 6561 } |
| 6559 Handle<Context> script_context = | 6562 Handle<Context> script_context = |
| 6560 ScriptContextTable::GetContext(script_contexts, lookup.context_index); | 6563 ScriptContextTable::GetContext(script_contexts, lookup.context_index); |
| 6561 HStoreNamedField* instr = Add<HStoreNamedField>( | 6564 HStoreNamedField* instr = Add<HStoreNamedField>( |
| 6562 Add<HConstant>(script_context), | 6565 Add<HConstant>(script_context), |
| 6563 HObjectAccess::ForContextSlot(lookup.slot_index), value); | 6566 HObjectAccess::ForContextSlot(lookup.slot_index), value); |
| 6564 USE(instr); | 6567 USE(instr); |
| 6565 DCHECK(instr->HasObservableSideEffects()); | 6568 DCHECK(instr->HasObservableSideEffects()); |
| 6566 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE); | 6569 Add<HSimulate>(ast_id, REMOVABLE_SIMULATE); |
| 6567 return; | 6570 return; |
| 6568 } | 6571 } |
| (...skipping 6196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12765 if (ShouldProduceTraceOutput()) { | 12768 if (ShouldProduceTraceOutput()) { |
| 12766 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12769 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12767 } | 12770 } |
| 12768 | 12771 |
| 12769 #ifdef DEBUG | 12772 #ifdef DEBUG |
| 12770 graph_->Verify(false); // No full verify. | 12773 graph_->Verify(false); // No full verify. |
| 12771 #endif | 12774 #endif |
| 12772 } | 12775 } |
| 12773 | 12776 |
| 12774 } } // namespace v8::internal | 12777 } } // namespace v8::internal |
| OLD | NEW |