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

Side by Side Diff: dart/frog/tests/leg/src/mock_compiler.dart

Issue 9355031: Improve List implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and resolved conflicts Created 8 years, 10 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 | « dart/frog/leg/ssa/nodes.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | 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("../../../../lib/uri/uri.dart"); 7 #import("../../../../lib/uri/uri.dart");
8 8
9 #import("../../../leg/leg.dart"); 9 #import("../../../leg/leg.dart");
10 #import("../../../leg/elements/elements.dart"); 10 #import("../../../leg/elements/elements.dart");
11 #import("../../../leg/tree/tree.dart"); 11 #import("../../../leg/tree/tree.dart");
12 #import("../../../leg/util/util.dart"); 12 #import("../../../leg/util/util.dart");
13 #import("parser_helper.dart"); 13 #import("parser_helper.dart");
14 14
15 class WarningMessage { 15 class WarningMessage {
16 Node node; 16 Node node;
17 Message message; 17 Message message;
18 WarningMessage(this.node, this.message); 18 WarningMessage(this.node, this.message);
19 19
20 toString() => message.toString(); 20 toString() => message.toString();
21 } 21 }
22 22
23 final String DEFAULT_HELPERLIB = @''' 23 final String DEFAULT_HELPERLIB = @'''
24 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {} 24 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {}
25 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {} 25 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {}
26 or() {} and() {} not() {} eqNull(a) {} eqq() {} 26 or() {} and() {} not() {} eqNull(a) {} eqq() {}
27 iae(x) {throw x;} ioore(x) {throw x;}
27 guard$array(x) { return x; } 28 guard$array(x) { return x; }
28 guard$num(x) { return x; } 29 guard$num(x) { return x; }
29 guard$string(x) { return x; } 30 guard$string(x) { return x; }
30 guard$stringOrArray(x) { return x; } 31 guard$stringOrArray(x) { return x; }
31 builtin$add$1(receiver, value) {} 32 builtin$add$1(receiver, value) {}
32 builtin$get$length(var receiver) {} 33 builtin$get$length(var receiver) {}
33 builtin$filter$1(receiver, predicate) {} 34 builtin$filter$1(receiver, predicate) {}
34 builtin$removeLast$0(receiver) {} 35 builtin$removeLast$0(receiver) {}
35 index(a, index) {} 36 index(a, index) {}
36 indexSet(a, index, value) {}'''; 37 indexSet(a, index, value) {}''';
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }); 155 });
155 } 156 }
156 } 157 }
157 158
158 LibraryElement mockLibrary(Compiler compiler, String source) { 159 LibraryElement mockLibrary(Compiler compiler, String source) {
159 Uri uri = new Uri(scheme: "source"); 160 Uri uri = new Uri(scheme: "source");
160 var library = new LibraryElement(new Script(uri, new MockFile(source))); 161 var library = new LibraryElement(new Script(uri, new MockFile(source)));
161 importLibrary(library, compiler.coreLibrary, compiler); 162 importLibrary(library, compiler.coreLibrary, compiler);
162 return library; 163 return library;
163 } 164 }
OLDNEW
« no previous file with comments | « dart/frog/leg/ssa/nodes.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698