| 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 4544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4555 if (declaration_scope->is_script_scope() || | 4555 if (declaration_scope->is_script_scope() || |
| 4556 declaration_scope->is_eval_scope()) { | 4556 declaration_scope->is_eval_scope()) { |
| 4557 function = new(zone()) HLoadContextSlot( | 4557 function = new(zone()) HLoadContextSlot( |
| 4558 outer_context, Context::CLOSURE_INDEX, HLoadContextSlot::kNoCheck); | 4558 outer_context, Context::CLOSURE_INDEX, HLoadContextSlot::kNoCheck); |
| 4559 } else { | 4559 } else { |
| 4560 function = New<HThisFunction>(); | 4560 function = New<HThisFunction>(); |
| 4561 } | 4561 } |
| 4562 AddInstruction(function); | 4562 AddInstruction(function); |
| 4563 // Allocate a block context and store it to the stack frame. | 4563 // Allocate a block context and store it to the stack frame. |
| 4564 HInstruction* inner_context = Add<HAllocateBlockContext>( | 4564 HInstruction* inner_context = Add<HAllocateBlockContext>( |
| 4565 outer_context, function, scope->GetScopeInfo()); | 4565 outer_context, function, scope->GetScopeInfo(isolate())); |
| 4566 HInstruction* instr = Add<HStoreFrameContext>(inner_context); | 4566 HInstruction* instr = Add<HStoreFrameContext>(inner_context); |
| 4567 set_scope(scope); | 4567 set_scope(scope); |
| 4568 environment()->BindContext(inner_context); | 4568 environment()->BindContext(inner_context); |
| 4569 if (instr->HasObservableSideEffects()) { | 4569 if (instr->HasObservableSideEffects()) { |
| 4570 AddSimulate(stmt->EntryId(), REMOVABLE_SIMULATE); | 4570 AddSimulate(stmt->EntryId(), REMOVABLE_SIMULATE); |
| 4571 } | 4571 } |
| 4572 VisitDeclarations(scope->declarations()); | 4572 VisitDeclarations(scope->declarations()); |
| 4573 AddSimulate(stmt->DeclsId(), REMOVABLE_SIMULATE); | 4573 AddSimulate(stmt->DeclsId(), REMOVABLE_SIMULATE); |
| 4574 } | 4574 } |
| 4575 CHECK_BAILOUT(VisitStatements(stmt->statements())); | 4575 CHECK_BAILOUT(VisitStatements(stmt->statements())); |
| (...skipping 8920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13496 if (ShouldProduceTraceOutput()) { | 13496 if (ShouldProduceTraceOutput()) { |
| 13497 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13497 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13498 } | 13498 } |
| 13499 | 13499 |
| 13500 #ifdef DEBUG | 13500 #ifdef DEBUG |
| 13501 graph_->Verify(false); // No full verify. | 13501 graph_->Verify(false); // No full verify. |
| 13502 #endif | 13502 #endif |
| 13503 } | 13503 } |
| 13504 | 13504 |
| 13505 } } // namespace v8::internal | 13505 } } // namespace v8::internal |
| OLD | NEW |