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

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

Issue 1355873003: Throw Error on unreachable code rather than a String. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_rti.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 for creating mock versions of platform and internal libraries. 5 // Library for creating mock versions of platform and internal libraries.
6 6
7 library mock_libraries; 7 library mock_libraries;
8 8
9 String buildLibrarySource( 9 String buildLibrarySource(
10 Map<String, String> elementMap, 10 Map<String, String> elementMap,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 import 'dart:_js_helper'; 103 import 'dart:_js_helper';
104 import 'dart:_interceptors'; 104 import 'dart:_interceptors';
105 import 'dart:_isolate_helper'; 105 import 'dart:_isolate_helper';
106 import 'dart:async'; 106 import 'dart:async';
107 '''; 107 ''';
108 108
109 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{ 109 const Map<String, String> DEFAULT_JS_HELPER_LIBRARY = const <String, String>{
110 'assertTest': 'assertTest(a) {}', 110 'assertTest': 'assertTest(a) {}',
111 'assertThrow': 'assertThrow(a) {}', 111 'assertThrow': 'assertThrow(a) {}',
112 'assertHelper': 'assertHelper(a) {}', 112 'assertHelper': 'assertHelper(a) {}',
113 'assertUnreachable': 'assertUnreachable() {}',
113 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}', 114 'assertIsSubtype': 'assertIsSubtype(subtype, supertype, message) {}',
114 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}', 115 'assertSubtype': 'assertSubtype(object, isField, checks, asField) {}',
115 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}', 116 'assertSubtypeOfRuntimeType': 'assertSubtypeOfRuntimeType(object, type) {}',
116 'asyncHelper': 'asyncHelper(object, asyncBody, completer) {}', 117 'asyncHelper': 'asyncHelper(object, asyncBody, completer) {}',
117 'boolConversionCheck': 'boolConversionCheck(x) {}', 118 'boolConversionCheck': 'boolConversionCheck(x) {}',
118 'boolTypeCast': 'boolTypeCast(value) {}', 119 'boolTypeCast': 'boolTypeCast(value) {}',
119 'boolTypeCheck': 'boolTypeCheck(value) {}', 120 'boolTypeCheck': 'boolTypeCheck(value) {}',
120 'checkSubtype': 'checkSubtype(object, isField, checks, asField) {}', 121 'checkSubtype': 'checkSubtype(object, isField, checks, asField) {}',
121 'checkSubtypeOfRuntimeType': 'checkSubtypeOfRuntimeType(o, t) {}', 122 'checkSubtypeOfRuntimeType': 'checkSubtypeOfRuntimeType(o, t) {}',
122 'BoundClosure': r'''abstract class BoundClosure extends Closure { 123 'BoundClosure': r'''abstract class BoundClosure extends Closure {
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 440
440 const LookupMap(this._entries, [this._nestedMaps = const []]) 441 const LookupMap(this._entries, [this._nestedMaps = const []])
441 : _key = null, _value = null; 442 : _key = null, _value = null;
442 443
443 const LookupMap.pair(this._key, this._value) 444 const LookupMap.pair(this._key, this._value)
444 : _entries = const [], _nestedMaps = const []; 445 : _entries = const [], _nestedMaps = const [];
445 V operator[](K k) => null; 446 V operator[](K k) => null;
446 }''', 447 }''',
447 '_version': 'const _version = "0.0.1+1";', 448 '_version': 'const _version = "0.0.1+1";',
448 }; 449 };
OLDNEW
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/js_rti.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698