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

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

Issue 10010029: When checking against non-parametrized types use a cache to hold result tuples (class, result). Tha… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/code_generator.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 4
5 #include "vm/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 cls.is_interface() ? "interface" : "class", 1213 cls.is_interface() ? "interface" : "class",
1214 class_name.ToCString()); 1214 class_name.ToCString());
1215 const Library& library = Library::Handle(cls.library()); 1215 const Library& library = Library::Handle(cls.library());
1216 if (!library.IsNull()) { 1216 if (!library.IsNull()) {
1217 OS::Print(" library '%s%s':\n", 1217 OS::Print(" library '%s%s':\n",
1218 String::Handle(library.url()).ToCString(), 1218 String::Handle(library.url()).ToCString(),
1219 String::Handle(library.private_key()).ToCString()); 1219 String::Handle(library.private_key()).ToCString());
1220 } else { 1220 } else {
1221 OS::Print(" (null library):\n"); 1221 OS::Print(" (null library):\n");
1222 } 1222 }
1223 const Type& super_type = Type::Handle(cls.super_type());
1224 if (super_type.IsNull()) {
1225 OS::Print(" Super: NULL");
1226 } else {
1227 const String& super_name = String::Handle(super_type.Name());
1228 OS::Print(" Super: %s", super_name.ToCString());
1229 }
1223 const Array& interfaces_array = Array::Handle(cls.interfaces()); 1230 const Array& interfaces_array = Array::Handle(cls.interfaces());
1224 AbstractType& interface = AbstractType::Handle(); 1231 if (interfaces_array.Length() > 0) {
1225 intptr_t len = interfaces_array.Length(); 1232 OS::Print("; interfaces: ");
1226 for (intptr_t i = 0; i < len; i++) { 1233 AbstractType& interface = AbstractType::Handle();
1227 interface ^= interfaces_array.At(i); 1234 intptr_t len = interfaces_array.Length();
1228 OS::Print(" %s\n", interface.ToCString()); 1235 for (intptr_t i = 0; i < len; i++) {
1236 interface ^= interfaces_array.At(i);
1237 OS::Print(" %s ", interface.ToCString());
1238 }
1229 } 1239 }
1240 OS::Print("\n");
1230 const Array& functions_array = Array::Handle(cls.functions()); 1241 const Array& functions_array = Array::Handle(cls.functions());
1231 Function& function = Function::Handle(); 1242 Function& function = Function::Handle();
1232 len = functions_array.Length(); 1243 intptr_t len = functions_array.Length();
1233 for (intptr_t i = 0; i < len; i++) { 1244 for (intptr_t i = 0; i < len; i++) {
1234 function ^= functions_array.At(i); 1245 function ^= functions_array.At(i);
1235 OS::Print(" %s\n", function.ToCString()); 1246 OS::Print(" %s\n", function.ToCString());
1236 } 1247 }
1237 const Array& fields_array = Array::Handle(cls.fields()); 1248 const Array& fields_array = Array::Handle(cls.fields());
1238 Field& field = Field::Handle(); 1249 Field& field = Field::Handle();
1239 len = fields_array.Length(); 1250 len = fields_array.Length();
1240 for (intptr_t i = 0; i < len; i++) { 1251 for (intptr_t i = 0; i < len; i++) {
1241 field ^= fields_array.At(i); 1252 field ^= fields_array.At(i);
1242 OS::Print(" %s\n", field.ToCString()); 1253 OS::Print(" %s\n", field.ToCString());
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 void ClassFinalizer::ReportError(const char* format, ...) { 1315 void ClassFinalizer::ReportError(const char* format, ...) {
1305 va_list args; 1316 va_list args;
1306 va_start(args, format); 1317 va_start(args, format);
1307 const Error& error = Error::Handle( 1318 const Error& error = Error::Handle(
1308 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); 1319 Parser::FormatError(Script::Handle(), -1, "Error", format, args));
1309 va_end(args); 1320 va_end(args);
1310 ReportError(error); 1321 ReportError(error);
1311 } 1322 }
1312 1323
1313 } // namespace dart 1324 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698