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

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

Issue 2064693003: Remember inside an ICData if it is for a static call or an instance call (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/isolate_reload.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 // Class for intrinsifying functions. 4 // Class for intrinsifying functions.
5 5
6 #include "vm/assembler.h" 6 #include "vm/assembler.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 Definition* index = builder.AddParameter(2); 600 Definition* index = builder.AddParameter(2);
601 Definition* array = builder.AddParameter(3); 601 Definition* array = builder.AddParameter(3);
602 602
603 PrepareIndexedOp(&builder, array, index, TypedData::length_offset()); 603 PrepareIndexedOp(&builder, array, index, TypedData::length_offset());
604 604
605 const ICData& value_check = ICData::ZoneHandle(ICData::New( 605 const ICData& value_check = ICData::ZoneHandle(ICData::New(
606 flow_graph->function(), 606 flow_graph->function(),
607 String::Handle(flow_graph->function().name()), 607 String::Handle(flow_graph->function().name()),
608 Object::empty_array(), // Dummy args. descr. 608 Object::empty_array(), // Dummy args. descr.
609 Thread::kNoDeoptId, 609 Thread::kNoDeoptId,
610 1)); 610 1,
611 false));
611 value_check.AddReceiverCheck(kDoubleCid, flow_graph->function()); 612 value_check.AddReceiverCheck(kDoubleCid, flow_graph->function());
612 builder.AddInstruction( 613 builder.AddInstruction(
613 new CheckClassInstr(new Value(value), 614 new CheckClassInstr(new Value(value),
614 Thread::kNoDeoptId, 615 Thread::kNoDeoptId,
615 value_check, 616 value_check,
616 builder.TokenPos())); 617 builder.TokenPos()));
617 Definition* double_value = 618 Definition* double_value =
618 builder.AddUnboxInstr(kUnboxedDouble, 619 builder.AddUnboxInstr(kUnboxedDouble,
619 new Value(value), 620 new Value(value),
620 /* is_checked = */ true); 621 /* is_checked = */ true);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 BlockBuilder builder(flow_graph, normal_entry); 734 BlockBuilder builder(flow_graph, normal_entry);
734 735
735 Definition* right = builder.AddParameter(1); 736 Definition* right = builder.AddParameter(1);
736 Definition* left = builder.AddParameter(2); 737 Definition* left = builder.AddParameter(2);
737 738
738 const ICData& value_check = ICData::ZoneHandle(ICData::New( 739 const ICData& value_check = ICData::ZoneHandle(ICData::New(
739 flow_graph->function(), 740 flow_graph->function(),
740 String::Handle(flow_graph->function().name()), 741 String::Handle(flow_graph->function().name()),
741 Object::empty_array(), // Dummy args. descr. 742 Object::empty_array(), // Dummy args. descr.
742 Thread::kNoDeoptId, 743 Thread::kNoDeoptId,
743 1)); 744 1,
745 false));
744 value_check.AddReceiverCheck(kFloat32x4Cid, flow_graph->function()); 746 value_check.AddReceiverCheck(kFloat32x4Cid, flow_graph->function());
745 // Check argument. Receiver (left) is known to be a Float32x4. 747 // Check argument. Receiver (left) is known to be a Float32x4.
746 builder.AddInstruction( 748 builder.AddInstruction(
747 new CheckClassInstr(new Value(right), 749 new CheckClassInstr(new Value(right),
748 Thread::kNoDeoptId, 750 Thread::kNoDeoptId,
749 value_check, 751 value_check,
750 builder.TokenPos())); 752 builder.TokenPos()));
751 Definition* left_simd = 753 Definition* left_simd =
752 builder.AddUnboxInstr(kUnboxedFloat32x4, 754 builder.AddUnboxInstr(kUnboxedFloat32x4,
753 new Value(left), 755 new Value(left),
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 BlockBuilder builder(flow_graph, normal_entry); 977 BlockBuilder builder(flow_graph, normal_entry);
976 978
977 Definition* data = builder.AddParameter(1); 979 Definition* data = builder.AddParameter(1);
978 Definition* growable_array = builder.AddParameter(2); 980 Definition* growable_array = builder.AddParameter(2);
979 981
980 const ICData& value_check = ICData::ZoneHandle(ICData::New( 982 const ICData& value_check = ICData::ZoneHandle(ICData::New(
981 flow_graph->function(), 983 flow_graph->function(),
982 String::Handle(flow_graph->function().name()), 984 String::Handle(flow_graph->function().name()),
983 Object::empty_array(), // Dummy args. descr. 985 Object::empty_array(), // Dummy args. descr.
984 Thread::kNoDeoptId, 986 Thread::kNoDeoptId,
985 1)); 987 1,
988 false));
986 value_check.AddReceiverCheck(kArrayCid, flow_graph->function()); 989 value_check.AddReceiverCheck(kArrayCid, flow_graph->function());
987 builder.AddInstruction( 990 builder.AddInstruction(
988 new CheckClassInstr(new Value(data), 991 new CheckClassInstr(new Value(data),
989 Thread::kNoDeoptId, 992 Thread::kNoDeoptId,
990 value_check, 993 value_check,
991 builder.TokenPos())); 994 builder.TokenPos()));
992 995
993 builder.AddInstruction( 996 builder.AddInstruction(
994 new StoreInstanceFieldInstr(GrowableObjectArray::data_offset(), 997 new StoreInstanceFieldInstr(GrowableObjectArray::data_offset(),
995 new Value(growable_array), 998 new Value(growable_array),
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); 1233 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1231 BlockBuilder builder(flow_graph, normal_entry); 1234 BlockBuilder builder(flow_graph, normal_entry);
1232 1235
1233 return BuildInvokeMathCFunction(&builder, 1236 return BuildInvokeMathCFunction(&builder,
1234 MethodRecognizer::kDoubleRound); 1237 MethodRecognizer::kDoubleRound);
1235 } 1238 }
1236 #endif // !defined(TARGET_ARCH_DBC) 1239 #endif // !defined(TARGET_ARCH_DBC)
1237 1240
1238 1241
1239 } // namespace dart 1242 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698