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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/test_support_include.dart

Issue 16059002: Manual fixes for Dart^2 analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 1
2 2
3 class TestSource implements Source { 3 class TestSource implements Source {
4 int get hashCode => 0; 4 int get hashCode => 0;
5 bool operator ==(Object object) { 5 bool operator ==(Object object) {
6 return object is TestSource; 6 return object is TestSource;
7 } 7 }
8 AnalysisContext get context { 8 AnalysisContext get context {
9 throw new UnsupportedOperationException(); 9 throw new UnsupportedOperationException();
10 } 10 }
(...skipping 15 matching lines...) Expand all
26 bool exists() => true; 26 bool exists() => true;
27 bool isInSystemLibrary() { 27 bool isInSystemLibrary() {
28 throw new UnsupportedOperationException(); 28 throw new UnsupportedOperationException();
29 } 29 }
30 Source resolve(String uri) { 30 Source resolve(String uri) {
31 throw new UnsupportedOperationException(); 31 throw new UnsupportedOperationException();
32 } 32 }
33 Source resolveRelative(Uri uri) { 33 Source resolveRelative(Uri uri) {
34 throw new UnsupportedOperationException(); 34 throw new UnsupportedOperationException();
35 } 35 }
36 UriKind get uriKind {
37 throw new UnsupportedOperationException();
38 }
36 } 39 }
37 40
38 /** 41 /**
39 * Wrapper around [Function] which should be called with "target" and "arguments ". 42 * Wrapper around [Function] which should be called with "target" and "arguments ".
40 */ 43 */
41 class MethodTrampoline { 44 class MethodTrampoline {
42 int parameterCount; 45 int parameterCount;
43 Function trampoline; 46 Function trampoline;
44 MethodTrampoline(this.parameterCount, this.trampoline); 47 MethodTrampoline(this.parameterCount, this.trampoline);
45 Object invoke(target, List arguments) { 48 Object invoke(target, List arguments) {
46 if (arguments.length != parameterCount) { 49 if (arguments.length != parameterCount) {
47 throw new IllegalArgumentException("${arguments.length} != $parameterCount "); 50 throw new IllegalArgumentException("${arguments.length} != $parameterCount ");
48 } 51 }
49 switch (parameterCount) { 52 switch (parameterCount) {
50 case 0: 53 case 0:
51 return trampoline(target); 54 return trampoline(target);
52 case 1: 55 case 1:
53 return trampoline(target, arguments[0]); 56 return trampoline(target, arguments[0]);
54 case 2: 57 case 2:
55 return trampoline(target, arguments[0], arguments[1]); 58 return trampoline(target, arguments[0], arguments[1]);
56 case 3: 59 case 3:
57 return trampoline(target, arguments[0], arguments[1], arguments[2]); 60 return trampoline(target, arguments[0], arguments[1], arguments[2]);
58 case 4: 61 case 4:
59 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 62 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
60 default: 63 default:
61 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 64 throw new IllegalArgumentException("Not implemented for > 4 arguments");
62 } 65 }
63 } 66 }
64 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698