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

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

Issue 20216002: Make ClassMirror.typeVariables lazy and convert dependencies to native code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 14342 matching lines...) Expand 10 before | Expand all | Expand 10 after
14353 return Function::Cast(Object::Handle(referent())).raw(); 14353 return Function::Cast(Object::Handle(referent())).raw();
14354 } 14354 }
14355 14355
14356 14356
14357 RawLibrary* MirrorReference::GetLibraryReferent() const { 14357 RawLibrary* MirrorReference::GetLibraryReferent() const {
14358 ASSERT(Object::Handle(referent()).IsLibrary()); 14358 ASSERT(Object::Handle(referent()).IsLibrary());
14359 return Library::Cast(Object::Handle(referent())).raw(); 14359 return Library::Cast(Object::Handle(referent())).raw();
14360 } 14360 }
14361 14361
14362 14362
14363 RawTypeParameter* MirrorReference::GetTypeParameterReferent() const {
14364 ASSERT(Object::Handle(referent()).IsTypeParameter());
14365 return TypeParameter::Cast(Object::Handle(referent())).raw();
14366 }
14367
14368
14363 RawMirrorReference* MirrorReference::New(const Object& referent, 14369 RawMirrorReference* MirrorReference::New(const Object& referent,
14364 Heap::Space space) { 14370 Heap::Space space) {
14365 ASSERT(Isolate::Current()->object_store()->mirror_reference_class() 14371 ASSERT(Isolate::Current()->object_store()->mirror_reference_class()
14366 != Class::null()); 14372 != Class::null());
14367 MirrorReference& result = MirrorReference::Handle(); 14373 MirrorReference& result = MirrorReference::Handle();
14368 { 14374 {
14369 RawObject* raw = Object::Allocate(MirrorReference::kClassId, 14375 RawObject* raw = Object::Allocate(MirrorReference::kClassId,
14370 MirrorReference::InstanceSize(), 14376 MirrorReference::InstanceSize(),
14371 space); 14377 space);
14372 NoGCScope no_gc; 14378 NoGCScope no_gc;
14373 result ^= raw; 14379 result ^= raw;
14374 } 14380 }
14375 result.set_referent(referent); 14381 result.set_referent(referent);
14376 return result.raw(); 14382 return result.raw();
14377 } 14383 }
14378 14384
14379 14385
14380 const char* MirrorReference::ToCString() const { 14386 const char* MirrorReference::ToCString() const {
14381 return "_MirrorReference"; 14387 return "_MirrorReference";
14382 } 14388 }
14383 14389
14384 14390
14385 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14391 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14386 stream->OpenObject(); 14392 stream->OpenObject();
14387 stream->CloseObject(); 14393 stream->CloseObject();
14388 } 14394 }
14389 14395
14390 14396
14391 } // namespace dart 14397 } // namespace dart
OLDNEW
« runtime/lib/mirrors.cc ('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