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

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

Issue 2982713003: Revert "Distinguish between actual closure scopes and non-closure scopes." (Closed)
Patch Set: Created 3 years, 5 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
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 localsHandler.updateLocal(parameter, argument); 598 localsHandler.updateLocal(parameter, argument);
599 } 599 }
600 600
601 constructor.function.positionalParameters.forEach(handleParameter); 601 constructor.function.positionalParameters.forEach(handleParameter);
602 constructor.function.namedParameters.toList() 602 constructor.function.namedParameters.toList()
603 ..sort(namedOrdering) 603 ..sort(namedOrdering)
604 ..forEach(handleParameter); 604 ..forEach(handleParameter);
605 605
606 // Set the locals handler state as if we were inlining the constructor. 606 // Set the locals handler state as if we were inlining the constructor.
607 ConstructorEntity element = _elementMap.getConstructor(constructor); 607 ConstructorEntity element = _elementMap.getConstructor(constructor);
608 ScopeInfo oldScopeInfo = localsHandler.scopeInfo; 608 ClosureRepresentationInfo oldScopeInfo = localsHandler.scopeInfo;
609 ScopeInfo newScopeInfo = closureDataLookup.getScopeInfo(element); 609 ClosureRepresentationInfo newScopeInfo =
610 closureDataLookup.getScopeInfo(element);
610 localsHandler.scopeInfo = newScopeInfo; 611 localsHandler.scopeInfo = newScopeInfo;
611 localsHandler.enterScope(closureDataLookup.getClosureScope(element)); 612 localsHandler.enterScope(closureDataLookup.getClosureScope(element));
612 inlinedFrom(element, () { 613 inlinedFrom(element, () {
613 _buildInitializers(constructor, constructorChain, fieldValues); 614 _buildInitializers(constructor, constructorChain, fieldValues);
614 }); 615 });
615 localsHandler.scopeInfo = oldScopeInfo; 616 localsHandler.scopeInfo = oldScopeInfo;
616 } 617 }
617 618
618 /// Builds generative constructor body. 619 /// Builds generative constructor body.
619 void buildConstructorBody(ir.Constructor constructor) { 620 void buildConstructorBody(ir.Constructor constructor) {
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 enterBlock.setBlockFlow( 3517 enterBlock.setBlockFlow(
3517 new HTryBlockInformation( 3518 new HTryBlockInformation(
3518 kernelBuilder.wrapStatementGraph(bodyGraph), 3519 kernelBuilder.wrapStatementGraph(bodyGraph),
3519 exception, 3520 exception,
3520 kernelBuilder.wrapStatementGraph(catchGraph), 3521 kernelBuilder.wrapStatementGraph(catchGraph),
3521 kernelBuilder.wrapStatementGraph(finallyGraph)), 3522 kernelBuilder.wrapStatementGraph(finallyGraph)),
3522 exitBlock); 3523 exitBlock);
3523 kernelBuilder.inTryStatement = previouslyInTryStatement; 3524 kernelBuilder.inTryStatement = previouslyInTryStatement;
3524 } 3525 }
3525 } 3526 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_model/closure_visitors.dart ('k') | tests/compiler/dart2js/closure/closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698