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

Side by Side Diff: sdk/lib/js/dartium/js_dartium.dart

Issue 2833073002: Stoppp using trippple consonants (Closed)
Patch Set: More spolling Created 3 years, 8 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/compiler/dart2js/type_equals_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 5 /**
6 * Support for interoperating with JavaScript. 6 * Support for interoperating with JavaScript.
7 * 7 *
8 * This library provides access to JavaScript objects from Dart, allowing 8 * This library provides access to JavaScript objects from Dart, allowing
9 * Dart code to get and set properties, and call methods of JavaScript objects 9 * Dart code to get and set properties, and call methods of JavaScript objects
10 * and invoke JavaScript functions. The library takes care of converting 10 * and invoke JavaScript functions. The library takes care of converting
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 if (!_checkType(invocation.positionalArguments[i], parameters[i].type)) 299 if (!_checkType(invocation.positionalArguments[i], parameters[i].type))
300 return false; 300 return false;
301 } 301 }
302 if (invocation.namedArguments.isNotEmpty) { 302 if (invocation.namedArguments.isNotEmpty) {
303 var startNamed; 303 var startNamed;
304 for (startNamed = parameters.length - 1; startNamed >= 0; startNamed--) { 304 for (startNamed = parameters.length - 1; startNamed >= 0; startNamed--) {
305 if (!parameters[startNamed].isNamed) break; 305 if (!parameters[startNamed].isNamed) break;
306 } 306 }
307 startNamed++; 307 startNamed++;
308 308
309 // TODO(jacobr): we are unneccessarily using an O(n^2) algorithm here. 309 // TODO(jacobr): we are unnecessarily using an O(n^2) algorithm here.
310 // If we have JS APIs with a lange number of named parameters we should 310 // If we have JS APIs with a lange number of named parameters we should
311 // optimize this. Either use a HashSet or invert this, walking over 311 // optimize this. Either use a HashSet or invert this, walking over
312 // parameters, querying invocation, and making sure we match 312 // parameters, querying invocation, and making sure we match
313 //invocation.namedArguments.size keys. 313 //invocation.namedArguments.size keys.
314 for (var name in invocation.namedArguments.keys) { 314 for (var name in invocation.namedArguments.keys) {
315 bool match = false; 315 bool match = false;
316 for (var j = startNamed; j < parameters.length; j++) { 316 for (var j = startNamed; j < parameters.length; j++) {
317 var p = parameters[j]; 317 var p = parameters[j];
318 if (p.simpleName == name) { 318 if (p.simpleName == name) {
319 if (!_checkType( 319 if (!_checkType(
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 } else { 1694 } else {
1695 var ret = _interopCaptureThisExpando[f]; 1695 var ret = _interopCaptureThisExpando[f];
1696 if (ret == null) { 1696 if (ret == null) {
1697 // TODO(jacobr): we could optimize this. 1697 // TODO(jacobr): we could optimize this.
1698 ret = JSFunction._createWithThis(f); 1698 ret = JSFunction._createWithThis(f);
1699 _interopCaptureThisExpando[f] = ret; 1699 _interopCaptureThisExpando[f] = ret;
1700 } 1700 }
1701 return ret; 1701 return ret;
1702 } 1702 }
1703 } 1703 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/compiler/dart2js/type_equals_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698