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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 if (FLAG_precompiled_mode || | 1165 if (FLAG_precompiled_mode || |
1166 (store_node.field().guarded_cid() == kDynamicCid)) { | 1166 (store_node.field().guarded_cid() == kDynamicCid)) { |
1167 GenerateInlinedSetter(store_node.field().Offset()); | 1167 GenerateInlinedSetter(store_node.field().Offset()); |
1168 return !FLAG_use_field_guards; | 1168 return !FLAG_use_field_guards; |
1169 } | 1169 } |
1170 } | 1170 } |
1171 } | 1171 } |
1172 | 1172 |
1173 EnterIntrinsicMode(); | 1173 EnterIntrinsicMode(); |
1174 | 1174 |
1175 Intrinsifier::Intrinsify(parsed_function(), this); | 1175 bool complete = Intrinsifier::Intrinsify(parsed_function(), this); |
1176 | 1176 |
1177 ExitIntrinsicMode(); | 1177 ExitIntrinsicMode(); |
| 1178 |
1178 // "Deoptimization" from intrinsic continues here. All deoptimization | 1179 // "Deoptimization" from intrinsic continues here. All deoptimization |
1179 // branches from intrinsic code redirect to here where the slow-path | 1180 // branches from intrinsic code redirect to here where the slow-path |
1180 // (normal function body) starts. | 1181 // (normal function body) starts. |
1181 // This means that there must not be any side-effects in intrinsic code | 1182 // This means that there must not be any side-effects in intrinsic code |
1182 // before any deoptimization point. | 1183 // before any deoptimization point. |
1183 ASSERT(!intrinsic_slow_path_label_.IsBound()); | 1184 ASSERT(!intrinsic_slow_path_label_.IsBound()); |
1184 assembler()->Bind(&intrinsic_slow_path_label_); | 1185 assembler()->Bind(&intrinsic_slow_path_label_); |
1185 return false; | 1186 return complete; |
1186 } | 1187 } |
1187 | 1188 |
1188 | 1189 |
1189 // DBC is very different from other architectures in how it performs instance | 1190 // DBC is very different from other architectures in how it performs instance |
1190 // and static calls because it does not use stubs. | 1191 // and static calls because it does not use stubs. |
1191 #if !defined(TARGET_ARCH_DBC) | 1192 #if !defined(TARGET_ARCH_DBC) |
1192 void FlowGraphCompiler::GenerateInstanceCall( | 1193 void FlowGraphCompiler::GenerateInstanceCall( |
1193 intptr_t deopt_id, | 1194 intptr_t deopt_id, |
1194 TokenPosition token_pos, | 1195 TokenPosition token_pos, |
1195 intptr_t argument_count, | 1196 intptr_t argument_count, |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 | 2003 |
2003 | 2004 |
2004 void FlowGraphCompiler::FrameStateClear() { | 2005 void FlowGraphCompiler::FrameStateClear() { |
2005 ASSERT(!is_optimizing()); | 2006 ASSERT(!is_optimizing()); |
2006 frame_state_.TruncateTo(0); | 2007 frame_state_.TruncateTo(0); |
2007 } | 2008 } |
2008 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 2009 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
2009 | 2010 |
2010 | 2011 |
2011 } // namespace dart | 2012 } // namespace dart |
OLD | NEW |