| OLD | NEW |
| 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/implementation/elements/elements.dart"); | 9 #import("../../../lib/compiler/implementation/elements/elements.dart"); |
| 10 #import("../../../lib/compiler/implementation/leg.dart"); | 10 #import("../../../lib/compiler/implementation/leg.dart"); |
| 11 #import("../../../lib/compiler/implementation/tree/tree.dart"); | 11 #import("../../../lib/compiler/implementation/tree/tree.dart"); |
| 12 #import("../../../lib/compiler/implementation/util/util.dart"); | 12 #import("../../../lib/compiler/implementation/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 ltB() {} leB() {} eqB() {} gtB() {} geB() {} eqNullB(a) {} | 27 ltB() {} leB() {} eqB() {} gtB() {} geB() {} eqNullB(a) {} |
| 28 iae(x) {throw x;} ioore(x) {throw x;} | 28 captureStackTrace(x) { return x; } |
| 29 iae(x) { throw x; } ioore(x) { throw x; } |
| 29 guard$array(x) { return x; } | 30 guard$array(x) { return x; } |
| 30 guard$num(x) { return x; } | 31 guard$num(x) { return x; } |
| 31 guard$string(x) { return x; } | 32 guard$string(x) { return x; } |
| 32 guard$stringOrArray(x) { return x; } | 33 guard$stringOrArray(x) { return x; } |
| 33 index(a, index) {} | 34 index(a, index) {} |
| 34 indexSet(a, index, value) {} | 35 indexSet(a, index, value) {} |
| 35 setRuntimeTypeInfo(a, b) {} | 36 setRuntimeTypeInfo(a, b) {} |
| 36 getRuntimeTypeInfo(a) {} | 37 getRuntimeTypeInfo(a) {} |
| 37 interface JavaScriptIndexingBehavior {} | 38 interface JavaScriptIndexingBehavior {} |
| 38 S() {}'''; | 39 S() {}'''; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 importLibrary(library, compiler.coreLibrary, compiler); | 200 importLibrary(library, compiler.coreLibrary, compiler); |
| 200 return library; | 201 return library; |
| 201 } | 202 } |
| 202 | 203 |
| 203 class StringScript extends Script { | 204 class StringScript extends Script { |
| 204 final String code; | 205 final String code; |
| 205 StringScript(this.code) : super(null, null); | 206 StringScript(this.code) : super(null, null); |
| 206 String get text() => code; | 207 String get text() => code; |
| 207 String get name() => "mock script"; | 208 String get name() => "mock script"; |
| 208 } | 209 } |
| OLD | NEW |