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

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

Issue 1136163002: Some more cleanup of the finger print checking code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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/object.h ('k') | runtime/vm/symbols.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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 10446 matching lines...) Expand 10 before | Expand all | Expand 10 after
10457 } 10457 }
10458 } 10458 }
10459 if (!func.IsNull()) { 10459 if (!func.IsNull()) {
10460 return func.raw(); 10460 return func.raw();
10461 } 10461 }
10462 } 10462 }
10463 return Function::null(); 10463 return Function::null();
10464 } 10464 }
10465 10465
10466 10466
10467 #if defined(DART_NO_SNAPSHOT)
10467 void Library::CheckFunctionFingerprints() { 10468 void Library::CheckFunctionFingerprints() {
10468 GrowableArray<Library*> all_libs; 10469 GrowableArray<Library*> all_libs;
10469 Function& func = Function::Handle(); 10470 Function& func = Function::Handle();
10470 bool has_errors = false; 10471 bool has_errors = false;
10471 10472
10472 #define CHECK_FINGERPRINTS(class_name, function_name, dest, fp) \ 10473 #define CHECK_FINGERPRINTS(class_name, function_name, dest, fp) \
10473 func = GetFunction(all_libs, #class_name, #function_name); \ 10474 func = GetFunction(all_libs, #class_name, #function_name); \
10474 if (func.IsNull()) { \ 10475 if (func.IsNull()) { \
10475 has_errors = true; \ 10476 has_errors = true; \
10476 OS::Print("Function not found %s.%s\n", #class_name, #function_name); \ 10477 OS::Print("Function not found %s.%s\n", #class_name, #function_name); \
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
10517 } \ 10518 } \
10518 10519
10519 RECOGNIZED_LIST_FACTORY_LIST(CHECK_FACTORY_FINGERPRINTS); 10520 RECOGNIZED_LIST_FACTORY_LIST(CHECK_FACTORY_FINGERPRINTS);
10520 10521
10521 #undef CHECK_FACTORY_FINGERPRINTS 10522 #undef CHECK_FACTORY_FINGERPRINTS
10522 10523
10523 if (has_errors) { 10524 if (has_errors) {
10524 FATAL("Fingerprint mismatch."); 10525 FATAL("Fingerprint mismatch.");
10525 } 10526 }
10526 } 10527 }
10528 #endif // defined(DART_NO_SNAPSHOT).
10527 10529
10528 10530
10529 RawInstructions* Instructions::New(intptr_t size) { 10531 RawInstructions* Instructions::New(intptr_t size) {
10530 ASSERT(Object::instructions_class() != Class::null()); 10532 ASSERT(Object::instructions_class() != Class::null());
10531 if (size < 0 || size > kMaxElements) { 10533 if (size < 0 || size > kMaxElements) {
10532 // This should be caught before we reach here. 10534 // This should be caught before we reach here.
10533 FATAL1("Fatal error in Instructions::New: invalid size %" Pd "\n", size); 10535 FATAL1("Fatal error in Instructions::New: invalid size %" Pd "\n", size);
10534 } 10536 }
10535 Instructions& result = Instructions::Handle(); 10537 Instructions& result = Instructions::Handle();
10536 { 10538 {
(...skipping 10193 matching lines...) Expand 10 before | Expand all | Expand 10 after
20730 return tag_label.ToCString(); 20732 return tag_label.ToCString();
20731 } 20733 }
20732 20734
20733 20735
20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20736 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20735 Instance::PrintJSONImpl(stream, ref); 20737 Instance::PrintJSONImpl(stream, ref);
20736 } 20738 }
20737 20739
20738 20740
20739 } // namespace dart 20741 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698