Index: sdk/lib/_internal/js_runtime/lib/core_patch.dart |
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart |
index a9832709b21b2fe46243d8e73e18eb8874e2c62c..d55524211342d233eaaec77493a5b3ad8833a037 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart |
@@ -558,12 +558,12 @@ class Uri { |
((canonicalTable[byte >> 4] & (1 << (byte & 0x0f))) != 0)) { |
result.writeCharCode(byte); |
} else if (spaceToPlus && byte == _SPACE) { |
- result.writeCharCode(_PLUS); |
+ result.write('+'); |
} else { |
const String hexDigits = '0123456789ABCDEF'; |
- result.writeCharCode(_PERCENT); |
- result.writeCharCode(hexDigits.codeUnitAt(byte >> 4)); |
- result.writeCharCode(hexDigits.codeUnitAt(byte & 0x0f)); |
+ result.write('%'); |
+ result.write(hexDigits[(byte >> 4) & 0x0f]); |
+ result.write(hexDigits[byte & 0x0f]); |
Lasse Reichstein Nielsen
2015/11/05 21:48:26
I guess it's OK, but it's a sign that dart2js' Str
sra1
2015/11/06 01:55:10
It is really hard to get JavaScript performance wi
|
} |
} |
return result.toString(); |