| 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 12248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12259 | 12259 |
| 12260 | 12260 |
| 12261 void HOptimizedGraphBuilder::VisitDeclarations( | 12261 void HOptimizedGraphBuilder::VisitDeclarations( |
| 12262 ZoneList<Declaration*>* declarations) { | 12262 ZoneList<Declaration*>* declarations) { |
| 12263 DCHECK(globals_.is_empty()); | 12263 DCHECK(globals_.is_empty()); |
| 12264 AstVisitor::VisitDeclarations(declarations); | 12264 AstVisitor::VisitDeclarations(declarations); |
| 12265 if (!globals_.is_empty()) { | 12265 if (!globals_.is_empty()) { |
| 12266 Handle<FixedArray> array = | 12266 Handle<FixedArray> array = |
| 12267 isolate()->factory()->NewFixedArray(globals_.length(), TENURED); | 12267 isolate()->factory()->NewFixedArray(globals_.length(), TENURED); |
| 12268 for (int i = 0; i < globals_.length(); ++i) array->set(i, *globals_.at(i)); | 12268 for (int i = 0; i < globals_.length(); ++i) array->set(i, *globals_.at(i)); |
| 12269 int flags = DeclareGlobalsEvalFlag::encode(current_info()->is_eval()) | | 12269 int flags = current_info()->GetDeclareGlobalsFlags(); |
| 12270 DeclareGlobalsNativeFlag::encode(current_info()->is_native()) | | |
| 12271 DeclareGlobalsLanguageMode::encode(function_language_mode()); | |
| 12272 Add<HDeclareGlobals>(array, flags); | 12270 Add<HDeclareGlobals>(array, flags); |
| 12273 globals_.Rewind(0); | 12271 globals_.Rewind(0); |
| 12274 } | 12272 } |
| 12275 } | 12273 } |
| 12276 | 12274 |
| 12277 | 12275 |
| 12278 void HOptimizedGraphBuilder::VisitVariableDeclaration( | 12276 void HOptimizedGraphBuilder::VisitVariableDeclaration( |
| 12279 VariableDeclaration* declaration) { | 12277 VariableDeclaration* declaration) { |
| 12280 VariableProxy* proxy = declaration->proxy(); | 12278 VariableProxy* proxy = declaration->proxy(); |
| 12281 VariableMode mode = declaration->mode(); | 12279 VariableMode mode = declaration->mode(); |
| (...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13723 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13721 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13724 } | 13722 } |
| 13725 | 13723 |
| 13726 #ifdef DEBUG | 13724 #ifdef DEBUG |
| 13727 graph_->Verify(false); // No full verify. | 13725 graph_->Verify(false); // No full verify. |
| 13728 #endif | 13726 #endif |
| 13729 } | 13727 } |
| 13730 | 13728 |
| 13731 } // namespace internal | 13729 } // namespace internal |
| 13732 } // namespace v8 | 13730 } // namespace v8 |
| OLD | NEW |