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

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

Issue 1384403002: Preparation for moving reusable handles to thread and more cleanups: isolate -> thread based handle… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_mirrors_api.h" 5 #include "include/dart_mirrors_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart.h" 9 #include "vm/dart.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return target; 76 return target;
77 } 77 }
78 78
79 const GrowableObjectArray& names = 79 const GrowableObjectArray& names =
80 GrowableObjectArray::Handle(Z, GrowableObjectArray::New()); 80 GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
81 Function& func = Function::Handle(Z); 81 Function& func = Function::Handle(Z);
82 String& name = String::Handle(Z); 82 String& name = String::Handle(Z);
83 83
84 if (obj.IsType()) { 84 if (obj.IsType()) {
85 const Class& cls = Class::Handle(Z, Type::Cast(obj).type_class()); 85 const Class& cls = Class::Handle(Z, Type::Cast(obj).type_class());
86 const Error& error = Error::Handle(Z, cls.EnsureIsFinalized(I)); 86 const Error& error = Error::Handle(Z, cls.EnsureIsFinalized(T));
87 if (!error.IsNull()) { 87 if (!error.IsNull()) {
88 return Api::NewHandle(I, error.raw()); 88 return Api::NewHandle(I, error.raw());
89 } 89 }
90 const Array& func_array = Array::Handle(Z, cls.functions()); 90 const Array& func_array = Array::Handle(Z, cls.functions());
91 91
92 // Some special types like 'dynamic' have a null functions list. 92 // Some special types like 'dynamic' have a null functions list.
93 if (!func_array.IsNull()) { 93 if (!func_array.IsNull()) {
94 for (intptr_t i = 0; i < func_array.Length(); ++i) { 94 for (intptr_t i = 0; i < func_array.Length(); ++i) {
95 func ^= func_array.At(i); 95 func ^= func_array.At(i);
96 96
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 RETURN_TYPE_ERROR(I, closure, Instance); 360 RETURN_TYPE_ERROR(I, closure, Instance);
361 } 361 }
362 362
363 ASSERT(ClassFinalizer::AllClassesFinalized()); 363 ASSERT(ClassFinalizer::AllClassesFinalized());
364 364
365 RawFunction* rf = Closure::function(closure_obj); 365 RawFunction* rf = Closure::function(closure_obj);
366 return Api::NewHandle(I, rf); 366 return Api::NewHandle(I, rf);
367 } 367 }
368 368
369 } // namespace dart 369 } // namespace dart
OLDNEW
« runtime/vm/gc_marker.h ('K') | « runtime/vm/isolate.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698