| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 | 273 |
| 274 bool FlowGraphCompiler::IsPotentialUnboxedField(const Field& field) { | 274 bool FlowGraphCompiler::IsPotentialUnboxedField(const Field& field) { |
| 275 return field.is_unboxing_candidate() && | 275 return field.is_unboxing_candidate() && |
| 276 (FlowGraphCompiler::IsUnboxedField(field) || | 276 (FlowGraphCompiler::IsUnboxedField(field) || |
| 277 (!field.is_final() && (field.guarded_cid() == kIllegalCid))); | 277 (!field.is_final() && (field.guarded_cid() == kIllegalCid))); |
| 278 } | 278 } |
| 279 | 279 |
| 280 | 280 |
| 281 void FlowGraphCompiler::InitCompiler() { | 281 void FlowGraphCompiler::InitCompiler() { |
| 282 #ifndef PRODUCT | |
| 283 TimelineDurationScope tds(thread(), | |
| 284 Timeline::GetCompilerStream(), | |
| 285 "InitCompiler"); | |
| 286 #endif // !PRODUCT | |
| 287 pc_descriptors_list_ = new(zone()) DescriptorList(64); | 282 pc_descriptors_list_ = new(zone()) DescriptorList(64); |
| 288 exception_handlers_list_ = new(zone()) ExceptionHandlerList(); | 283 exception_handlers_list_ = new(zone()) ExceptionHandlerList(); |
| 289 block_info_.Clear(); | 284 block_info_.Clear(); |
| 290 // Conservative detection of leaf routines used to remove the stack check | 285 // Conservative detection of leaf routines used to remove the stack check |
| 291 // on function entry. | 286 // on function entry. |
| 292 bool is_leaf = is_optimizing() && !flow_graph().IsCompiledForOsr(); | 287 bool is_leaf = is_optimizing() && !flow_graph().IsCompiledForOsr(); |
| 293 // Initialize block info and search optimized (non-OSR) code for calls | 288 // Initialize block info and search optimized (non-OSR) code for calls |
| 294 // indicating a non-leaf routine and calls without IC data indicating | 289 // indicating a non-leaf routine and calls without IC data indicating |
| 295 // possible reoptimization. | 290 // possible reoptimization. |
| 296 for (int i = 0; i < block_order_.length(); ++i) { | 291 for (int i = 0; i < block_order_.length(); ++i) { |
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 | 1987 |
| 1993 | 1988 |
| 1994 void FlowGraphCompiler::FrameStateClear() { | 1989 void FlowGraphCompiler::FrameStateClear() { |
| 1995 ASSERT(!is_optimizing()); | 1990 ASSERT(!is_optimizing()); |
| 1996 frame_state_.TruncateTo(0); | 1991 frame_state_.TruncateTo(0); |
| 1997 } | 1992 } |
| 1998 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 1993 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
| 1999 | 1994 |
| 2000 | 1995 |
| 2001 } // namespace dart | 1996 } // namespace dart |
| OLD | NEW |