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

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

Issue 2901533002: [kernel] Stream everything. Replace .kernel_function with .kernel_offset (Closed)
Patch Set: Fixed assert issues; small refactorings. 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
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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 1211
1212 RawFunction* Precompiler::CompileStaticInitializer(const Field& field, 1212 RawFunction* Precompiler::CompileStaticInitializer(const Field& field,
1213 bool compute_type) { 1213 bool compute_type) {
1214 ASSERT(field.is_static()); 1214 ASSERT(field.is_static());
1215 Thread* thread = Thread::Current(); 1215 Thread* thread = Thread::Current();
1216 StackZone stack_zone(thread); 1216 StackZone stack_zone(thread);
1217 Zone* zone = stack_zone.GetZone(); 1217 Zone* zone = stack_zone.GetZone();
1218 1218
1219 ParsedFunction* parsed_function; 1219 ParsedFunction* parsed_function;
1220 // Check if this field is coming from the Kernel binary. 1220 // Check if this field is coming from the Kernel binary.
1221 if (field.kernel_field() != NULL) { 1221 if (field.kernel_offset() > 0) {
1222 parsed_function = kernel::ParseStaticFieldInitializer(zone, field); 1222 parsed_function = kernel::ParseStaticFieldInitializer(zone, field);
1223 } else { 1223 } else {
1224 parsed_function = Parser::ParseStaticFieldInitializer(field); 1224 parsed_function = Parser::ParseStaticFieldInitializer(field);
1225 parsed_function->AllocateVariables(); 1225 parsed_function->AllocateVariables();
1226 } 1226 }
1227 1227
1228 1228
1229 DartPrecompilationPipeline pipeline(zone); 1229 DartPrecompilationPipeline pipeline(zone);
1230 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL, 1230 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL,
1231 parsed_function, 1231 parsed_function,
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 3363
3364 ASSERT(FLAG_precompiled_mode); 3364 ASSERT(FLAG_precompiled_mode);
3365 const bool optimized = function.IsOptimizable(); // False for natives. 3365 const bool optimized = function.IsOptimizable(); // False for natives.
3366 DartPrecompilationPipeline pipeline(zone, field_type_map); 3366 DartPrecompilationPipeline pipeline(zone, field_type_map);
3367 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3367 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3368 } 3368 }
3369 3369
3370 #endif // DART_PRECOMPILER 3370 #endif // DART_PRECOMPILER
3371 3371
3372 } // namespace dart 3372 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698