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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart

Issue 219493003: Revert "Add support for closure calls through getters." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_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) 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 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 // TODO(ahe): Share these with js_helper.dart. 7 // TODO(ahe): Share these with js_helper.dart.
8 const FUNCTION_INDEX = 0; 8 const FUNCTION_INDEX = 0;
9 const NAME_INDEX = 1; 9 const NAME_INDEX = 1;
10 const CALL_NAME_INDEX = 2; 10 const CALL_NAME_INDEX = 2;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 var optionalParameterCount = optionalParameterInfo >> 1; 98 var optionalParameterCount = optionalParameterInfo >> 1;
99 var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1; 99 var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1;
100 var isIntercepted =''' // Break long line. 100 var isIntercepted =''' // Break long line.
101 ''' requiredParameterCount + optionalParameterCount != funcs[0].length; 101 ''' requiredParameterCount + optionalParameterCount != funcs[0].length;
102 var functionTypeIndex = ${readFunctionType("array", "2")}; 102 var functionTypeIndex = ${readFunctionType("array", "2")};
103 var unmangledNameIndex = $unmangledNameIndex; 103 var unmangledNameIndex = $unmangledNameIndex;
104 var isReflectable = array.length > unmangledNameIndex; 104 var isReflectable = array.length > unmangledNameIndex;
105 105
106 if (getterStubName) { 106 if (getterStubName) {
107 f = tearOff(funcs, array, isStatic, name, isIntercepted); 107 f = tearOff(funcs, array, isStatic, name, isIntercepted);
108 descriptor[name].\$getter = f;
109 ''' 108 '''
110 /* Used to create an isolate using spawnFunction.*/ 109 /* Used to create an isolate using spawnFunction.*/
111 ''' 110 '''
112 if (isStatic) init.globalFunctions[name] = f; 111 if (isStatic) init.globalFunctions[name] = f;
113 originalDescriptor[getterStubName] = descriptor[getterStubName] = f; 112 originalDescriptor[getterStubName] = descriptor[getterStubName] = f;
114 funcs.push(f); 113 funcs.push(f);
115 if (getterStubName) functions.push(getterStubName); 114 if (getterStubName) functions.push(getterStubName);
116 f.\$stubName = getterStubName; 115 f.\$stubName = getterStubName;
117 f.\$callName = null; 116 f.\$callName = null;
118 } 117 }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 (function() { 348 (function() {
350 var result = $array[$index]; 349 var result = $array[$index];
351 if ($check) { 350 if ($check) {
352 throw new Error( 351 throw new Error(
353 name + ": expected value of type \'$type\' at index " + ($index) + 352 name + ": expected value of type \'$type\' at index " + ($index) +
354 " but got " + (typeof result)); 353 " but got " + (typeof result));
355 } 354 }
356 return result; 355 return result;
357 })()'''; 356 })()''';
358 } 357 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698