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

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

Issue 20755004: Make sure that ICData always contains valid data (non-null values). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « no previous file | runtime/vm/flow_graph_compiler_ia32.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) 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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 __ cmp(R8, ShifterOperand(R7)); 986 __ cmp(R8, ShifterOperand(R7));
987 __ b(&all_arguments_processed, EQ); 987 __ b(&all_arguments_processed, EQ);
988 } 988 }
989 } 989 }
990 990
991 __ Bind(&wrong_num_arguments); 991 __ Bind(&wrong_num_arguments);
992 if (function.IsClosureFunction()) { 992 if (function.IsClosureFunction()) {
993 // Invoke noSuchMethod function passing "call" as the original name. 993 // Invoke noSuchMethod function passing "call" as the original name.
994 const int kNumArgsChecked = 1; 994 const int kNumArgsChecked = 1;
995 const ICData& ic_data = ICData::ZoneHandle( 995 const ICData& ic_data = ICData::ZoneHandle(
996 ICData::New(function, Symbols::Call(), Object::null_array(), 996 ICData::New(function, Symbols::Call(), Object::empty_array(),
997 Isolate::kNoDeoptId, kNumArgsChecked)); 997 Isolate::kNoDeoptId, kNumArgsChecked));
998 __ LoadObject(R5, ic_data); 998 __ LoadObject(R5, ic_data);
999 __ LeaveDartFrame(); // The arguments are still on the stack. 999 __ LeaveDartFrame(); // The arguments are still on the stack.
1000 __ Branch(&StubCode::CallNoSuchMethodFunctionLabel()); 1000 __ Branch(&StubCode::CallNoSuchMethodFunctionLabel());
1001 // The noSuchMethod call may return to the caller, but not here. 1001 // The noSuchMethod call may return to the caller, but not here.
1002 __ bkpt(0); 1002 __ bkpt(0);
1003 } else if (check_correct_named_args) { 1003 } else if (check_correct_named_args) {
1004 __ Stop("Wrong arguments"); 1004 __ Stop("Wrong arguments");
1005 } 1005 }
1006 1006
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 __ Bind(&wrong_num_arguments); 1157 __ Bind(&wrong_num_arguments);
1158 if (function.IsClosureFunction()) { 1158 if (function.IsClosureFunction()) {
1159 // Invoke noSuchMethod function passing the original function name. 1159 // Invoke noSuchMethod function passing the original function name.
1160 // For closure functions, use "call" as the original name. 1160 // For closure functions, use "call" as the original name.
1161 const String& name = 1161 const String& name =
1162 String::Handle(function.IsClosureFunction() 1162 String::Handle(function.IsClosureFunction()
1163 ? Symbols::Call().raw() 1163 ? Symbols::Call().raw()
1164 : function.name()); 1164 : function.name());
1165 const int kNumArgsChecked = 1; 1165 const int kNumArgsChecked = 1;
1166 const ICData& ic_data = ICData::ZoneHandle( 1166 const ICData& ic_data = ICData::ZoneHandle(
1167 ICData::New(function, name, Object::null_array(), 1167 ICData::New(function, name, Object::empty_array(),
1168 Isolate::kNoDeoptId, kNumArgsChecked)); 1168 Isolate::kNoDeoptId, kNumArgsChecked));
1169 __ LoadObject(R5, ic_data); 1169 __ LoadObject(R5, ic_data);
1170 __ LeaveDartFrame(); // The arguments are still on the stack. 1170 __ LeaveDartFrame(); // The arguments are still on the stack.
1171 __ Branch(&StubCode::CallNoSuchMethodFunctionLabel()); 1171 __ Branch(&StubCode::CallNoSuchMethodFunctionLabel());
1172 // The noSuchMethod call may return to the caller, but not here. 1172 // The noSuchMethod call may return to the caller, but not here.
1173 __ bkpt(0); 1173 __ bkpt(0);
1174 } else { 1174 } else {
1175 __ Stop("Wrong number of arguments"); 1175 __ Stop("Wrong number of arguments");
1176 } 1176 }
1177 __ Bind(&correct_num_arguments); 1177 __ Bind(&correct_num_arguments);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 DRegister dreg = EvenDRegisterOf(reg); 1896 DRegister dreg = EvenDRegisterOf(reg);
1897 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1897 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1898 } 1898 }
1899 1899
1900 1900
1901 #undef __ 1901 #undef __
1902 1902
1903 } // namespace dart 1903 } // namespace dart
1904 1904
1905 #endif // defined TARGET_ARCH_ARM 1905 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698