| 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 |
| 11 #include "src/allocation-site-scopes.h" | 11 #include "src/allocation-site-scopes.h" |
| 12 #include "src/ast-numbering.h" | |
| 13 #include "src/full-codegen.h" | 12 #include "src/full-codegen.h" |
| 14 #include "src/hydrogen-bce.h" | 13 #include "src/hydrogen-bce.h" |
| 15 #include "src/hydrogen-bch.h" | 14 #include "src/hydrogen-bch.h" |
| 16 #include "src/hydrogen-canonicalize.h" | 15 #include "src/hydrogen-canonicalize.h" |
| 17 #include "src/hydrogen-check-elimination.h" | 16 #include "src/hydrogen-check-elimination.h" |
| 18 #include "src/hydrogen-dce.h" | 17 #include "src/hydrogen-dce.h" |
| 19 #include "src/hydrogen-dehoist.h" | 18 #include "src/hydrogen-dehoist.h" |
| 20 #include "src/hydrogen-environment-liveness.h" | 19 #include "src/hydrogen-environment-liveness.h" |
| 21 #include "src/hydrogen-escape-analysis.h" | 20 #include "src/hydrogen-escape-analysis.h" |
| 22 #include "src/hydrogen-gvn.h" | 21 #include "src/hydrogen-gvn.h" |
| (...skipping 7801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7824 TraceInline(target, caller, "cumulative AST node limit reached"); | 7823 TraceInline(target, caller, "cumulative AST node limit reached"); |
| 7825 return false; | 7824 return false; |
| 7826 } | 7825 } |
| 7827 | 7826 |
| 7828 // Parse and allocate variables. | 7827 // Parse and allocate variables. |
| 7829 CompilationInfo target_info(target, zone()); | 7828 CompilationInfo target_info(target, zone()); |
| 7830 // Use the same AstValueFactory for creating strings in the sub-compilation | 7829 // Use the same AstValueFactory for creating strings in the sub-compilation |
| 7831 // step, but don't transfer ownership to target_info. | 7830 // step, but don't transfer ownership to target_info. |
| 7832 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); | 7831 target_info.SetAstValueFactory(top_info()->ast_value_factory(), false); |
| 7833 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7832 Handle<SharedFunctionInfo> target_shared(target->shared()); |
| 7834 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info) || | 7833 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { |
| 7835 !AstNumbering::Renumber(target_info.function(), target_info.zone())) { | |
| 7836 if (target_info.isolate()->has_pending_exception()) { | 7834 if (target_info.isolate()->has_pending_exception()) { |
| 7837 // Parse or scope error, never optimize this function. | 7835 // Parse or scope error, never optimize this function. |
| 7838 SetStackOverflow(); | 7836 SetStackOverflow(); |
| 7839 target_shared->DisableOptimization(kParseScopeError); | 7837 target_shared->DisableOptimization(kParseScopeError); |
| 7840 } | 7838 } |
| 7841 TraceInline(target, caller, "parse failure"); | 7839 TraceInline(target, caller, "parse failure"); |
| 7842 return false; | 7840 return false; |
| 7843 } | 7841 } |
| 7844 | 7842 |
| 7845 if (target_info.scope()->num_heap_slots() > 0) { | 7843 if (target_info.scope()->num_heap_slots() > 0) { |
| (...skipping 4809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12655 if (ShouldProduceTraceOutput()) { | 12653 if (ShouldProduceTraceOutput()) { |
| 12656 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12654 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12657 } | 12655 } |
| 12658 | 12656 |
| 12659 #ifdef DEBUG | 12657 #ifdef DEBUG |
| 12660 graph_->Verify(false); // No full verify. | 12658 graph_->Verify(false); // No full verify. |
| 12661 #endif | 12659 #endif |
| 12662 } | 12660 } |
| 12663 | 12661 |
| 12664 } } // namespace v8::internal | 12662 } } // namespace v8::internal |
| OLD | NEW |