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/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
6 | 6 |
7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
8 #include "vm/block_scheduler.h" | 8 #include "vm/block_scheduler.h" |
9 #include "vm/branch_optimizer.h" | 9 #include "vm/branch_optimizer.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 ASSERT(array_cid != kIllegalCid); | 2230 ASSERT(array_cid != kIllegalCid); |
2231 | 2231 |
2232 Definition* array = receiver; | 2232 Definition* array = receiver; |
2233 Definition* index = call->ArgumentAt(1); | 2233 Definition* index = call->ArgumentAt(1); |
2234 Definition* stored_value = call->ArgumentAt(2); | 2234 Definition* stored_value = call->ArgumentAt(2); |
2235 | 2235 |
2236 *entry = new(Z) TargetEntryInstr(flow_graph->allocate_block_id(), | 2236 *entry = new(Z) TargetEntryInstr(flow_graph->allocate_block_id(), |
2237 call->GetBlock()->try_index()); | 2237 call->GetBlock()->try_index()); |
2238 (*entry)->InheritDeoptTarget(Z, call); | 2238 (*entry)->InheritDeoptTarget(Z, call); |
2239 Instruction* cursor = *entry; | 2239 Instruction* cursor = *entry; |
2240 if (flow_graph->isolate()->flags().type_checks()) { | 2240 if (flow_graph->isolate()->type_checks()) { |
2241 // Only type check for the value. A type check for the index is not | 2241 // Only type check for the value. A type check for the index is not |
2242 // needed here because we insert a deoptimizing smi-check for the case | 2242 // needed here because we insert a deoptimizing smi-check for the case |
2243 // the index is not a smi. | 2243 // the index is not a smi. |
2244 const AbstractType& value_type = | 2244 const AbstractType& value_type = |
2245 AbstractType::ZoneHandle(Z, target.ParameterTypeAt(2)); | 2245 AbstractType::ZoneHandle(Z, target.ParameterTypeAt(2)); |
2246 Definition* type_args = NULL; | 2246 Definition* type_args = NULL; |
2247 switch (array_cid) { | 2247 switch (array_cid) { |
2248 case kArrayCid: | 2248 case kArrayCid: |
2249 case kGrowableObjectArrayCid: { | 2249 case kGrowableObjectArrayCid: { |
2250 const Class& instantiator_class = Class::Handle(Z, target.Owner()); | 2250 const Class& instantiator_class = Class::Handle(Z, target.Owner()); |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3063 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); | 3063 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); |
3064 case MethodRecognizer::kDoubleDiv: | 3064 case MethodRecognizer::kDoubleDiv: |
3065 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); | 3065 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); |
3066 default: | 3066 default: |
3067 return false; | 3067 return false; |
3068 } | 3068 } |
3069 } | 3069 } |
3070 | 3070 |
3071 | 3071 |
3072 } // namespace dart | 3072 } // namespace dart |
OLD | NEW |