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

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

Issue 10871005: Make ClassFinalizer indifferent on whether we are generating a snapshot or not. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/dart_api_impl.cc ('k') | runtime/vm/object.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 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2970 return RoundedAllocationSize(sizeof(RawApiError)); 2970 return RoundedAllocationSize(sizeof(RawApiError));
2971 } 2971 }
2972 2972
2973 static RawApiError* New(const String& message, 2973 static RawApiError* New(const String& message,
2974 Heap::Space space = Heap::kNew); 2974 Heap::Space space = Heap::kNew);
2975 2975
2976 virtual const char* ToErrorCString() const; 2976 virtual const char* ToErrorCString() const;
2977 2977
2978 private: 2978 private:
2979 void set_message(const String& message) const; 2979 void set_message(const String& message) const;
2980 static RawApiError* New();
2980 2981
2981 HEAP_OBJECT_IMPLEMENTATION(ApiError, Error); 2982 HEAP_OBJECT_IMPLEMENTATION(ApiError, Error);
2982 friend class Class; 2983 friend class Class;
2983 }; 2984 };
2984 2985
2985 2986
2986 class LanguageError : public Error { 2987 class LanguageError : public Error {
2987 public: 2988 public:
2988 RawString* message() const { return raw_ptr()->message_; } 2989 RawString* message() const { return raw_ptr()->message_; }
2989 static intptr_t message_offset() { 2990 static intptr_t message_offset() {
2990 return OFFSET_OF(RawLanguageError, message_); 2991 return OFFSET_OF(RawLanguageError, message_);
2991 } 2992 }
2992 2993
2993 static intptr_t InstanceSize() { 2994 static intptr_t InstanceSize() {
2994 return RoundedAllocationSize(sizeof(RawLanguageError)); 2995 return RoundedAllocationSize(sizeof(RawLanguageError));
2995 } 2996 }
2996 2997
2997 static RawLanguageError* New(const String& message, 2998 static RawLanguageError* New(const String& message,
2998 Heap::Space space = Heap::kNew); 2999 Heap::Space space = Heap::kNew);
2999 3000
3000 virtual const char* ToErrorCString() const; 3001 virtual const char* ToErrorCString() const;
3001 3002
3002 private: 3003 private:
3003 void set_message(const String& message) const; 3004 void set_message(const String& message) const;
3005 static RawLanguageError* New();
3004 3006
3005 HEAP_OBJECT_IMPLEMENTATION(LanguageError, Error); 3007 HEAP_OBJECT_IMPLEMENTATION(LanguageError, Error);
3006 friend class Class; 3008 friend class Class;
3007 }; 3009 };
3008 3010
3009 3011
3010 class UnhandledException : public Error { 3012 class UnhandledException : public Error {
3011 public: 3013 public:
3012 RawInstance* exception() const { return raw_ptr()->exception_; } 3014 RawInstance* exception() const { return raw_ptr()->exception_; }
3013 static intptr_t exception_offset() { 3015 static intptr_t exception_offset() {
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
5516 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5518 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5517 return false; 5519 return false;
5518 } 5520 }
5519 } 5521 }
5520 return true; 5522 return true;
5521 } 5523 }
5522 5524
5523 } // namespace dart 5525 } // namespace dart
5524 5526
5525 #endif // VM_OBJECT_H_ 5527 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698