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

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, 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 14333 matching lines...) Expand 10 before | Expand all | Expand 10 after
14344 RawMirrorReference* MirrorReference::New(Heap::Space space) { 14344 RawMirrorReference* MirrorReference::New(Heap::Space space) {
14345 ASSERT(Isolate::Current()->object_store()->mirror_reference_class() 14345 ASSERT(Isolate::Current()->object_store()->mirror_reference_class()
14346 != Class::null()); 14346 != Class::null());
14347 RawObject* raw = Object::Allocate(MirrorReference::kClassId, 14347 RawObject* raw = Object::Allocate(MirrorReference::kClassId,
14348 MirrorReference::InstanceSize(), 14348 MirrorReference::InstanceSize(),
14349 space); 14349 space);
14350 return reinterpret_cast<RawMirrorReference*>(raw); 14350 return reinterpret_cast<RawMirrorReference*>(raw);
14351 } 14351 }
14352 14352
14353 14353
14354 RawMirrorReference* MirrorReference::New(const Object& referent,
14355 Heap::Space space) {
14356 const MirrorReference& ref = MirrorReference::Handle(
14357 MirrorReference::New(space));
14358 ref.set_referent(referent);
14359 return ref.raw();
siva 2013/07/23 21:44:58 It seems heavy weight to add another New method ju
Michael Lippautz (Google) 2013/07/23 23:18:13 We will make this the default for creating a Mirro
14360 }
14361
14362
14354 const char* MirrorReference::ToCString() const { 14363 const char* MirrorReference::ToCString() const {
14355 return "_MirrorReference"; 14364 return "_MirrorReference";
14356 } 14365 }
14357 14366
14358 14367
14359 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14368 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14360 stream->OpenObject(); 14369 stream->OpenObject();
14361 stream->CloseObject(); 14370 stream->CloseObject();
14362 } 14371 }
14363 14372
14364 14373
14365 } // namespace dart 14374 } // 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