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

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

Issue 2941483003: Revert "[kernel] Stream everything. Replace .kernel_function with .kernel_offset" (Closed)
Patch Set: 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/precompiler.h ('k') | runtime/vm/raw_object.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/precompiler.h" 5 #include "vm/precompiler.h"
6 6
7 #include "vm/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/branch_optimizer.h" 10 #include "vm/branch_optimizer.h"
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 1214
1215 RawFunction* Precompiler::CompileStaticInitializer(const Field& field, 1215 RawFunction* Precompiler::CompileStaticInitializer(const Field& field,
1216 bool compute_type) { 1216 bool compute_type) {
1217 ASSERT(field.is_static()); 1217 ASSERT(field.is_static());
1218 Thread* thread = Thread::Current(); 1218 Thread* thread = Thread::Current();
1219 StackZone stack_zone(thread); 1219 StackZone stack_zone(thread);
1220 Zone* zone = stack_zone.GetZone(); 1220 Zone* zone = stack_zone.GetZone();
1221 1221
1222 ParsedFunction* parsed_function; 1222 ParsedFunction* parsed_function;
1223 // Check if this field is coming from the Kernel binary. 1223 // Check if this field is coming from the Kernel binary.
1224 if (field.kernel_offset() > 0) { 1224 if (field.kernel_field() != NULL) {
1225 parsed_function = kernel::ParseStaticFieldInitializer(zone, field); 1225 parsed_function = kernel::ParseStaticFieldInitializer(zone, field);
1226 } else { 1226 } else {
1227 parsed_function = Parser::ParseStaticFieldInitializer(field); 1227 parsed_function = Parser::ParseStaticFieldInitializer(field);
1228 parsed_function->AllocateVariables(); 1228 parsed_function->AllocateVariables();
1229 } 1229 }
1230 1230
1231 1231
1232 DartPrecompilationPipeline pipeline(zone); 1232 DartPrecompilationPipeline pipeline(zone);
1233 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL, 1233 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL,
1234 parsed_function, 1234 parsed_function,
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 3364
3365 ASSERT(FLAG_precompiled_mode); 3365 ASSERT(FLAG_precompiled_mode);
3366 const bool optimized = function.IsOptimizable(); // False for natives. 3366 const bool optimized = function.IsOptimizable(); // False for natives.
3367 DartPrecompilationPipeline pipeline(zone, field_type_map); 3367 DartPrecompilationPipeline pipeline(zone, field_type_map);
3368 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3368 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3369 } 3369 }
3370 3370
3371 #endif // DART_PRECOMPILER 3371 #endif // DART_PRECOMPILER
3372 3372
3373 } // namespace dart 3373 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698