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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2994353002: Fix the locals lookup of variables and partial implementation of boxing of variables.
Patch Set: Created 3 years, 4 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/env.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/codegen.dart' show CodegenRegistry; 9 import '../common/codegen.dart' show CodegenRegistry;
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 2212
2213 @override 2213 @override
2214 void visitVariableGet(ir.VariableGet variableGet) { 2214 void visitVariableGet(ir.VariableGet variableGet) {
2215 ir.VariableDeclaration variable = variableGet.variable; 2215 ir.VariableDeclaration variable = variableGet.variable;
2216 HInstruction letBinding = letBindings[variable]; 2216 HInstruction letBinding = letBindings[variable];
2217 if (letBinding != null) { 2217 if (letBinding != null) {
2218 stack.add(letBinding); 2218 stack.add(letBinding);
2219 return; 2219 return;
2220 } 2220 }
2221 2221
2222 Local local = localsMap.getLocalVariable(variableGet.variable); 2222 Local local = localsMap.getLocalVariable(variableGet.variable,
2223 isClosureCallMethod:
2224 _elementMap.getMemberDefinition(targetElement).kind ==
2225 MemberKind.closureCall);
2223 stack.add(localsHandler.readLocal(local)); 2226 stack.add(localsHandler.readLocal(local));
2224 } 2227 }
2225 2228
2226 @override 2229 @override
2227 void visitPropertySet(ir.PropertySet propertySet) { 2230 void visitPropertySet(ir.PropertySet propertySet) {
2228 propertySet.receiver.accept(this); 2231 propertySet.receiver.accept(this);
2229 HInstruction receiver = pop(); 2232 HInstruction receiver = pop();
2230 propertySet.value.accept(this); 2233 propertySet.value.accept(this);
2231 HInstruction value = pop(); 2234 HInstruction value = pop();
2232 2235
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
3663 enterBlock.setBlockFlow( 3666 enterBlock.setBlockFlow(
3664 new HTryBlockInformation( 3667 new HTryBlockInformation(
3665 kernelBuilder.wrapStatementGraph(bodyGraph), 3668 kernelBuilder.wrapStatementGraph(bodyGraph),
3666 exception, 3669 exception,
3667 kernelBuilder.wrapStatementGraph(catchGraph), 3670 kernelBuilder.wrapStatementGraph(catchGraph),
3668 kernelBuilder.wrapStatementGraph(finallyGraph)), 3671 kernelBuilder.wrapStatementGraph(finallyGraph)),
3669 exitBlock); 3672 exitBlock);
3670 kernelBuilder.inTryStatement = previouslyInTryStatement; 3673 kernelBuilder.inTryStatement = previouslyInTryStatement;
3671 } 3674 }
3672 } 3675 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/env.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698