| Index: pkg/compiler/lib/src/ssa/locals_handler.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart
|
| index 2aa766cda9e491236961fb64c0de7404a2a89c01..dc2babe5fc4c869bb6ea440a20e908623b0252a4 100644
|
| --- a/pkg/compiler/lib/src/ssa/locals_handler.dart
|
| +++ b/pkg/compiler/lib/src/ssa/locals_handler.dart
|
| @@ -14,7 +14,7 @@ import '../native/native.dart' as native;
|
| import '../tree/tree.dart' as ast;
|
| import '../types/types.dart';
|
| import '../world.dart' show ClosedWorld;
|
| -import 'builder.dart' show SyntheticLocal;
|
| +
|
| import 'graph_builder.dart';
|
| import 'nodes.dart';
|
| import 'types.dart';
|
| @@ -657,3 +657,20 @@ class LocalsHandler {
|
| /// accessed indirectly through [HLocalGet] and [HLocalSet].
|
| Map<Local, HLocalValue> activationVariables = <Local, HLocalValue>{};
|
| }
|
| +
|
| +/// A synthetic local variable only used with the SSA graph.
|
| +///
|
| +/// For instance used for holding return value of function or the exception of a
|
| +/// try-catch statement.
|
| +class SyntheticLocal extends Local {
|
| + final String name;
|
| + final ExecutableElement executableContext;
|
| +
|
| + // Avoid slow Object.hashCode.
|
| + final int hashCode = _nextHashCode = (_nextHashCode + 1).toUnsigned(30);
|
| + static int _nextHashCode = 0;
|
| +
|
| + SyntheticLocal(this.name, this.executableContext);
|
| +
|
| + toString() => 'SyntheticLocal($name)';
|
| +}
|
|
|