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

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

Issue 2781483005: Improve internal compiler API so that OSR code is never installed on function. (Closed)
Patch Set: cosmetics Created 3 years, 8 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/code_generator.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (!func.IsGenerativeConstructor()) return; 88 if (!func.IsGenerativeConstructor()) return;
89 89
90 Thread* thread = Thread::Current(); 90 Thread* thread = Thread::Current();
91 Zone* zone = thread->zone(); 91 Zone* zone = thread->zone();
92 const Class& cls = Class::Handle(zone, func.Owner()); 92 const Class& cls = Class::Handle(zone, func.Owner());
93 const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread)); 93 const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
94 if (!error.IsNull()) { 94 if (!error.IsNull()) {
95 Exceptions::PropagateError(error); 95 Exceptions::PropagateError(error);
96 UNREACHABLE(); 96 UNREACHABLE();
97 } 97 }
98 if (!func.HasCode()) { 98 func.EnsureHasCode();
99 const Error& error =
100 Error::Handle(zone, Compiler::CompileFunction(thread, func));
101 if (!error.IsNull()) {
102 Exceptions::PropagateError(error);
103 UNREACHABLE();
104 }
105 }
106 } 99 }
107 100
108 static RawInstance* CreateParameterMirrorList(const Function& func, 101 static RawInstance* CreateParameterMirrorList(const Function& func,
109 const Instance& owner_mirror) { 102 const Instance& owner_mirror) {
110 HANDLESCOPE(Thread::Current()); 103 HANDLESCOPE(Thread::Current());
111 const intptr_t implicit_param_count = func.NumImplicitParameters(); 104 const intptr_t implicit_param_count = func.NumImplicitParameters();
112 const intptr_t non_implicit_param_count = 105 const intptr_t non_implicit_param_count =
113 func.NumParameters() - implicit_param_count; 106 func.NumParameters() - implicit_param_count;
114 const intptr_t index_of_first_optional_param = 107 const intptr_t index_of_first_optional_param =
115 non_implicit_param_count - func.NumOptionalParameters(); 108 non_implicit_param_count - func.NumOptionalParameters();
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 2087
2095 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2088 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2096 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2089 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2097 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2098 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); 2091 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
2099 } 2092 }
2100 2093
2101 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME 2094 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME
2102 2095
2103 } // namespace dart 2096 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698