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

Unified Diff: runtime/vm/compiler.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 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 3eb78742ff11ec2ccb6b1eaec6b79faa104e45c6..a99d4ba3b5fe7c25fcbe7352bf2a10a47a2e2d5b 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_offset() > 0) ||
+ return (function.kernel_function() != NULL) ||
(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::FlowGraphBuilder builder(
- parsed_function->function().kernel_offset(), parsed_function,
- ic_data_array,
- /* not building var desc */ NULL,
- /* not inlining */ NULL, osr_id);
+ 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);
FlowGraph* graph = builder.BuildGraph();
ASSERT(graph != NULL);
return graph;
@@ -1597,7 +1597,7 @@ void Compiler::ComputeLocalVarDescriptors(const Code& code) {
ZoneGrowableArray<intptr_t>* context_level_array =
new ZoneGrowableArray<intptr_t>();
- if (function.kernel_offset() <= 0) {
+ if (!UseKernelFrontEndFor(parsed_function)) {
Parser::ParseFunction(parsed_function);
parsed_function->AllocateVariables();
FlowGraphBuilder builder(
@@ -1606,9 +1606,10 @@ 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(
- parsed_function->function().kernel_offset(), parsed_function,
- *ic_data_array, context_level_array,
+ node, parsed_function, *ic_data_array, context_level_array,
/* not inlining */ NULL, Compiler::kNoOSRDeoptId);
builder.BuildGraph();
}
@@ -1731,7 +1732,7 @@ RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
// Create a one-time-use function to evaluate the initializer and invoke
// it immediately.
- if (field.kernel_offset() > 0) {
+ if (field.kernel_field() != NULL) {
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