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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); | 117 if (FLAG_turbo_builtin_inlining) MarkAsBuiltinInliningEnabled(); |
| 118 if (FLAG_turbo_deoptimization) MarkAsDeoptimizationEnabled(); |
118 if (FLAG_turbo_inlining) MarkAsInliningEnabled(); | 119 if (FLAG_turbo_inlining) MarkAsInliningEnabled(); |
119 if (FLAG_turbo_splitting) MarkAsSplittingEnabled(); | 120 if (FLAG_turbo_splitting) MarkAsSplittingEnabled(); |
120 if (FLAG_turbo_types) MarkAsTypingEnabled(); | 121 if (FLAG_turbo_types) MarkAsTypingEnabled(); |
121 | 122 |
122 if (has_shared_info() && shared_info()->is_compiled()) { | 123 if (has_shared_info() && shared_info()->is_compiled()) { |
123 // We should initialize the CompilationInfo feedback vector from the | 124 // We should initialize the CompilationInfo feedback vector from the |
124 // passed in shared info, rather than creating a new one. | 125 // passed in shared info, rather than creating a new one. |
125 feedback_vector_ = Handle<TypeFeedbackVector>( | 126 feedback_vector_ = Handle<TypeFeedbackVector>( |
126 shared_info()->feedback_vector(), parse_info->isolate()); | 127 shared_info()->feedback_vector(), parse_info->isolate()); |
127 } | 128 } |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1540 } | 1541 } |
1541 | 1542 |
1542 | 1543 |
1543 #if DEBUG | 1544 #if DEBUG |
1544 void CompilationInfo::PrintAstForTesting() { | 1545 void CompilationInfo::PrintAstForTesting() { |
1545 PrintF("--- Source from AST ---\n%s\n", | 1546 PrintF("--- Source from AST ---\n%s\n", |
1546 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1547 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1547 } | 1548 } |
1548 #endif | 1549 #endif |
1549 } } // namespace v8::internal | 1550 } } // namespace v8::internal |
OLD | NEW |