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

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

Issue 1962823002: fix #552, Object members on native types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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
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 26 matching lines...) Expand all
37 @patch 37 @patch
38 dynamic noSuchMethod(Invocation invocation) { 38 dynamic noSuchMethod(Invocation invocation) {
39 throw new NoSuchMethodError( 39 throw new NoSuchMethodError(
40 this, 40 this,
41 invocation.memberName, 41 invocation.memberName,
42 invocation.positionalArguments, 42 invocation.positionalArguments,
43 invocation.namedArguments); 43 invocation.namedArguments);
44 } 44 }
45 45
46 @patch 46 @patch
47 Type get runtimeType => JS('Type', 'dart.objectRuntimeType(#)', this); 47 Type get runtimeType =>
48 JS('Type', 'dart.wrapType(dart.getReifiedType(#))', this);
48 } 49 }
49 50
50 // Patch for Function implementation. 51 // Patch for Function implementation.
51 @patch 52 @patch
52 class Function { 53 class Function {
53 @patch 54 @patch
54 static apply(Function f, 55 static apply(Function f,
55 List positionalArguments, 56 List positionalArguments,
56 [Map<Symbol, dynamic> namedArguments]) { 57 [Map<Symbol, dynamic> namedArguments]) {
57 // TODO(vsm): Handle named args. 58 // TODO(vsm): Handle named args.
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 return getTraceFromException(error); 570 return getTraceFromException(error);
570 } 571 }
571 // Fallback if Error.captureStackTrace does not exist. 572 // Fallback if Error.captureStackTrace does not exist.
572 try { 573 try {
573 throw ''; 574 throw '';
574 } catch (_, stackTrace) { 575 } catch (_, stackTrace) {
575 return stackTrace; 576 return stackTrace;
576 } 577 }
577 } 578 }
578 } 579 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698