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

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

Issue 1153963002: Remove value check from ICData checks/house-keeping (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: c Created 5 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 ASSERT(!is_optimizing() 1030 ASSERT(!is_optimizing()
1031 || may_reoptimize() 1031 || may_reoptimize()
1032 || flow_graph().IsCompiledForOsr()); 1032 || flow_graph().IsCompiledForOsr());
1033 switch (ic_data.NumArgsTested()) { 1033 switch (ic_data.NumArgsTested()) {
1034 case 1: 1034 case 1:
1035 label_address = stub_code->OneArgOptimizedCheckInlineCacheEntryPoint(); 1035 label_address = stub_code->OneArgOptimizedCheckInlineCacheEntryPoint();
1036 break; 1036 break;
1037 case 2: 1037 case 2:
1038 label_address = stub_code->TwoArgsOptimizedCheckInlineCacheEntryPoint(); 1038 label_address = stub_code->TwoArgsOptimizedCheckInlineCacheEntryPoint();
1039 break; 1039 break;
1040 case 3:
1041 label_address =
1042 stub_code->ThreeArgsOptimizedCheckInlineCacheEntryPoint();
1043 break;
1044 default: 1040 default:
1045 UNIMPLEMENTED(); 1041 UNIMPLEMENTED();
1046 } 1042 }
1047 ExternalLabel target_label(label_address); 1043 ExternalLabel target_label(label_address);
1048 EmitOptimizedInstanceCall(&target_label, ic_data, 1044 EmitOptimizedInstanceCall(&target_label, ic_data,
1049 argument_count, deopt_id, token_pos, locs); 1045 argument_count, deopt_id, token_pos, locs);
1050 return; 1046 return;
1051 } 1047 }
1052 1048
1053 if (is_optimizing() && 1049 if (is_optimizing() &&
1054 // Do not make the instance call megamorphic if the callee needs to decode 1050 // Do not make the instance call megamorphic if the callee needs to decode
1055 // the calling code sequence to lookup the ic data and verify if a JS 1051 // the calling code sequence to lookup the ic data and verify if a JS
1056 // warning has already been issued or not. 1052 // warning has already been issued or not.
1057 (!FLAG_warn_on_javascript_compatibility || 1053 (!FLAG_warn_on_javascript_compatibility ||
1058 !ic_data.MayCheckForJSWarning())) { 1054 !ic_data.MayCheckForJSWarning())) {
1059 EmitMegamorphicInstanceCall(ic_data, argument_count, 1055 EmitMegamorphicInstanceCall(ic_data, argument_count,
1060 deopt_id, token_pos, locs); 1056 deopt_id, token_pos, locs);
1061 return; 1057 return;
1062 } 1058 }
1063 1059
1064 switch (ic_data.NumArgsTested()) { 1060 switch (ic_data.NumArgsTested()) {
1065 case 1: 1061 case 1:
1066 label_address = stub_code->OneArgCheckInlineCacheEntryPoint(); 1062 label_address = stub_code->OneArgCheckInlineCacheEntryPoint();
1067 break; 1063 break;
1068 case 2: 1064 case 2:
1069 label_address = stub_code->TwoArgsCheckInlineCacheEntryPoint(); 1065 label_address = stub_code->TwoArgsCheckInlineCacheEntryPoint();
1070 break; 1066 break;
1071 case 3:
1072 label_address = stub_code->ThreeArgsCheckInlineCacheEntryPoint();
1073 break;
1074 default: 1067 default:
1075 UNIMPLEMENTED(); 1068 UNIMPLEMENTED();
1076 } 1069 }
1077 ExternalLabel target_label(label_address); 1070 ExternalLabel target_label(label_address);
1078 EmitInstanceCall(&target_label, ic_data, argument_count, 1071 EmitInstanceCall(&target_label, ic_data, argument_count,
1079 deopt_id, token_pos, locs); 1072 deopt_id, token_pos, locs);
1080 } 1073 }
1081 1074
1082 1075
1083 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, 1076 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id,
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 1720
1728 1721
1729 void FlowGraphCompiler::FrameStateClear() { 1722 void FlowGraphCompiler::FrameStateClear() {
1730 ASSERT(!is_optimizing()); 1723 ASSERT(!is_optimizing());
1731 frame_state_.TruncateTo(0); 1724 frame_state_.TruncateTo(0);
1732 } 1725 }
1733 #endif 1726 #endif
1734 1727
1735 1728
1736 } // namespace dart 1729 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698