| Index: sdk/lib/_internal/compiler/implementation/lib/string_helper.dart | 
| diff --git a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart | 
| index 974902831e51dffbe396216b003b5f9992c0069c..8f3c2fe2f9da083f12b06702db6cefb307670dde 100644 | 
| --- a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart | 
| +++ b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart | 
| @@ -145,10 +145,10 @@ stringReplaceAllEmptyFuncUnchecked(receiver, onMatch, onNonMatch) { | 
| while (i < length) { | 
| buffer.add(onMatch(new StringMatch(i, receiver, ""))); | 
| // Special case to avoid splitting a surrogate pair. | 
| -    int code = receiver.charCodeAt(i); | 
| +    int code = receiver.codeUnitAt(i); | 
| if ((code & ~0x3FF) == 0xD800 && length > i + 1) { | 
| // Leading surrogate; | 
| -      code = receiver.charCodeAt(i + 1); | 
| +      code = receiver.codeUnitAt(i + 1); | 
| if ((code & ~0x3FF) == 0xDC00) { | 
| // Matching trailing surrogate. | 
| buffer.add(onNonMatch(receiver.substring(i, i + 2))); | 
|  |