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

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

Issue 2958833003: Allocate local variable holding type arguments in generic functions in Kernel. (Closed)
Patch Set: Created 3 years, 5 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/kernel_binary_flowgraph.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 "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.
119 return (function.kernel_offset() > 0) || 118 return (function.kernel_offset() > 0) ||
120 (!FLAG_reify_generic_functions && 119 (function.kind() == RawFunction::kNoSuchMethodDispatcher) ||
121 ((function.kind() == RawFunction::kNoSuchMethodDispatcher) || 120 (function.kind() == RawFunction::kInvokeFieldDispatcher);
122 (function.kind() == RawFunction::kInvokeFieldDispatcher)));
123 } 121 }
124 122
125 123
126 void DartCompilationPipeline::ParseFunction(ParsedFunction* parsed_function) { 124 void DartCompilationPipeline::ParseFunction(ParsedFunction* parsed_function) {
127 if (!UseKernelFrontEndFor(parsed_function)) { 125 if (!UseKernelFrontEndFor(parsed_function)) {
128 Parser::ParseFunction(parsed_function); 126 Parser::ParseFunction(parsed_function);
129 parsed_function->AllocateVariables(); 127 parsed_function->AllocateVariables();
130 } 128 }
131 } 129 }
132 130
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 2335
2338 2336
2339 bool BackgroundCompiler::IsDisabled() { 2337 bool BackgroundCompiler::IsDisabled() {
2340 UNREACHABLE(); 2338 UNREACHABLE();
2341 return true; 2339 return true;
2342 } 2340 }
2343 2341
2344 #endif // DART_PRECOMPILED_RUNTIME 2342 #endif // DART_PRECOMPILED_RUNTIME
2345 2343
2346 } // namespace dart 2344 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698