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

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

Issue 754763003: Version 1.8.3 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 6 years 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 | « dart/runtime/lib/integers.dart ('k') | dart/runtime/vm/flow_graph_optimizer.cc » ('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 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3289 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3289 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3290 LoadFieldInstr* load = new(I) LoadFieldInstr( 3290 LoadFieldInstr* load = new(I) LoadFieldInstr(
3291 receiver, 3291 receiver,
3292 Bigint::digits_offset(), 3292 Bigint::digits_offset(),
3293 Type::ZoneHandle(I, Type::DynamicType()), 3293 Type::ZoneHandle(I, Type::DynamicType()),
3294 node->token_pos()); 3294 node->token_pos());
3295 load->set_result_cid(kTypedDataUint32ArrayCid); 3295 load->set_result_cid(kTypedDataUint32ArrayCid);
3296 load->set_recognized_kind(kind); 3296 load->set_recognized_kind(kind);
3297 return ReturnDefinition(load); 3297 return ReturnDefinition(load);
3298 } 3298 }
3299 case MethodRecognizer::kBigint_setDigits: {
3300 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3301 LocalVariable* value_var =
3302 node->scope()->LookupVariable(Symbols::Value(), true);
3303 ASSERT(value_var != NULL);
3304 Value* value = Bind(new(I) LoadLocalInstr(*value_var));
3305 StoreInstanceFieldInstr* store = new(I) StoreInstanceFieldInstr(
3306 Bigint::digits_offset(),
3307 receiver,
3308 value,
3309 kEmitStoreBarrier,
3310 node->token_pos());
3311 Do(store);
3312 ConstantInstr* null_const = new(I) ConstantInstr(
3313 Object::ZoneHandle(I, Object::null()));
3314 return ReturnDefinition(null_const);
3315 }
3299 case MethodRecognizer::kBigint_getUsed: { 3316 case MethodRecognizer::kBigint_getUsed: {
3300 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3317 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3301 LoadFieldInstr* load = new(I) LoadFieldInstr( 3318 LoadFieldInstr* load = new(I) LoadFieldInstr(
3302 receiver, 3319 receiver,
3303 Bigint::used_offset(), 3320 Bigint::used_offset(),
3304 Type::ZoneHandle(I, Type::SmiType()), 3321 Type::ZoneHandle(I, Type::SmiType()),
3305 node->token_pos()); 3322 node->token_pos());
3306 load->set_result_cid(kSmiCid); 3323 load->set_result_cid(kSmiCid);
3307 load->set_recognized_kind(kind); 3324 load->set_recognized_kind(kind);
3308 return ReturnDefinition(load); 3325 return ReturnDefinition(load);
3309 } 3326 }
3327 case MethodRecognizer::kBigint_setUsed: {
3328 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3329 LocalVariable* value_var =
3330 node->scope()->LookupVariable(Symbols::Value(), true);
3331 ASSERT(value_var != NULL);
3332 Value* value = Bind(new(I) LoadLocalInstr(*value_var));
3333 StoreInstanceFieldInstr* store = new(I) StoreInstanceFieldInstr(
3334 Bigint::used_offset(),
3335 receiver,
3336 value,
3337 kNoStoreBarrier,
3338 node->token_pos());
3339 Do(store);
3340 ConstantInstr* null_const = new(I) ConstantInstr(
3341 Object::ZoneHandle(I, Object::null()));
3342 return ReturnDefinition(null_const);
3343 }
3310 case MethodRecognizer::kBigint_getNeg: { 3344 case MethodRecognizer::kBigint_getNeg: {
3311 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3345 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3312 LoadFieldInstr* load = new(I) LoadFieldInstr( 3346 LoadFieldInstr* load = new(I) LoadFieldInstr(
3313 receiver, 3347 receiver,
3314 Bigint::neg_offset(), 3348 Bigint::neg_offset(),
3315 Type::ZoneHandle(I, Type::BoolType()), 3349 Type::ZoneHandle(I, Type::BoolType()),
3316 node->token_pos()); 3350 node->token_pos());
3317 load->set_result_cid(kBoolCid); 3351 load->set_result_cid(kBoolCid);
3318 load->set_recognized_kind(kind); 3352 load->set_recognized_kind(kind);
3319 return ReturnDefinition(load); 3353 return ReturnDefinition(load);
3320 } 3354 }
3355 case MethodRecognizer::kBigint_setNeg: {
3356 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3357 LocalVariable* value_var =
3358 node->scope()->LookupVariable(Symbols::Value(), true);
3359 ASSERT(value_var != NULL);
3360 Value* value = Bind(new(I) LoadLocalInstr(*value_var));
3361 StoreInstanceFieldInstr* store = new(I) StoreInstanceFieldInstr(
3362 Bigint::neg_offset(),
3363 receiver,
3364 value,
3365 kEmitStoreBarrier,
3366 node->token_pos());
3367 Do(store);
3368 ConstantInstr* null_const = new(I) ConstantInstr(
3369 Object::ZoneHandle(I, Object::null()));
3370 return ReturnDefinition(null_const);
3371 }
3321 default: 3372 default:
3322 break; 3373 break;
3323 } 3374 }
3324 } 3375 }
3325 InlineBailout("EffectGraphVisitor::VisitNativeBodyNode"); 3376 InlineBailout("EffectGraphVisitor::VisitNativeBodyNode");
3326 NativeCallInstr* native_call = new(I) NativeCallInstr(node); 3377 NativeCallInstr* native_call = new(I) NativeCallInstr(node);
3327 ReturnDefinition(native_call); 3378 ReturnDefinition(native_call);
3328 } 3379 }
3329 3380
3330 3381
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
4249 Report::MessageF(Report::kBailout, 4300 Report::MessageF(Report::kBailout,
4250 Script::Handle(function.script()), 4301 Script::Handle(function.script()),
4251 function.token_pos(), 4302 function.token_pos(),
4252 "FlowGraphBuilder Bailout: %s %s", 4303 "FlowGraphBuilder Bailout: %s %s",
4253 String::Handle(function.name()).ToCString(), 4304 String::Handle(function.name()).ToCString(),
4254 reason); 4305 reason);
4255 UNREACHABLE(); 4306 UNREACHABLE();
4256 } 4307 }
4257 4308
4258 } // namespace dart 4309 } // namespace dart
OLDNEW
« no previous file with comments | « dart/runtime/lib/integers.dart ('k') | dart/runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698