Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 1420273011: Side effect characterization of String.fromCharCode (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 2490448ff809e2ea8ac1f62bb8a50d24fa63d478..20ac448df5fd9988f1c7e5cc0d168ee7e502a7ee 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -1017,13 +1017,15 @@ class Primitives {
static String stringFromCharCode(charCode) {
if (0 <= charCode) {
if (charCode <= 0xffff) {
- return JS('String', 'String.fromCharCode(#)', charCode);
+ return JS('returns:String;effects:none;depends:none',
+ 'String.fromCharCode(#)', charCode);
}
if (charCode <= 0x10ffff) {
var bits = charCode - 0x10000;
var low = 0xDC00 | (bits & 0x3ff);
var high = 0xD800 | (bits >> 10);
- return JS('String', 'String.fromCharCode(#, #)', high, low);
+ return JS('returns:String;effects:none;depends:none',
+ 'String.fromCharCode(#, #)', high, low);
}
}
throw new RangeError.range(charCode, 0, 0x10ffff);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698