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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 3 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
« no previous file with comments | « no previous file | runtime/vm/ast_printer.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 "lib/mirrors.h" 5 #include "lib/mirrors.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 zone, Compiler::CompileFunction(thread, func)); 102 zone, Compiler::CompileFunction(thread, func));
103 if (!error.IsNull()) { 103 if (!error.IsNull()) {
104 Exceptions::PropagateError(error); 104 Exceptions::PropagateError(error);
105 UNREACHABLE(); 105 UNREACHABLE();
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 static RawInstance* CreateParameterMirrorList(const Function& func, 110 static RawInstance* CreateParameterMirrorList(const Function& func,
111 const Instance& owner_mirror) { 111 const Instance& owner_mirror) {
112 HANDLESCOPE(Isolate::Current()); 112 HANDLESCOPE(Thread::Current());
113 const intptr_t implicit_param_count = func.NumImplicitParameters(); 113 const intptr_t implicit_param_count = func.NumImplicitParameters();
114 const intptr_t non_implicit_param_count = func.NumParameters() - 114 const intptr_t non_implicit_param_count = func.NumParameters() -
115 implicit_param_count; 115 implicit_param_count;
116 const intptr_t index_of_first_optional_param = 116 const intptr_t index_of_first_optional_param =
117 non_implicit_param_count - func.NumOptionalParameters(); 117 non_implicit_param_count - func.NumOptionalParameters();
118 const intptr_t index_of_first_named_param = 118 const intptr_t index_of_first_named_param =
119 non_implicit_param_count - func.NumOptionalNamedParameters(); 119 non_implicit_param_count - func.NumOptionalNamedParameters();
120 const Array& results = Array::Handle(Array::New(non_implicit_param_count)); 120 const Array& results = Array::Handle(Array::New(non_implicit_param_count));
121 const Array& args = Array::Handle(Array::New(9)); 121 const Array& args = Array::Handle(Array::New(9));
122 122
(...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 } 2097 }
2098 2098
2099 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2099 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2100 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2100 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2101 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2101 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2102 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); 2102 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw();
2103 } 2103 }
2104 2104
2105 2105
2106 } // namespace dart 2106 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698