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

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

Issue 14050010: New analyzer_experimental snapshot. (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 18 matching lines...) Expand all
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 } 36 }
37 37
38 /** 38 /**
39 * Wrapper around [Function] which should be called with [target] and [arguments ]. 39 * Wrapper around [Function] which should be called with "target" and "arguments ".
40 */ 40 */
41 class MethodTrampoline { 41 class MethodTrampoline {
42 int parameterCount; 42 int parameterCount;
43 Function trampoline; 43 Function trampoline;
44 MethodTrampoline(this.parameterCount, this.trampoline); 44 MethodTrampoline(this.parameterCount, this.trampoline);
45 Object invoke(target, List arguments) { 45 Object invoke(target, List arguments) {
46 if (arguments.length != parameterCount) { 46 if (arguments.length != parameterCount) {
47 throw new IllegalArgumentException("${arguments.length} != $parameterCount "); 47 throw new IllegalArgumentException("${arguments.length} != $parameterCount ");
48 } 48 }
49 switch (parameterCount) { 49 switch (parameterCount) {
50 case 0: 50 case 0:
51 return trampoline(target); 51 return trampoline(target);
52 case 1: 52 case 1:
53 return trampoline(target, arguments[0]); 53 return trampoline(target, arguments[0]);
54 case 2: 54 case 2:
55 return trampoline(target, arguments[0], arguments[1]); 55 return trampoline(target, arguments[0], arguments[1]);
56 case 3: 56 case 3:
57 return trampoline(target, arguments[0], arguments[1], arguments[2]); 57 return trampoline(target, arguments[0], arguments[1], arguments[2]);
58 case 4: 58 case 4:
59 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 59 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
60 default: 60 default:
61 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 61 throw new IllegalArgumentException("Not implemented for > 4 arguments");
62 } 62 }
63 } 63 }
64 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698