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

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

Issue 19856003: Inline create parameter mirror list functionality. (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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.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 #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 14327 matching lines...) Expand 10 before | Expand all | Expand 10 after
14338 return Function::Cast(Object::Handle(referent())).raw(); 14338 return Function::Cast(Object::Handle(referent())).raw();
14339 } 14339 }
14340 14340
14341 14341
14342 RawLibrary* MirrorReference::GetLibraryReferent() const { 14342 RawLibrary* MirrorReference::GetLibraryReferent() const {
14343 ASSERT(Object::Handle(referent()).IsLibrary()); 14343 ASSERT(Object::Handle(referent()).IsLibrary());
14344 return Library::Cast(Object::Handle(referent())).raw(); 14344 return Library::Cast(Object::Handle(referent())).raw();
14345 } 14345 }
14346 14346
14347 14347
14348 RawMirrorReference* MirrorReference::New(Heap::Space space) { 14348 RawMirrorReference* MirrorReference::New(const Object& referent,
14349 Heap::Space space) {
14349 ASSERT(Isolate::Current()->object_store()->mirror_reference_class() 14350 ASSERT(Isolate::Current()->object_store()->mirror_reference_class()
14350 != Class::null()); 14351 != Class::null());
14351 RawObject* raw = Object::Allocate(MirrorReference::kClassId, 14352 MirrorReference& result = MirrorReference::Handle();
14352 MirrorReference::InstanceSize(), 14353 {
14353 space); 14354 RawObject* raw = Object::Allocate(MirrorReference::kClassId,
14354 return reinterpret_cast<RawMirrorReference*>(raw); 14355 MirrorReference::InstanceSize(),
14356 space);
14357 NoGCScope no_gc;
14358 result ^= raw;
14359 }
14360 result.set_referent(referent);
14361 return result.raw();
14355 } 14362 }
14356 14363
14357 14364
14358 const char* MirrorReference::ToCString() const { 14365 const char* MirrorReference::ToCString() const {
14359 return "_MirrorReference"; 14366 return "_MirrorReference";
14360 } 14367 }
14361 14368
14362 14369
14363 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14370 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14364 stream->OpenObject(); 14371 stream->OpenObject();
14365 stream->CloseObject(); 14372 stream->CloseObject();
14366 } 14373 }
14367 14374
14368 14375
14369 } // namespace dart 14376 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698