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

Side by Side Diff: tool/input_sdk/patch/core_patch.dart

Issue 1200233004: fixes #168, dart:js implementation with a test (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix error (window not defined) Created 5 years, 5 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 | « tool/input_sdk/patch/async_patch.dart ('k') | tool/input_sdk/private/foreign_helper.dart » ('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 // Patch file for dart:core classes. 5 // Patch file for dart:core classes.
6 import "dart:_internal" as _symbol_dev; 6 import "dart:_internal" as _symbol_dev;
7 import 'dart:_interceptors'; 7 import 'dart:_interceptors';
8 import 'dart:_js_helper' show patch, 8 import 'dart:_js_helper' show patch,
9 checkInt, 9 checkInt,
10 getRuntimeType, 10 getRuntimeType,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static Map<String, dynamic> _toMangledNames( 59 static Map<String, dynamic> _toMangledNames(
60 Map<Symbol, dynamic> namedArguments) { 60 Map<Symbol, dynamic> namedArguments) {
61 Map<String, dynamic> result = {}; 61 Map<String, dynamic> result = {};
62 namedArguments.forEach((symbol, value) { 62 namedArguments.forEach((symbol, value) {
63 result[_symbolToString(symbol)] = value; 63 result[_symbolToString(symbol)] = value;
64 }); 64 });
65 return result; 65 return result;
66 } 66 }
67 } 67 }
68 68
69 // TODO(jmesserly): switch to WeakMap
69 // Patch for Expando implementation. 70 // Patch for Expando implementation.
70 @patch 71 @patch
71 class Expando<T> { 72 class Expando<T> {
72 @patch 73 @patch
73 Expando([String name]) : this.name = name; 74 Expando([String name]) : this.name = name;
74 75
75 @patch 76 @patch
76 T operator[](Object object) { 77 T operator[](Object object) {
77 var values = Primitives.getProperty(object, _EXPANDO_PROPERTY_NAME); 78 var values = Primitives.getProperty(object, _EXPANDO_PROPERTY_NAME);
78 return (values == null) ? null : Primitives.getProperty(values, _getKey()); 79 return (values == null) ? null : Primitives.getProperty(values, _getKey());
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 @patch 445 @patch
445 static bool get _isWindows => false; 446 static bool get _isWindows => false;
446 447
447 @patch 448 @patch
448 static Uri get base { 449 static Uri get base {
449 String uri = Primitives.currentUri(); 450 String uri = Primitives.currentUri();
450 if (uri != null) return Uri.parse(uri); 451 if (uri != null) return Uri.parse(uri);
451 throw new UnsupportedError("'Uri.base' is not supported"); 452 throw new UnsupportedError("'Uri.base' is not supported");
452 } 453 }
453 } 454 }
OLDNEW
« no previous file with comments | « tool/input_sdk/patch/async_patch.dart ('k') | tool/input_sdk/private/foreign_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698