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

Unified Diff: runtime/vm/compiler.cc

Issue 2589733002: Setup local var descriptors in kernel mode. (Closed)
Patch Set: Created 4 years 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 | « no previous file | runtime/vm/kernel_to_il.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 8f06434fe7ec1c4f97cf93c7cd5638996af4a081..41a32c583bdae2baadbf7c30bac8af5d89a9121a 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1595,8 +1595,12 @@ void Compiler::ComputeLocalVarDescriptors(const Code& code) {
// if state changed while compiling in background.
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
- Parser::ParseFunction(parsed_function);
- parsed_function->AllocateVariables();
+ if (function.kernel_function() == NULL) {
+ Parser::ParseFunction(parsed_function);
+ parsed_function->AllocateVariables();
+ } else {
+ parsed_function->EnsureKernelScopes();
+ }
const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle(
parsed_function->node_sequence()->scope()->GetVarDescriptors(function));
ASSERT(!var_descs.IsNull());
« no previous file with comments | « no previous file | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698