| 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 class _ConsoleVariables { | 7 class _ConsoleVariables { |
| 8 Map<String, Object> _data = new Map<String, Object>(); | 8 Map<String, Object> _data = new Map<String, Object>(); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 /** | 380 /** |
| 381 * Removes the trailing dot from an expression ending in a dot. | 381 * Removes the trailing dot from an expression ending in a dot. |
| 382 * This method is used as Library prefixes include a trailing dot when using | 382 * This method is used as Library prefixes include a trailing dot when using |
| 383 * the C Dart debugger API. | 383 * the C Dart debugger API. |
| 384 */ | 384 */ |
| 385 static String stripTrailingDot(String str) => | 385 static String stripTrailingDot(String str) => |
| 386 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length -
1) : str; | 386 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length -
1) : str; |
| 387 | 387 |
| 388 static String addTrailingDot(String str) => '${str}.'; | 388 static String addTrailingDot(String str) => '${str}.'; |
| 389 | 389 |
| 390 static String demangle(String str) { |
| 391 var atPos = str.indexOf('@'); |
| 392 return atPos == -1 ? str : str.substring(0, atPos); |
| 393 } |
| 394 |
| 390 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; | 395 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; |
| 391 | 396 |
| 392 static bool _isBuiltinType(ClassMirror cls) { | 397 static bool _isBuiltinType(ClassMirror cls) { |
| 393 // TODO(vsm): Find a less hackish way to do this. | 398 // TODO(vsm): Find a less hackish way to do this. |
| 394 LibraryMirror lib = cls.owner; | 399 LibraryMirror lib = cls.owner; |
| 395 String libName = lib.uri.toString(); | 400 String libName = lib.uri.toString(); |
| 396 return libName.startsWith('dart:'); | 401 return libName.startsWith('dart:'); |
| 397 } | 402 } |
| 398 | 403 |
| 399 static void register(Document document, String tag, Type type, | 404 static void register(Document document, String tag, Type type, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 _scheduleImmediateHelper._schedule(callback); | 609 _scheduleImmediateHelper._schedule(callback); |
| 605 }; | 610 }; |
| 606 | 611 |
| 607 get _pureIsolateScheduleImmediateClosure => ((void callback()) => | 612 get _pureIsolateScheduleImmediateClosure => ((void callback()) => |
| 608 throw new UnimplementedError("scheduleMicrotask in background isolates " | 613 throw new UnimplementedError("scheduleMicrotask in background isolates " |
| 609 "are not supported in the browser")); | 614 "are not supported in the browser")); |
| 610 | 615 |
| 611 void _initializeCustomElement(Element e) { | 616 void _initializeCustomElement(Element e) { |
| 612 _Utils.initializeCustomElement(e); | 617 _Utils.initializeCustomElement(e); |
| 613 } | 618 } |
| OLD | NEW |