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

Unified Diff: runtime/vm/snapshot_test.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.dart
diff --git a/runtime/vm/snapshot_test.dart b/runtime/vm/snapshot_test.dart
index b42d7719ade500ccb5d11b6ceab0008fad4485ec..b0bdc88d20d26e62899f5980f90d46e485408f88 100644
--- a/runtime/vm/snapshot_test.dart
+++ b/runtime/vm/snapshot_test.dart
@@ -104,7 +104,7 @@ class TowersDisk {
class Towers {
List<TowersDisk> piles;
int movesDone;
- Towers(int disks)
+ Towers(int disks)
: piles = new List<TowersDisk>.fixedLength(3), movesDone = 0 {
build(0, disks);
}
@@ -829,7 +829,7 @@ class ObjectString extends BenchmarkBase {
text += text;
CharAtBenchmark.test(text, ITERATE3);
NumberBenchmark.test(text, ITERATE3);
- CharCodeAtBenchmark.test(text, ITERATE3);
+ CodeUnitAtBenchmark.test(text, ITERATE3);
IndexOfBenchmark.test(text, ITERATE3);
LastIndexOfBenchmark.test(text, ITERATE3);
SliceBenchmark.test(text, ITERATE4);
@@ -918,17 +918,17 @@ class NumberBenchmark {
}
-class CharCodeAtBenchmark {
- CharCodeAtBenchmark() {}
+class CodeUnitAtBenchmark {
+ CodeUnitAtBenchmark() {}
static String test(String input, var iterations) {
var str;
for (var j = 0; j < iterations; j++) {
- str = input.charCodeAt(0);
- str = input.charCodeAt(input.length - 1);
- str = input.charCodeAt(150); //set it to 15000
- str = input.charCodeAt(100); //set it to 10000
- str = input.charCodeAt(50); //set it to 5000
+ str = input.codeUnitAt(0);
+ str = input.codeUnitAt(input.length - 1);
+ str = input.codeUnitAt(150); //set it to 15000
+ str = input.codeUnitAt(100); //set it to 10000
+ str = input.codeUnitAt(50); //set it to 5000
}
return str;
}
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698