| Index: sdk/lib/_internal/compiler/implementation/js/printer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js/printer.dart b/sdk/lib/_internal/compiler/implementation/js/printer.dart
|
| index e29f7bb489290ded16df154daa433aab8f2e74b2..5bdbfd98b0c2ca90f35c197b7fbd5bee717579f5 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js/printer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js/printer.dart
|
| @@ -15,7 +15,6 @@ class Printer implements NodeVisitor {
|
| final Namer namer;
|
| bool pendingSemicolon = false;
|
| bool pendingSpace = false;
|
| - static final identifierRegexp = new RegExp(r'^[a-zA-Z_0-9$]');
|
|
|
| Printer(leg.Compiler compiler, { allowVariableMinification: true })
|
| : shouldCompressOutput = compiler.enableMinification,
|
| @@ -47,6 +46,7 @@ class Printer implements NodeVisitor {
|
|
|
| void out(String str) {
|
| if (str != "") {
|
| + const identifierRegexp = const RegExp(r'^[a-zA-Z_0-9$]');
|
| if (pendingSemicolon && (!shouldCompressOutput || str != "}")) {
|
| outBuffer.add(";");
|
| }
|
| @@ -1067,7 +1067,7 @@ class MinifyRenamer implements Namer {
|
| codes.add(charCodes.$0 + digit);
|
| newName = new String.fromCharCodes(codes);
|
| }
|
| - assert(new RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
|
| + assert(const RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
|
| maps.last[oldName] = newName;
|
| return newName;
|
| }
|
|
|