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

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

Issue 10441111: - Rename class index to class id. (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/class_table.cc ('k') | runtime/vm/dart_api_impl.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/code_generator.h" 8 #include "vm/code_generator.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 __ testl(EAX, Immediate(kSmiTagMask)); 1449 __ testl(EAX, Immediate(kSmiTagMask));
1450 __ j(ZERO, is_not_instance_lbl); 1450 __ j(ZERO, is_not_instance_lbl);
1451 const AbstractTypeArguments& type_arguments = 1451 const AbstractTypeArguments& type_arguments =
1452 AbstractTypeArguments::ZoneHandle(type.arguments()); 1452 AbstractTypeArguments::ZoneHandle(type.arguments());
1453 const bool is_raw_type = type_arguments.IsNull() || 1453 const bool is_raw_type = type_arguments.IsNull() ||
1454 type_arguments.IsRaw(type_arguments.Length()); 1454 type_arguments.IsRaw(type_arguments.Length());
1455 if (is_raw_type) { 1455 if (is_raw_type) {
1456 // Dynamic type argument, check only classes. 1456 // Dynamic type argument, check only classes.
1457 __ LoadClassIndexOfObject(ECX, EAX); 1457 __ LoadClassIndexOfObject(ECX, EAX);
1458 if (!type_class.is_interface()) { 1458 if (!type_class.is_interface()) {
1459 __ cmpl(ECX, Immediate(type_class.index())); 1459 __ cmpl(ECX, Immediate(type_class.id()));
1460 __ j(EQUAL, is_instance_lbl); 1460 __ j(EQUAL, is_instance_lbl);
1461 } 1461 }
1462 if (type.IsListInterface()) { 1462 if (type.IsListInterface()) {
1463 // TODO(srdjan) also accept List<Object>. 1463 // TODO(srdjan) also accept List<Object>.
1464 __ cmpl(ECX, Immediate(CoreClass("ObjectArray")->index())); 1464 __ cmpl(ECX, Immediate(CoreClass("ObjectArray")->id()));
1465 __ j(EQUAL, is_instance_lbl); 1465 __ j(EQUAL, is_instance_lbl);
1466 __ cmpl(ECX, Immediate(CoreClass("GrowableObjectArray")->index())); 1466 __ cmpl(ECX, Immediate(CoreClass("GrowableObjectArray")->id()));
1467 __ j(EQUAL, is_instance_lbl); 1467 __ j(EQUAL, is_instance_lbl);
1468 } 1468 }
1469 return 1469 return
1470 GenerateSubtype1TestCacheLookup(node_id, token_index, type_class, 1470 GenerateSubtype1TestCacheLookup(node_id, token_index, type_class,
1471 is_instance_lbl, is_not_instance_lbl); 1471 is_instance_lbl, is_not_instance_lbl);
1472 } 1472 }
1473 // If one type argument only, quick check. 1473 // If one type argument only, quick check.
1474 if (type_arguments.Length() == 1) { 1474 if (type_arguments.Length() == 1) {
1475 const AbstractType& tp_argument = AbstractType::ZoneHandle( 1475 const AbstractType& tp_argument = AbstractType::ZoneHandle(
1476 type_arguments.TypeAt(0)); 1476 type_arguments.TypeAt(0));
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
2971 const Error& error = Error::Handle( 2971 const Error& error = Error::Handle(
2972 Parser::FormatError(script, token_index, "Error", format, args)); 2972 Parser::FormatError(script, token_index, "Error", format, args));
2973 va_end(args); 2973 va_end(args);
2974 Isolate::Current()->long_jump_base()->Jump(1, error); 2974 Isolate::Current()->long_jump_base()->Jump(1, error);
2975 UNREACHABLE(); 2975 UNREACHABLE();
2976 } 2976 }
2977 2977
2978 } // namespace dart 2978 } // namespace dart
2979 2979
2980 #endif // defined TARGET_ARCH_IA32 2980 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/dart_api_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698