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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2774623004: Fix for dcall on callable class (Closed)
Patch Set: Created 3 years, 9 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 | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | tests/language_strong/callable_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// This library defines runtime operations on objects used by the code 5 /// This library defines runtime operations on objects used by the code
6 /// generator. 6 /// generator.
7 part of dart._runtime; 7 part of dart._runtime;
8 8
9 class InvocationImpl extends Invocation { 9 class InvocationImpl extends Invocation {
10 final Symbol memberName; 10 final Symbol memberName;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 function callNSM() { 236 function callNSM() {
237 return $noSuchMethod(originalTarget, new $InvocationImpl( 237 return $noSuchMethod(originalTarget, new $InvocationImpl(
238 $name, $args, 238 $name, $args,
239 {namedArguments: $extractNamedArgs($args), isMethod: true})); 239 {namedArguments: $extractNamedArgs($args), isMethod: true}));
240 } 240 }
241 if (!($f instanceof Function)) { 241 if (!($f instanceof Function)) {
242 // We're not a function (and hence not a method either) 242 // We're not a function (and hence not a method either)
243 // Grab the `call` method if it's not a function. 243 // Grab the `call` method if it's not a function.
244 if ($f != null) { 244 if ($f != null) {
245 $ftype = $getMethodType($getType($f), 'call'); 245 $ftype = $getMethodType($getType($f), 'call');
246 $f = $f.call; 246 $f = f.call ? $bind($f, 'call') : void 0;
247 } 247 }
248 if (!($f instanceof Function)) { 248 if (!($f instanceof Function)) {
249 return callNSM(); 249 return callNSM();
250 } 250 }
251 } 251 }
252 // If f is a function, but not a method (no method type) 252 // If f is a function, but not a method (no method type)
253 // then it should have been a function valued field, so 253 // then it should have been a function valued field, so
254 // get the type from the function. 254 // get the type from the function.
255 if ($ftype === void 0) { 255 if ($ftype === void 0) {
256 $ftype = $_getRuntimeType($f); 256 $ftype = $_getRuntimeType($f);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 name = '+' + name; 975 name = '+' + name;
976 } 976 }
977 return name; 977 return name;
978 } 978 }
979 979
980 /// Emulates the implicit "loadLibrary" function provided by a deferred library. 980 /// Emulates the implicit "loadLibrary" function provided by a deferred library.
981 /// 981 ///
982 /// Libraries are not actually deferred in DDC, so this just returns a future 982 /// Libraries are not actually deferred in DDC, so this just returns a future
983 /// that completes immediately. 983 /// that completes immediately.
984 Future loadLibrary() => new Future.value(); 984 Future loadLibrary() => new Future.value();
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | tests/language_strong/callable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698