| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 #ifndef PRODUCT | 271 #ifndef PRODUCT |
| 272 TimelineDurationScope tds(thread(), | 272 TimelineDurationScope tds(thread(), |
| 273 isolate()->GetCompilerStream(), | 273 isolate()->GetCompilerStream(), |
| 274 "InitCompiler"); | 274 "InitCompiler"); |
| 275 #endif // !PRODUCT | 275 #endif // !PRODUCT |
| 276 pc_descriptors_list_ = new(zone()) DescriptorList(64); | 276 pc_descriptors_list_ = new(zone()) DescriptorList(64); |
| 277 exception_handlers_list_ = new(zone()) ExceptionHandlerList(); | 277 exception_handlers_list_ = new(zone()) ExceptionHandlerList(); |
| 278 block_info_.Clear(); | 278 block_info_.Clear(); |
| 279 // Conservative detection of leaf routines used to remove the stack check | 279 // Conservative detection of leaf routines used to remove the stack check |
| 280 // on function entry. | 280 // on function entry. |
| 281 bool is_leaf = !parsed_function().function().IsClosureFunction() | 281 bool is_leaf = is_optimizing() && !flow_graph().IsCompiledForOsr(); |
| 282 && is_optimizing() | |
| 283 && !flow_graph().IsCompiledForOsr(); | |
| 284 // Initialize block info and search optimized (non-OSR) code for calls | 282 // Initialize block info and search optimized (non-OSR) code for calls |
| 285 // indicating a non-leaf routine and calls without IC data indicating | 283 // indicating a non-leaf routine and calls without IC data indicating |
| 286 // possible reoptimization. | 284 // possible reoptimization. |
| 287 for (int i = 0; i < block_order_.length(); ++i) { | 285 for (int i = 0; i < block_order_.length(); ++i) { |
| 288 block_info_.Add(new(zone()) BlockInfo()); | 286 block_info_.Add(new(zone()) BlockInfo()); |
| 289 if (is_optimizing() && !flow_graph().IsCompiledForOsr()) { | 287 if (is_optimizing() && !flow_graph().IsCompiledForOsr()) { |
| 290 BlockEntryInstr* entry = block_order_[i]; | 288 BlockEntryInstr* entry = block_order_[i]; |
| 291 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { | 289 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { |
| 292 Instruction* current = it.Current(); | 290 Instruction* current = it.Current(); |
| 293 if (current->IsBranch()) { | 291 if (current->IsBranch()) { |
| (...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1935 | 1933 |
| 1936 | 1934 |
| 1937 void FlowGraphCompiler::FrameStateClear() { | 1935 void FlowGraphCompiler::FrameStateClear() { |
| 1938 ASSERT(!is_optimizing()); | 1936 ASSERT(!is_optimizing()); |
| 1939 frame_state_.TruncateTo(0); | 1937 frame_state_.TruncateTo(0); |
| 1940 } | 1938 } |
| 1941 #endif | 1939 #endif |
| 1942 | 1940 |
| 1943 | 1941 |
| 1944 } // namespace dart | 1942 } // namespace dart |
| OLD | NEW |