Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 580903004: Make sure Bigint._digits is always a Uint32List (instead of sometimes null). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698