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

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

Issue 813873008: dart2js: Store mapTypeToInterceptor in embedded global. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 // 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 class JSString extends Interceptor implements String, JSIndexable { 339 class JSString extends Interceptor implements String, JSIndexable {
340 var split; 340 var split;
341 var length; 341 var length;
342 operator[](index) {} 342 operator[](index) {}
343 toString() {} 343 toString() {}
344 operator+(other) => this; 344 operator+(other) => this;
345 codeUnitAt(index) => 42; 345 codeUnitAt(index) => 42;
346 }''', 346 }''',
347 'JSUInt31': 'class JSUInt31 extends JSUInt32 {}', 347 'JSUInt31': 'class JSUInt31 extends JSUInt32 {}',
348 'JSUInt32': 'class JSUInt32 extends JSPositiveInt {}', 348 'JSUInt32': 'class JSUInt32 extends JSPositiveInt {}',
349 'mapTypeToInterceptor': 'var mapTypeToInterceptor;',
350 'ObjectInterceptor': 'class ObjectInterceptor {}', 349 'ObjectInterceptor': 'class ObjectInterceptor {}',
351 'PlainJavaScriptObject': 'class PlainJavaScriptObject {}', 350 'PlainJavaScriptObject': 'class PlainJavaScriptObject {}',
352 'UnknownJavaScriptObject': 'class UnknownJavaScriptObject {}', 351 'UnknownJavaScriptObject': 'class UnknownJavaScriptObject {}',
353 }; 352 };
354 353
355 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY = 354 const Map<String, String> DEFAULT_ISOLATE_HELPER_LIBRARY =
356 const <String, String>{ 355 const <String, String>{
357 'startRootIsolate': 'void startRootIsolate(entry, args) {}', 356 'startRootIsolate': 'void startRootIsolate(entry, args) {}',
358 '_currentIsolate': 'var _currentIsolate;', 357 '_currentIsolate': 'var _currentIsolate;',
359 '_callInIsolate': 'var _callInIsolate;', 358 '_callInIsolate': 'var _callInIsolate;',
360 '_WorkerBase': 'class _WorkerBase {}', 359 '_WorkerBase': 'class _WorkerBase {}',
361 }; 360 };
362 361
363 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{ 362 const Map<String, String> DEFAULT_ASYNC_LIBRARY = const <String, String>{
364 'Future': 'class Future<T> {}', 363 'Future': 'class Future<T> {}',
365 'Stream': 'class Stream<T> {}', 364 'Stream': 'class Stream<T> {}',
366 }; 365 };
367 366
368 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{ 367 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{
369 'Comment': 'class Comment {}', 368 'Comment': 'class Comment {}',
370 'MirrorSystem': 'class MirrorSystem {}', 369 'MirrorSystem': 'class MirrorSystem {}',
371 'MirrorsUsed': 'class MirrorsUsed {}', 370 'MirrorsUsed': 'class MirrorsUsed {}',
372 }; 371 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698