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

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

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 4 years, 8 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
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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 3471 matching lines...) Expand 10 before | Expand all | Expand 10 after
3482 case MethodRecognizer::kGrowableArrayLength: 3482 case MethodRecognizer::kGrowableArrayLength:
3483 case MethodRecognizer::kObjectArrayLength: 3483 case MethodRecognizer::kObjectArrayLength:
3484 case MethodRecognizer::kImmutableArrayLength: 3484 case MethodRecognizer::kImmutableArrayLength:
3485 case MethodRecognizer::kTypedDataLength: { 3485 case MethodRecognizer::kTypedDataLength: {
3486 LoadFieldInstr* load = BuildNativeGetter( 3486 LoadFieldInstr* load = BuildNativeGetter(
3487 node, kind, OffsetForLengthGetter(kind), 3487 node, kind, OffsetForLengthGetter(kind),
3488 Type::ZoneHandle(Z, Type::SmiType()), kSmiCid); 3488 Type::ZoneHandle(Z, Type::SmiType()), kSmiCid);
3489 load->set_is_immutable(kind != MethodRecognizer::kGrowableArrayLength); 3489 load->set_is_immutable(kind != MethodRecognizer::kGrowableArrayLength);
3490 return ReturnDefinition(load); 3490 return ReturnDefinition(load);
3491 } 3491 }
3492 #if !defined(TARGET_ARCH_DBC)
3493 // TODO(vegorov) add bytecode to support this method.
3492 case MethodRecognizer::kClassIDgetID: { 3494 case MethodRecognizer::kClassIDgetID: {
3493 LocalVariable* value_var = 3495 LocalVariable* value_var =
3494 node->scope()->LookupVariable(Symbols::Value(), true); 3496 node->scope()->LookupVariable(Symbols::Value(), true);
3495 Value* value = Bind(new(Z) LoadLocalInstr(*value_var, token_pos)); 3497 Value* value = Bind(new(Z) LoadLocalInstr(*value_var, token_pos));
3496 LoadClassIdInstr* load = new(Z) LoadClassIdInstr(value); 3498 LoadClassIdInstr* load = new(Z) LoadClassIdInstr(value);
3497 return ReturnDefinition(load); 3499 return ReturnDefinition(load);
3498 } 3500 }
3501 #endif
3499 case MethodRecognizer::kGrowableArrayCapacity: { 3502 case MethodRecognizer::kGrowableArrayCapacity: {
3500 Value* receiver = Bind(BuildLoadThisVar(node->scope(), token_pos)); 3503 Value* receiver = Bind(BuildLoadThisVar(node->scope(), token_pos));
3501 LoadFieldInstr* data_load = new(Z) LoadFieldInstr( 3504 LoadFieldInstr* data_load = new(Z) LoadFieldInstr(
3502 receiver, 3505 receiver,
3503 Array::data_offset(), 3506 Array::data_offset(),
3504 Object::dynamic_type(), 3507 Object::dynamic_type(),
3505 node->token_pos()); 3508 node->token_pos());
3506 data_load->set_result_cid(kArrayCid); 3509 data_load->set_result_cid(kArrayCid);
3507 Value* data = Bind(data_load); 3510 Value* data = Bind(data_load);
3508 LoadFieldInstr* length_load = new(Z) LoadFieldInstr( 3511 LoadFieldInstr* length_load = new(Z) LoadFieldInstr(
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
4656 Script::Handle(function.script()), 4659 Script::Handle(function.script()),
4657 function.token_pos(), 4660 function.token_pos(),
4658 Report::AtLocation, 4661 Report::AtLocation,
4659 "FlowGraphBuilder Bailout: %s %s", 4662 "FlowGraphBuilder Bailout: %s %s",
4660 String::Handle(function.name()).ToCString(), 4663 String::Handle(function.name()).ToCString(),
4661 reason); 4664 reason);
4662 UNREACHABLE(); 4665 UNREACHABLE();
4663 } 4666 }
4664 4667
4665 } // namespace dart 4668 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698