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/compiler.h" | 5 #include "src/compiler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Compiling for the snapshot typically results in different code than | 107 // Compiling for the snapshot typically results in different code than |
108 // compiling later on. This means that code recompiled with deoptimization | 108 // compiling later on. This means that code recompiled with deoptimization |
109 // support won't be "equivalent" (as defined by SharedFunctionInfo:: | 109 // support won't be "equivalent" (as defined by SharedFunctionInfo:: |
110 // EnableDeoptimizationSupport), so it will replace the old code and all | 110 // EnableDeoptimizationSupport), so it will replace the old code and all |
111 // its type feedback. To avoid this, always compile functions in the snapshot | 111 // its type feedback. To avoid this, always compile functions in the snapshot |
112 // with deoptimization support. | 112 // with deoptimization support. |
113 if (isolate_->serializer_enabled()) EnableDeoptimizationSupport(); | 113 if (isolate_->serializer_enabled()) EnableDeoptimizationSupport(); |
114 | 114 |
115 if (isolate_->debug()->is_active()) MarkAsDebug(); | 115 if (isolate_->debug()->is_active()) MarkAsDebug(); |
116 if (FLAG_context_specialization) MarkAsContextSpecializing(); | 116 if (FLAG_context_specialization) MarkAsContextSpecializing(); |
117 if (FLAG_turbo_builtin_inlining) MarkAsBuiltinInliningEnabled(); | |
118 if (FLAG_turbo_deoptimization) MarkAsDeoptimizationEnabled(); | 117 if (FLAG_turbo_deoptimization) MarkAsDeoptimizationEnabled(); |
119 if (FLAG_turbo_inlining) MarkAsInliningEnabled(); | 118 if (FLAG_turbo_inlining) MarkAsInliningEnabled(); |
120 if (FLAG_turbo_source_positions) MarkAsSourcePositionsEnabled(); | 119 if (FLAG_turbo_source_positions) MarkAsSourcePositionsEnabled(); |
121 if (FLAG_turbo_splitting) MarkAsSplittingEnabled(); | 120 if (FLAG_turbo_splitting) MarkAsSplittingEnabled(); |
122 if (FLAG_turbo_types) MarkAsTypingEnabled(); | 121 if (FLAG_turbo_types) MarkAsTypingEnabled(); |
123 | 122 |
124 if (has_shared_info() && shared_info()->is_compiled()) { | 123 if (has_shared_info() && shared_info()->is_compiled()) { |
125 // We should initialize the CompilationInfo feedback vector from the | 124 // We should initialize the CompilationInfo feedback vector from the |
126 // passed in shared info, rather than creating a new one. | 125 // passed in shared info, rather than creating a new one. |
127 feedback_vector_ = Handle<TypeFeedbackVector>( | 126 feedback_vector_ = Handle<TypeFeedbackVector>( |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 } | 1562 } |
1564 | 1563 |
1565 | 1564 |
1566 #if DEBUG | 1565 #if DEBUG |
1567 void CompilationInfo::PrintAstForTesting() { | 1566 void CompilationInfo::PrintAstForTesting() { |
1568 PrintF("--- Source from AST ---\n%s\n", | 1567 PrintF("--- Source from AST ---\n%s\n", |
1569 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1568 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1570 } | 1569 } |
1571 #endif | 1570 #endif |
1572 } } // namespace v8::internal | 1571 } } // namespace v8::internal |
OLD | NEW |