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

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

Issue 19512003: Implement VariableMirror creation with non-API code. To break circular initialization, have them fi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 14209 matching lines...) Expand 10 before | Expand all | Expand 10 after
14220 return "_WeakProperty"; 14220 return "_WeakProperty";
14221 } 14221 }
14222 14222
14223 14223
14224 void WeakProperty::PrintToJSONStream(JSONStream* stream, bool ref) const { 14224 void WeakProperty::PrintToJSONStream(JSONStream* stream, bool ref) const {
14225 stream->OpenObject(); 14225 stream->OpenObject();
14226 stream->CloseObject(); 14226 stream->CloseObject();
14227 } 14227 }
14228 14228
14229 14229
14230 RawField* MirrorReference::GetFieldReferent() const {
14231 ASSERT(Object::Handle(referent()).IsField());
14232 return Field::Cast(Object::Handle(referent())).raw();
14233 }
14234
14235
14230 RawFunction* MirrorReference::GetFunctionReferent() const { 14236 RawFunction* MirrorReference::GetFunctionReferent() const {
14231 ASSERT(Object::Handle(referent()).IsFunction()); 14237 ASSERT(Object::Handle(referent()).IsFunction());
14232 return Function::Cast(Object::Handle(referent())).raw(); 14238 return Function::Cast(Object::Handle(referent())).raw();
14233 } 14239 }
14234 14240
14235 14241
14236 RawMirrorReference* MirrorReference::New(Heap::Space space) { 14242 RawMirrorReference* MirrorReference::New(Heap::Space space) {
14237 ASSERT(Isolate::Current()->object_store()->mirror_reference_class() 14243 ASSERT(Isolate::Current()->object_store()->mirror_reference_class()
14238 != Class::null()); 14244 != Class::null());
14239 RawObject* raw = Object::Allocate(MirrorReference::kClassId, 14245 RawObject* raw = Object::Allocate(MirrorReference::kClassId,
14240 MirrorReference::InstanceSize(), 14246 MirrorReference::InstanceSize(),
14241 space); 14247 space);
14242 return reinterpret_cast<RawMirrorReference*>(raw); 14248 return reinterpret_cast<RawMirrorReference*>(raw);
14243 } 14249 }
14244 14250
14245 14251
14246 const char* MirrorReference::ToCString() const { 14252 const char* MirrorReference::ToCString() const {
14247 return "_MirrorReference"; 14253 return "_MirrorReference";
14248 } 14254 }
14249 14255
14250 14256
14251 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14257 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14252 stream->OpenObject(); 14258 stream->OpenObject();
14253 stream->CloseObject(); 14259 stream->CloseObject();
14254 } 14260 }
14255 14261
14256 14262
14257 } // namespace dart 14263 } // namespace dart
OLDNEW
« runtime/lib/mirrors_impl.dart ('K') | « runtime/vm/object.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698