| Index: lib/compiler/implementation/ssa/codegen.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/ssa/codegen.dart (revision 8652)
|
| +++ lib/compiler/implementation/ssa/codegen.dart (working copy)
|
| @@ -215,9 +215,6 @@
|
| equalsNullElement = interceptors.getEqualsNullInterceptor();
|
| boolifiedEqualsNullElement =
|
| interceptors.getBoolifiedVersionOf(equalsNullElement);
|
| - parameterNames.forEach((Element element, String name) {
|
| - declaredVariables.add(name);
|
| - });
|
| }
|
|
|
| abstract visitTypeGuard(HTypeGuard node);
|
| @@ -2468,7 +2465,13 @@
|
|
|
| class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
|
| SsaOptimizedCodeGenerator(backend, work, parameters, parameterNames)
|
| - : super(backend, work, parameters, parameterNames);
|
| + : super(backend, work, parameters, parameterNames) {
|
| + // Declare the parameter names only for the optimized version. The
|
| + // unoptimized version has different parameters.
|
| + parameterNames.forEach((Element element, String name) {
|
| + declaredVariables.add(name);
|
| + });
|
| + }
|
|
|
| int maxBailoutParameters;
|
|
|
| @@ -2700,6 +2703,9 @@
|
| // call site for non-complex bailout methods.
|
| newParameters.add('state');
|
|
|
| + // TODO(ngeoffray): We should declare the parameters in
|
| + // beginGraph, to avoid potentially redeclaring them with 'var'
|
| + // in the method body.
|
| if (!propagator.hasComplexTypeGuards) {
|
| propagator.firstTypeGuard.block.first = savedFirstInstruction;
|
| for (HInstruction input in propagator.firstTypeGuard.inputs) {
|
|
|