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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_string.dart

Issue 1079253002: Use native behavior for dead code elimination (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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
Index: sdk/lib/_internal/compiler/js_lib/js_string.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_string.dart b/sdk/lib/_internal/compiler/js_lib/js_string.dart
index 84e0ac09eea16c9a0e32f7148908c963f3fd89e6..43f938024dd675592a0c8d7098320acc7447f371 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_string.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_string.dart
@@ -159,11 +159,15 @@ class JSString extends Interceptor implements String, JSIndexable {
}
String toLowerCase() {
- return JS('String', r'#.toLowerCase()', this);
+ return JS(
+ 'returns:String;effects:none;depends:none;throws:null(1)',
+ r'#.toLowerCase()', this);
}
String toUpperCase() {
- return JS('String', r'#.toUpperCase()', this);
+ return JS(
+ 'returns:String;effects:none;depends:none;throws:null(1)',
+ r'#.toUpperCase()', this);
}
// Characters with Whitespace property (Unicode 6.2).
@@ -434,7 +438,7 @@ class JSString extends Interceptor implements String, JSIndexable {
int compareTo(String other) {
if (other is !String) throw new ArgumentError(other);
return this == other ? 0
- : JS('bool', r'# < #', this, other) ? -1 : 1;
+ : JS('bool', r'# < #', this, other) ? -1 : 1;
}
// Note: if you change this, also change the function [S].

Powered by Google App Engine
This is Rietveld 408576698