| Index: runtime/vm/compiler.cc
|
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
|
| index 36b94b24dcea3580ae847f90bc52726fe579f77b..0c9f579f16ee870f83d85d68c966917f5ea0804e 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,10 +135,9 @@ 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, NULL,
|
| - osr_id);
|
| + kernel::FlowGraphBuilder builder(
|
| + parsed_function->function().kernel_offset(), parsed_function,
|
| + ic_data_array, NULL, osr_id);
|
| FlowGraph* graph = builder.BuildGraph();
|
| ASSERT(graph != NULL);
|
| return graph;
|
| @@ -1588,7 +1587,7 @@ void Compiler::ComputeLocalVarDescriptors(const Code& code) {
|
| // if state changed while compiling in background.
|
| LongJumpScope jump;
|
| if (setjmp(*jump.Set()) == 0) {
|
| - if (function.kernel_function() == NULL) {
|
| + if (function.kernel_offset() <= 0) {
|
| Parser::ParseFunction(parsed_function);
|
| parsed_function->AllocateVariables();
|
| } else {
|
| @@ -1710,7 +1709,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);
|
|
|