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

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

Issue 2941643002: Check for a passed-in type argument vector in the prolog of generic functions. (Closed)
Patch Set: address review comments Created 3 years, 6 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 | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_entry.h » ('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 "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); 108 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size);
109 DECLARE_FLAG(bool, trace_failed_optimization_attempts); 109 DECLARE_FLAG(bool, trace_failed_optimization_attempts);
110 DECLARE_FLAG(bool, trace_irregexp); 110 DECLARE_FLAG(bool, trace_irregexp);
111 111
112 112
113 #ifndef DART_PRECOMPILED_RUNTIME 113 #ifndef DART_PRECOMPILED_RUNTIME
114 114
115 115
116 bool UseKernelFrontEndFor(ParsedFunction* parsed_function) { 116 bool UseKernelFrontEndFor(ParsedFunction* parsed_function) {
117 const Function& function = parsed_function->function(); 117 const Function& function = parsed_function->function();
118 // TODO(regis): Kernel Front End needs to allocate a local to hold type args.
118 return (function.kernel_offset() > 0) || 119 return (function.kernel_offset() > 0) ||
119 (function.kind() == RawFunction::kNoSuchMethodDispatcher) || 120 (!FLAG_reify_generic_functions &&
120 (function.kind() == RawFunction::kInvokeFieldDispatcher); 121 ((function.kind() == RawFunction::kNoSuchMethodDispatcher) ||
122 (function.kind() == RawFunction::kInvokeFieldDispatcher)));
121 } 123 }
122 124
123 125
124 void DartCompilationPipeline::ParseFunction(ParsedFunction* parsed_function) { 126 void DartCompilationPipeline::ParseFunction(ParsedFunction* parsed_function) {
125 if (!UseKernelFrontEndFor(parsed_function)) { 127 if (!UseKernelFrontEndFor(parsed_function)) {
126 Parser::ParseFunction(parsed_function); 128 Parser::ParseFunction(parsed_function);
127 parsed_function->AllocateVariables(); 129 parsed_function->AllocateVariables();
128 } 130 }
129 } 131 }
130 132
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 2334
2333 2335
2334 bool BackgroundCompiler::IsDisabled() { 2336 bool BackgroundCompiler::IsDisabled() {
2335 UNREACHABLE(); 2337 UNREACHABLE();
2336 return true; 2338 return true;
2337 } 2339 }
2338 2340
2339 #endif // DART_PRECOMPILED_RUNTIME 2341 #endif // DART_PRECOMPILED_RUNTIME
2340 2342
2341 } // namespace dart 2343 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698