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

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

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, 3 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
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/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 7799 matching lines...) Expand 10 before | Expand all | Expand 10 after
7810 } 7810 }
7811 7811
7812 7812
7813 const char* Error::ToCString() const { 7813 const char* Error::ToCString() const {
7814 // Error is an abstract class. We should never reach here. 7814 // Error is an abstract class. We should never reach here.
7815 UNREACHABLE(); 7815 UNREACHABLE();
7816 return "Error"; 7816 return "Error";
7817 } 7817 }
7818 7818
7819 7819
7820 RawApiError* ApiError::New() {
7821 ASSERT(Object::api_error_class() != Class::null());
7822 RawObject* raw = Object::Allocate(ApiError::kClassId,
7823 ApiError::InstanceSize(),
7824 Heap::kOld);
7825 return reinterpret_cast<RawApiError*>(raw);
7826 }
7827
7828
7820 RawApiError* ApiError::New(const String& message, Heap::Space space) { 7829 RawApiError* ApiError::New(const String& message, Heap::Space space) {
7821 ASSERT(Object::api_error_class() != Class::null()); 7830 ASSERT(Object::api_error_class() != Class::null());
7822 ApiError& result = ApiError::Handle(); 7831 ApiError& result = ApiError::Handle();
7823 { 7832 {
7824 RawObject* raw = Object::Allocate(ApiError::kClassId, 7833 RawObject* raw = Object::Allocate(ApiError::kClassId,
7825 ApiError::InstanceSize(), 7834 ApiError::InstanceSize(),
7826 space); 7835 space);
7827 NoGCScope no_gc; 7836 NoGCScope no_gc;
7828 result ^= raw; 7837 result ^= raw;
7829 } 7838 }
(...skipping 11 matching lines...) Expand all
7841 const String& msg_str = String::Handle(message()); 7850 const String& msg_str = String::Handle(message());
7842 return msg_str.ToCString(); 7851 return msg_str.ToCString();
7843 } 7852 }
7844 7853
7845 7854
7846 const char* ApiError::ToCString() const { 7855 const char* ApiError::ToCString() const {
7847 return "ApiError"; 7856 return "ApiError";
7848 } 7857 }
7849 7858
7850 7859
7860 RawLanguageError* LanguageError::New() {
7861 ASSERT(Object::language_error_class() != Class::null());
7862 RawObject* raw = Object::Allocate(LanguageError::kClassId,
7863 LanguageError::InstanceSize(),
7864 Heap::kOld);
7865 return reinterpret_cast<RawLanguageError*>(raw);
7866 }
7867
7868
7851 RawLanguageError* LanguageError::New(const String& message, Heap::Space space) { 7869 RawLanguageError* LanguageError::New(const String& message, Heap::Space space) {
7852 ASSERT(Object::language_error_class() != Class::null()); 7870 ASSERT(Object::language_error_class() != Class::null());
7853 LanguageError& result = LanguageError::Handle(); 7871 LanguageError& result = LanguageError::Handle();
7854 { 7872 {
7855 RawObject* raw = Object::Allocate(LanguageError::kClassId, 7873 RawObject* raw = Object::Allocate(LanguageError::kClassId,
7856 LanguageError::InstanceSize(), 7874 LanguageError::InstanceSize(),
7857 space); 7875 space);
7858 NoGCScope no_gc; 7876 NoGCScope no_gc;
7859 result ^= raw; 7877 result ^= raw;
7860 } 7878 }
(...skipping 3272 matching lines...) Expand 10 before | Expand all | Expand 10 after
11133 } 11151 }
11134 return result.raw(); 11152 return result.raw();
11135 } 11153 }
11136 11154
11137 11155
11138 const char* WeakProperty::ToCString() const { 11156 const char* WeakProperty::ToCString() const {
11139 return "WeakProperty"; 11157 return "WeakProperty";
11140 } 11158 }
11141 11159
11142 } // namespace dart 11160 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | runtime/vm/raw_object_snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698