| 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
| 10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
| (...skipping 12123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12134 DCHECK(!HasStackOverflow()); | 12134 DCHECK(!HasStackOverflow()); |
| 12135 DCHECK(current_block() != NULL); | 12135 DCHECK(current_block() != NULL); |
| 12136 DCHECK(current_block()->HasPredecessor()); | 12136 DCHECK(current_block()->HasPredecessor()); |
| 12137 return Bailout(kSuperReference); | 12137 return Bailout(kSuperReference); |
| 12138 } | 12138 } |
| 12139 | 12139 |
| 12140 | 12140 |
| 12141 void HOptimizedGraphBuilder::VisitDeclarations( | 12141 void HOptimizedGraphBuilder::VisitDeclarations( |
| 12142 ZoneList<Declaration*>* declarations) { | 12142 ZoneList<Declaration*>* declarations) { |
| 12143 DCHECK(globals_.is_empty()); | 12143 DCHECK(globals_.is_empty()); |
| 12144 AstVisitor::VisitDeclarations(declarations); | 12144 AstVisitor<HOptimizedGraphBuilder>::VisitDeclarations(declarations); |
| 12145 if (!globals_.is_empty()) { | 12145 if (!globals_.is_empty()) { |
| 12146 Handle<FixedArray> array = | 12146 Handle<FixedArray> array = |
| 12147 isolate()->factory()->NewFixedArray(globals_.length(), TENURED); | 12147 isolate()->factory()->NewFixedArray(globals_.length(), TENURED); |
| 12148 for (int i = 0; i < globals_.length(); ++i) array->set(i, *globals_.at(i)); | 12148 for (int i = 0; i < globals_.length(); ++i) array->set(i, *globals_.at(i)); |
| 12149 int flags = current_info()->GetDeclareGlobalsFlags(); | 12149 int flags = current_info()->GetDeclareGlobalsFlags(); |
| 12150 Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate()); | 12150 Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate()); |
| 12151 Add<HDeclareGlobals>(array, flags, vector); | 12151 Add<HDeclareGlobals>(array, flags, vector); |
| 12152 globals_.Rewind(0); | 12152 globals_.Rewind(0); |
| 12153 } | 12153 } |
| 12154 } | 12154 } |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13421 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13421 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13422 } | 13422 } |
| 13423 | 13423 |
| 13424 #ifdef DEBUG | 13424 #ifdef DEBUG |
| 13425 graph_->Verify(false); // No full verify. | 13425 graph_->Verify(false); // No full verify. |
| 13426 #endif | 13426 #endif |
| 13427 } | 13427 } |
| 13428 | 13428 |
| 13429 } // namespace internal | 13429 } // namespace internal |
| 13430 } // namespace v8 | 13430 } // namespace v8 |
| OLD | NEW |