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

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

Issue 19780002: Convert MethodMirror.returnType to native calls (and more) (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 14197 matching lines...) Expand 10 before | Expand all | Expand 10 after
14208 const char* WeakProperty::ToCString() const { 14208 const char* WeakProperty::ToCString() const {
14209 return "_WeakProperty"; 14209 return "_WeakProperty";
14210 } 14210 }
14211 14211
14212 14212
14213 void WeakProperty::PrintToJSONStream(JSONStream* stream, bool ref) const { 14213 void WeakProperty::PrintToJSONStream(JSONStream* stream, bool ref) const {
14214 stream->OpenObject(); 14214 stream->OpenObject();
14215 stream->CloseObject(); 14215 stream->CloseObject();
14216 } 14216 }
14217 14217
14218
14219 RawFunction* MirrorReference::GetFunctionReferent(RawObject* raw_ptr) {
14220 const MirrorReference& ref = MirrorReference::CheckedHandle(raw_ptr);
14221 ASSERT(Object::Handle(ref.referent()).IsFunction());
14222 return Function::Cast(Object::Handle(ref.referent())).raw();
siva 2013/07/19 21:01:40 We use CheckedHandle only in the native code metho
Michael Lippautz (Google) 2013/07/19 22:13:20 Done.
14223 }
14224
14225
14218 RawMirrorReference* MirrorReference::New(Heap::Space space) { 14226 RawMirrorReference* MirrorReference::New(Heap::Space space) {
14219 ASSERT(Isolate::Current()->object_store()->mirror_reference_class() 14227 ASSERT(Isolate::Current()->object_store()->mirror_reference_class()
14220 != Class::null()); 14228 != Class::null());
14221 RawObject* raw = Object::Allocate(MirrorReference::kClassId, 14229 RawObject* raw = Object::Allocate(MirrorReference::kClassId,
14222 MirrorReference::InstanceSize(), 14230 MirrorReference::InstanceSize(),
14223 space); 14231 space);
14224 return reinterpret_cast<RawMirrorReference*>(raw); 14232 return reinterpret_cast<RawMirrorReference*>(raw);
14225 } 14233 }
14226 14234
14227 14235
14228 const char* MirrorReference::ToCString() const { 14236 const char* MirrorReference::ToCString() const {
14229 return "_MirrorReference"; 14237 return "_MirrorReference";
14230 } 14238 }
14231 14239
14232 14240
14233 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14241 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14234 stream->OpenObject(); 14242 stream->OpenObject();
14235 stream->CloseObject(); 14243 stream->CloseObject();
14236 } 14244 }
14237 14245
14238 14246
14239 } // namespace dart 14247 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698