OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 | 8 |
| 9 #include "src/ast-numbering.h" |
9 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 11 #include "src/codegen.h" |
11 #include "src/compilation-cache.h" | 12 #include "src/compilation-cache.h" |
12 #include "src/compiler/pipeline.h" | 13 #include "src/compiler/pipeline.h" |
13 #include "src/cpu-profiler.h" | 14 #include "src/cpu-profiler.h" |
14 #include "src/debug.h" | 15 #include "src/debug.h" |
15 #include "src/deoptimizer.h" | 16 #include "src/deoptimizer.h" |
16 #include "src/full-codegen.h" | 17 #include "src/full-codegen.h" |
17 #include "src/gdb-jit.h" | 18 #include "src/gdb-jit.h" |
18 #include "src/hydrogen.h" | 19 #include "src/hydrogen.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, | 740 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, |
740 literals, info->osr_ast_id()); | 741 literals, info->osr_ast_id()); |
741 } | 742 } |
742 } | 743 } |
743 | 744 |
744 | 745 |
745 static bool CompileOptimizedPrologue(CompilationInfo* info) { | 746 static bool CompileOptimizedPrologue(CompilationInfo* info) { |
746 if (!Parser::Parse(info)) return false; | 747 if (!Parser::Parse(info)) return false; |
747 if (!Rewriter::Rewrite(info)) return false; | 748 if (!Rewriter::Rewrite(info)) return false; |
748 if (!Scope::Analyze(info)) return false; | 749 if (!Scope::Analyze(info)) return false; |
| 750 if (!AstNumbering::Renumber(info->function(), info->zone())) return false; |
749 DCHECK(info->scope() != NULL); | 751 DCHECK(info->scope() != NULL); |
750 return true; | 752 return true; |
751 } | 753 } |
752 | 754 |
753 | 755 |
754 static bool GetOptimizedCodeNow(CompilationInfo* info) { | 756 static bool GetOptimizedCodeNow(CompilationInfo* info) { |
755 if (!CompileOptimizedPrologue(info)) return false; | 757 if (!CompileOptimizedPrologue(info)) return false; |
756 | 758 |
757 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); | 759 TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
758 | 760 |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 AllowHandleDereference allow_deref; | 1457 AllowHandleDereference allow_deref; |
1456 bool tracing_on = info()->IsStub() | 1458 bool tracing_on = info()->IsStub() |
1457 ? FLAG_trace_hydrogen_stubs | 1459 ? FLAG_trace_hydrogen_stubs |
1458 : (FLAG_trace_hydrogen && | 1460 : (FLAG_trace_hydrogen && |
1459 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1461 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1460 return (tracing_on && | 1462 return (tracing_on && |
1461 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1463 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1462 } | 1464 } |
1463 | 1465 |
1464 } } // namespace v8::internal | 1466 } } // namespace v8::internal |
OLD | NEW |