| 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 4339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4350 // TODO(kmillikin): Fix this. Stop mutating the initial environment. | 4350 // TODO(kmillikin): Fix this. Stop mutating the initial environment. |
| 4351 // Make the Hydrogen instructions in the initial block into Hydrogen | 4351 // Make the Hydrogen instructions in the initial block into Hydrogen |
| 4352 // values (but not instructions), present in the initial environment and | 4352 // values (but not instructions), present in the initial environment and |
| 4353 // not replayed by the Lithium translation. | 4353 // not replayed by the Lithium translation. |
| 4354 HEnvironment* initial_env = environment()->CopyWithoutHistory(); | 4354 HEnvironment* initial_env = environment()->CopyWithoutHistory(); |
| 4355 HBasicBlock* body_entry = CreateBasicBlock(initial_env); | 4355 HBasicBlock* body_entry = CreateBasicBlock(initial_env); |
| 4356 Goto(body_entry); | 4356 Goto(body_entry); |
| 4357 body_entry->SetJoinId(BailoutId::FunctionEntry()); | 4357 body_entry->SetJoinId(BailoutId::FunctionEntry()); |
| 4358 set_current_block(body_entry); | 4358 set_current_block(body_entry); |
| 4359 | 4359 |
| 4360 // Handle implicit declaration of the function name in named function | |
| 4361 // expressions before other declarations. | |
| 4362 if (scope->is_function_scope() && scope->function() != NULL) { | |
| 4363 VisitVariableDeclaration(scope->function()); | |
| 4364 } | |
| 4365 VisitDeclarations(scope->declarations()); | 4360 VisitDeclarations(scope->declarations()); |
| 4366 Add<HSimulate>(BailoutId::Declarations()); | 4361 Add<HSimulate>(BailoutId::Declarations()); |
| 4367 | 4362 |
| 4368 Add<HStackCheck>(HStackCheck::kFunctionEntry); | 4363 Add<HStackCheck>(HStackCheck::kFunctionEntry); |
| 4369 | 4364 |
| 4370 VisitStatements(current_info()->function()->body()); | 4365 VisitStatements(current_info()->function()->body()); |
| 4371 if (HasStackOverflow()) return false; | 4366 if (HasStackOverflow()) return false; |
| 4372 | 4367 |
| 4373 if (current_block() != NULL) { | 4368 if (current_block() != NULL) { |
| 4374 Add<HReturn>(graph()->GetConstantUndefined()); | 4369 Add<HReturn>(graph()->GetConstantUndefined()); |
| (...skipping 8922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13297 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13292 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13298 } | 13293 } |
| 13299 | 13294 |
| 13300 #ifdef DEBUG | 13295 #ifdef DEBUG |
| 13301 graph_->Verify(false); // No full verify. | 13296 graph_->Verify(false); // No full verify. |
| 13302 #endif | 13297 #endif |
| 13303 } | 13298 } |
| 13304 | 13299 |
| 13305 } // namespace internal | 13300 } // namespace internal |
| 13306 } // namespace v8 | 13301 } // namespace v8 |
| OLD | NEW |