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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 12035079: Fix braino that lead to dead code that contained a typo. Also add a regression test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « tests/compiler/dart2js/interceptor_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library mock_compiler; 5 library mock_compiler;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 14 matching lines...) Expand all
25 25
26 class WarningMessage { 26 class WarningMessage {
27 Node node; 27 Node node;
28 Message message; 28 Message message;
29 WarningMessage(this.node, this.message); 29 WarningMessage(this.node, this.message);
30 30
31 toString() => message.toString(); 31 toString() => message.toString();
32 } 32 }
33 33
34 const String DEFAULT_HELPERLIB = r''' 34 const String DEFAULT_HELPERLIB = r'''
35 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {}
36 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {}
37 or() {} and() {} not() {} eqNull(a) {} eqq() {}
38 ltB() {} leB() {} eqB() {} gtB() {} geB() {} eqNullB(a) {}
39 $throw(x) { return x; } 35 $throw(x) { return x; }
40 iae(x) { throw x; } ioore(x) { throw x; } 36 iae(x) { throw x; } ioore(x) { throw x; }
41 guard$array(x) { return x; } 37 guard$array(x) { return x; }
42 guard$num(x) { return x; } 38 guard$num(x) { return x; }
43 guard$string(x) { return x; } 39 guard$string(x) { return x; }
44 guard$stringOrArray(x) { return x; } 40 guard$stringOrArray(x) { return x; }
45 index(a, index) {}
46 indexSet(a, index, value) {}
47 makeLiteralMap(List keyValuePairs) {} 41 makeLiteralMap(List keyValuePairs) {}
48 setRuntimeTypeInfo(a, b) {} 42 setRuntimeTypeInfo(a, b) {}
49 getRuntimeTypeInfo(a) {} 43 getRuntimeTypeInfo(a) {}
50 stringTypeCheck(x) {} 44 stringTypeCheck(x) {}
51 boolConversionCheck(x) {} 45 boolConversionCheck(x) {}
52 abstract class JavaScriptIndexingBehavior {} 46 abstract class JavaScriptIndexingBehavior {}
53 class JSInvocationMirror {} 47 class JSInvocationMirror {}
54 S() {} 48 S() {}
55 assertHelper(a){} 49 assertHelper(a){}
56 throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}'''; 50 throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}''';
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 95
102 const String DEFAULT_CORELIB = r''' 96 const String DEFAULT_CORELIB = r'''
103 print(var obj) {} 97 print(var obj) {}
104 abstract class num {} 98 abstract class num {}
105 abstract class int extends num { } 99 abstract class int extends num { }
106 abstract class double extends num { } 100 abstract class double extends num { }
107 class bool {} 101 class bool {}
108 class String {} 102 class String {}
109 class Object { 103 class Object {
110 operator ==(other) {} 104 operator ==(other) {}
105 String toString() {}
111 } 106 }
112 class Type {} 107 class Type {}
113 class Function {} 108 class Function {}
114 class List<E> {} 109 class List<E> {}
115 abstract class Map<K,V> {} 110 abstract class Map<K,V> {}
116 class Closure {} 111 class Closure {}
117 class Null {} 112 class Null {}
118 class Dynamic_ {} 113 class Dynamic_ {}
119 bool identical(Object a, Object b) {}'''; 114 bool identical(Object a, Object b) {}''';
120 115
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 operator []=(Node node, Element element) { 325 operator []=(Node node, Element element) {
331 map[node] = element; 326 map[node] = element;
332 } 327 }
333 328
334 operator [](Node node) => map[node]; 329 operator [](Node node) => map[node];
335 330
336 void remove(Node node) { 331 void remove(Node node) {
337 map.remove(node); 332 map.remove(node);
338 } 333 }
339 } 334 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/interceptor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698