OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_builder.h" | 5 #include "vm/flow_graph_builder.h" |
6 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3304 new CreateArrayInstr(node->token_pos(), element_type, length); | 3304 new CreateArrayInstr(node->token_pos(), element_type, length); |
3305 return ReturnDefinition(create_array); | 3305 return ReturnDefinition(create_array); |
3306 } | 3306 } |
3307 case MethodRecognizer::kBigint_getDigits: { | 3307 case MethodRecognizer::kBigint_getDigits: { |
3308 Value* receiver = Bind(BuildLoadThisVar(node->scope())); | 3308 Value* receiver = Bind(BuildLoadThisVar(node->scope())); |
3309 LoadFieldInstr* load = new(I) LoadFieldInstr( | 3309 LoadFieldInstr* load = new(I) LoadFieldInstr( |
3310 receiver, | 3310 receiver, |
3311 Bigint::digits_offset(), | 3311 Bigint::digits_offset(), |
3312 Type::ZoneHandle(I, Type::DynamicType()), | 3312 Type::ZoneHandle(I, Type::DynamicType()), |
3313 node->token_pos()); | 3313 node->token_pos()); |
3314 // TODO(srdjan): Enabling the correct result type throws an NPE. | 3314 load->set_result_cid(kTypedDataUint32ArrayCid); |
3315 // load->set_result_cid(kTypedDataUint32ArrayCid); | |
3316 load->set_result_cid(kDynamicCid); | |
3317 load->set_recognized_kind(kind); | 3315 load->set_recognized_kind(kind); |
3318 return ReturnDefinition(load); | 3316 return ReturnDefinition(load); |
3319 } | 3317 } |
3320 case MethodRecognizer::kBigint_getUsed: { | 3318 case MethodRecognizer::kBigint_getUsed: { |
3321 Value* receiver = Bind(BuildLoadThisVar(node->scope())); | 3319 Value* receiver = Bind(BuildLoadThisVar(node->scope())); |
3322 LoadFieldInstr* load = new(I) LoadFieldInstr( | 3320 LoadFieldInstr* load = new(I) LoadFieldInstr( |
3323 receiver, | 3321 receiver, |
3324 Bigint::used_offset(), | 3322 Bigint::used_offset(), |
3325 Type::ZoneHandle(I, Type::SmiType()), | 3323 Type::ZoneHandle(I, Type::SmiType()), |
3326 node->token_pos()); | 3324 node->token_pos()); |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4287 Report::MessageF(Report::kBailout, | 4285 Report::MessageF(Report::kBailout, |
4288 Script::Handle(function.script()), | 4286 Script::Handle(function.script()), |
4289 function.token_pos(), | 4287 function.token_pos(), |
4290 "FlowGraphBuilder Bailout: %s %s", | 4288 "FlowGraphBuilder Bailout: %s %s", |
4291 String::Handle(function.name()).ToCString(), | 4289 String::Handle(function.name()).ToCString(), |
4292 reason); | 4290 reason); |
4293 UNREACHABLE(); | 4291 UNREACHABLE(); |
4294 } | 4292 } |
4295 | 4293 |
4296 } // namespace dart | 4294 } // namespace dart |
OLD | NEW |