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

Side by Side Diff: tests/utils/dummy_compiler_test.dart

Issue 14253008: Optimize length access on all JSIndexable things. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Smoke test of the dart2js compiler API. 5 // Smoke test of the dart2js compiler API.
6 library dummy_compiler; 6 library dummy_compiler;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:uri'; 9 import 'dart:uri';
10 10
(...skipping 25 matching lines...) Expand all
36 class LinkedHashMap {} 36 class LinkedHashMap {}
37 identical(a, b) => true; 37 identical(a, b) => true;
38 getRuntimeTypeInfo(o) {} 38 getRuntimeTypeInfo(o) {}
39 setRuntimeTypeInfo(o, i) {} 39 setRuntimeTypeInfo(o, i) {}
40 eqNull(a) {} 40 eqNull(a) {}
41 eqNullB(a) {}"""; 41 eqNullB(a) {}""";
42 } else if (uri.path.endsWith('_patch.dart')) { 42 } else if (uri.path.endsWith('_patch.dart')) {
43 source = ''; 43 source = '';
44 } else if (uri.path.endsWith('interceptors.dart')) { 44 } else if (uri.path.endsWith('interceptors.dart')) {
45 source = """class ObjectInterceptor {} 45 source = """class ObjectInterceptor {}
46 class JSIndexable {
47 get length;
48 }
46 class JSArray { 49 class JSArray {
47 var length;
48 var removeLast; 50 var removeLast;
49 var add; 51 var add;
50 } 52 }
51 class JSFixedArray {} 53 class JSFixedArray {}
52 class JSExtendableArray {} 54 class JSExtendableArray {}
53 class JSString { 55 class JSString {
54 var length;
55 var split; 56 var split;
56 var concat; 57 var concat;
57 var toString; 58 var toString;
58 } 59 }
59 class JSFunction {} 60 class JSFunction {}
60 class JSInt {} 61 class JSInt {}
61 class JSDouble {} 62 class JSDouble {}
62 class JSNumber {} 63 class JSNumber {}
63 class JSNull {} 64 class JSNull {}
64 class JSBool {} 65 class JSBool {}
(...skipping 30 matching lines...) Expand all
95 new Uri.fromComponents(scheme: 'package', path: '/'), 96 new Uri.fromComponents(scheme: 'package', path: '/'),
96 provider, handler); 97 provider, handler);
97 result.then((String code) { 98 result.then((String code) {
98 if (code == null) { 99 if (code == null) {
99 throw 'Compilation failed'; 100 throw 'Compilation failed';
100 } 101 }
101 }, onError: (e) { 102 }, onError: (e) {
102 throw 'Compilation failed'; 103 throw 'Compilation failed';
103 }); 104 });
104 } 105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698