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

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

Powered by Google App Engine
This is Rietveld 408576698