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