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

Unified Diff: runtime/vm/compiler.cc

Issue 2901533002: [kernel] Stream everything. Replace .kernel_function with .kernel_offset (Closed)
Patch Set: Fix for bad merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index a99d4ba3b5fe7c25fcbe7352bf2a10a47a2e2d5b..f5a702a4b622834bf5e2607a3194e15aef3ed489 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -115,7 +115,7 @@ DECLARE_FLAG(bool, trace_irregexp);
bool UseKernelFrontEndFor(ParsedFunction* parsed_function) {
const Function& function = parsed_function->function();
- return (function.kernel_function() != NULL) ||
+ return (function.kernel_offset() > 0) ||
(function.kind() == RawFunction::kNoSuchMethodDispatcher) ||
(function.kind() == RawFunction::kInvokeFieldDispatcher);
}
@@ -135,11 +135,11 @@ FlowGraph* DartCompilationPipeline::BuildFlowGraph(
const ZoneGrowableArray<const ICData*>& ic_data_array,
intptr_t osr_id) {
if (UseKernelFrontEndFor(parsed_function)) {
- kernel::TreeNode* node = static_cast<kernel::TreeNode*>(
- parsed_function->function().kernel_function());
- kernel::FlowGraphBuilder builder(node, parsed_function, ic_data_array,
- /* not building var desc */ NULL,
- /* not inlining */ NULL, osr_id);
+ kernel::FlowGraphBuilder builder(
+ parsed_function->function().kernel_offset(), parsed_function,
+ ic_data_array,
+ /* not building var desc */ NULL,
+ /* not inlining */ NULL, osr_id);
FlowGraph* graph = builder.BuildGraph();
ASSERT(graph != NULL);
return graph;
@@ -1606,10 +1606,9 @@ void Compiler::ComputeLocalVarDescriptors(const Code& code) {
builder.BuildGraph();
} else {
parsed_function->EnsureKernelScopes();
- kernel::TreeNode* node = static_cast<kernel::TreeNode*>(
- parsed_function->function().kernel_function());
kernel::FlowGraphBuilder builder(
- node, parsed_function, *ic_data_array, context_level_array,
+ parsed_function->function().kernel_offset(), parsed_function,
+ *ic_data_array, context_level_array,
/* not inlining */ NULL, Compiler::kNoOSRDeoptId);
builder.BuildGraph();
}
@@ -1732,7 +1731,7 @@ RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
// Create a one-time-use function to evaluate the initializer and invoke
// it immediately.
- if (field.kernel_field() != NULL) {
+ if (field.kernel_offset() > 0) {
parsed_function = kernel::ParseStaticFieldInitializer(zone, field);
} else {
parsed_function = Parser::ParseStaticFieldInitializer(field);
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698