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

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: 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') | runtime/vm/compiler.cc » ('J')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (!func.HasCode()) {
99 const Error& error = 99 const Object& result =
Vyacheslav Egorov (Google) 2017/03/30 09:58:52 There are a lot of places that do this. Maybe you
erikcorry 2017/03/30 12:26:33 Done.
100 Error::Handle(zone, Compiler::CompileFunction(thread, func)); 100 Object::Handle(zone, Compiler::CompileFunction(thread, func));
101 if (!error.IsNull()) { 101 if (result.IsError()) {
102 Exceptions::PropagateError(error); 102 Exceptions::PropagateError(Error::Cast(result));
103 UNREACHABLE(); 103 UNREACHABLE();
104 } 104 }
105 } 105 }
106 } 106 }
107 107
108 static RawInstance* CreateParameterMirrorList(const Function& func, 108 static RawInstance* CreateParameterMirrorList(const Function& func,
109 const Instance& owner_mirror) { 109 const Instance& owner_mirror) {
110 HANDLESCOPE(Thread::Current()); 110 HANDLESCOPE(Thread::Current());
111 const intptr_t implicit_param_count = func.NumImplicitParameters(); 111 const intptr_t implicit_param_count = func.NumImplicitParameters();
112 const intptr_t non_implicit_param_count = 112 const intptr_t non_implicit_param_count =
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 2094
2095 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2095 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2096 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2096 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2097 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2097 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2098 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); 2098 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
2099 } 2099 }
2100 2100
2101 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME 2101 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME
2102 2102
2103 } // namespace dart 2103 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698