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

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

Issue 11339042: Revert "Change signature of noSuchMethod to take an InvocationMirror." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 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 library mock_compiler; 5 library mock_compiler;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 import '../../../lib/compiler/compiler.dart' as api; 9 import '../../../lib/compiler/compiler.dart' as api;
10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping; 10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping;
(...skipping 24 matching lines...) Expand all
35 guard$string(x) { return x; } 35 guard$string(x) { return x; }
36 guard$stringOrArray(x) { return x; } 36 guard$stringOrArray(x) { return x; }
37 index(a, index) {} 37 index(a, index) {}
38 indexSet(a, index, value) {} 38 indexSet(a, index, value) {}
39 makeLiteralMap(List keyValuePairs) {} 39 makeLiteralMap(List keyValuePairs) {}
40 setRuntimeTypeInfo(a, b) {} 40 setRuntimeTypeInfo(a, b) {}
41 getRuntimeTypeInfo(a) {} 41 getRuntimeTypeInfo(a) {}
42 stringTypeCheck(x) {} 42 stringTypeCheck(x) {}
43 boolConversionCheck(x) {} 43 boolConversionCheck(x) {}
44 abstract class JavaScriptIndexingBehavior {} 44 abstract class JavaScriptIndexingBehavior {}
45 class JSInvocationMirror {}
46 S() {} 45 S() {}
47 assertHelper(a){}'''; 46 assertHelper(a){}''';
48 47
49 const String DEFAULT_INTERCEPTORSLIB = r''' 48 const String DEFAULT_INTERCEPTORSLIB = r'''
50 add$1(receiver, value) {} 49 add$1(receiver, value) {}
51 get$length(receiver) {} 50 get$length(receiver) {}
52 filter(receiver, predicate) {} 51 filter(receiver, predicate) {}
53 removeLast(receiver) {} 52 removeLast(receiver) {}
54 iterator(receiver) {} 53 iterator(receiver) {}
55 next(receiver) {} 54 next(receiver) {}
(...skipping 30 matching lines...) Expand all
86 bool enableConcreteTypeInference: false}) 85 bool enableConcreteTypeInference: false})
87 : warnings = [], errors = [], 86 : warnings = [], errors = [],
88 sourceFiles = new Map<String, SourceFile>(), 87 sourceFiles = new Map<String, SourceFile>(),
89 super(enableTypeAssertions: enableTypeAssertions, 88 super(enableTypeAssertions: enableTypeAssertions,
90 enableMinification: enableMinification, 89 enableMinification: enableMinification,
91 enableConcreteTypeInference: enableConcreteTypeInference) { 90 enableConcreteTypeInference: enableConcreteTypeInference) {
92 coreLibrary = createLibrary("core", coreSource); 91 coreLibrary = createLibrary("core", coreSource);
93 // We need to set the assert method to avoid calls with a 'null' 92 // We need to set the assert method to avoid calls with a 'null'
94 // target being interpreted as a call to assert. 93 // target being interpreted as a call to assert.
95 jsHelperLibrary = createLibrary("helper", helperSource); 94 jsHelperLibrary = createLibrary("helper", helperSource);
96 importHelperLibrary(coreLibrary);
97 assertMethod = jsHelperLibrary.find(buildSourceString('assert')); 95 assertMethod = jsHelperLibrary.find(buildSourceString('assert'));
98 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); 96 interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
99 97
100 mainApp = mockLibrary(this, ""); 98 mainApp = mockLibrary(this, "");
101 initializeSpecialClasses(); 99 initializeSpecialClasses();
102 // We need to make sure the Object class is resolved. When registering a 100 // We need to make sure the Object class is resolved. When registering a
103 // dynamic invocation the ArgumentTypesRegistry eventually iterates over 101 // dynamic invocation the ArgumentTypesRegistry eventually iterates over
104 // the interfaces of the Object class which would be 'null' if the class 102 // the interfaces of the Object class which would be 'null' if the class
105 // wasn't resolved. 103 // wasn't resolved.
106 objectClass.ensureResolved(this); 104 objectClass.ensureResolved(this);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 operator []=(Node node, Element element) { 250 operator []=(Node node, Element element) {
253 map[node] = element; 251 map[node] = element;
254 } 252 }
255 253
256 operator [](Node node) => map[node]; 254 operator [](Node node) => map[node];
257 255
258 void remove(Node node) { 256 void remove(Node node) {
259 map.remove(node); 257 map.remove(node);
260 } 258 }
261 } 259 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dart_backend_test.dart ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698