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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 920763002: Install 'get call' on Closure class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | no next file » | 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 library _js_helper; 5 library _js_helper;
6 6
7 import 'dart:_js_embedded_names' show 7 import 'dart:_js_embedded_names' show
8 GET_TYPE_FROM_NAME, 8 GET_TYPE_FROM_NAME,
9 GET_ISOLATE_TAG, 9 GET_ISOLATE_TAG,
10 INTERCEPTED_NAMES, 10 INTERCEPTED_NAMES,
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 /** 1939 /**
1940 * Global counter to prevent reusing function code objects. 1940 * Global counter to prevent reusing function code objects.
1941 * 1941 *
1942 * V8 will share the underlying function code objects when the same string is 1942 * V8 will share the underlying function code objects when the same string is
1943 * passed to "new Function". Shared function code objects can lead to 1943 * passed to "new Function". Shared function code objects can lead to
1944 * sub-optimal performance due to polymorhism, and can be prevented by 1944 * sub-optimal performance due to polymorhism, and can be prevented by
1945 * ensuring the strings are different. 1945 * ensuring the strings are different.
1946 */ 1946 */
1947 static int functionCounter = 0; 1947 static int functionCounter = 0;
1948 1948
1949 Closure get call => this;
1950
1949 Closure(); 1951 Closure();
1950 1952
1951 /** 1953 /**
1952 * Creates a new closure class for use by implicit getters associated with a 1954 * Creates a new closure class for use by implicit getters associated with a
1953 * method. 1955 * method.
1954 * 1956 *
1955 * In other words, creates a tear-off closure. 1957 * In other words, creates a tear-off closure.
1956 * 1958 *
1957 * Called from [closureFromTearOff] as well as from reflection when tearing 1959 * Called from [closureFromTearOff] as well as from reflection when tearing
1958 * of a method via [:getField:]. 1960 * of a method via [:getField:].
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3720 // This is a function that will return a helper function that does the 3722 // This is a function that will return a helper function that does the
3721 // iteration of the sync*. 3723 // iteration of the sync*.
3722 // 3724 //
3723 // Each invocation should give a helper with fresh state. 3725 // Each invocation should give a helper with fresh state.
3724 final dynamic /* js function */ _outerHelper; 3726 final dynamic /* js function */ _outerHelper;
3725 3727
3726 SyncStarIterable(this._outerHelper); 3728 SyncStarIterable(this._outerHelper);
3727 3729
3728 Iterator get iterator => new SyncStarIterator(JS('', '#()', _outerHelper)); 3730 Iterator get iterator => new SyncStarIterator(JS('', '#()', _outerHelper));
3729 } 3731 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698