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

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

Issue 10539145: Implement polymorphic instance calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/intermediate_language.h » ('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/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 Label* deopt) { 967 Label* deopt) {
968 Label ok; 968 Label ok;
969 ASSERT(class_ids[0] != kSmi); 969 ASSERT(class_ids[0] != kSmi);
970 __ testl(instance_reg, Immediate(kSmiTagMask)); 970 __ testl(instance_reg, Immediate(kSmiTagMask));
971 __ j(ZERO, deopt); 971 __ j(ZERO, deopt);
972 Label is_ok; 972 Label is_ok;
973 bool use_near_jump = class_ids.length() < 5; 973 bool use_near_jump = class_ids.length() < 5;
974 __ LoadClassId(temp_reg, instance_reg); 974 __ LoadClassId(temp_reg, instance_reg);
975 for (intptr_t i = 0; i < class_ids.length(); i++) { 975 for (intptr_t i = 0; i < class_ids.length(); i++) {
976 __ cmpl(temp_reg, Immediate(class_ids[i])); 976 __ cmpl(temp_reg, Immediate(class_ids[i]));
977 if (i == class_ids.length() - 1) { 977 if (i == (class_ids.length() - 1)) {
978 __ j(NOT_EQUAL, deopt); 978 __ j(NOT_EQUAL, deopt);
979 } else { 979 } else {
980 if (use_near_jump) { 980 if (use_near_jump) {
981 __ j(EQUAL, &is_ok, Assembler::kNearJump); 981 __ j(EQUAL, &is_ok, Assembler::kNearJump);
982 } else { 982 } else {
983 __ j(EQUAL, &is_ok); 983 __ j(EQUAL, &is_ok);
984 } 984 }
985 } 985 }
986 } 986 }
987 __ Bind(&is_ok); 987 __ Bind(&is_ok);
(...skipping 18 matching lines...) Expand all
1006 __ cvtsi2sd(result, temp); 1006 __ cvtsi2sd(result, temp);
1007 __ Bind(&done); 1007 __ Bind(&done);
1008 } 1008 }
1009 1009
1010 1010
1011 #undef __ 1011 #undef __
1012 1012
1013 } // namespace dart 1013 } // namespace dart
1014 1014
1015 #endif // defined TARGET_ARCH_IA32 1015 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698