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

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

Issue 228023004: 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; 108 f.getterStub = true;
109 f.\$getterStub = true;
110 ''' 109 '''
111 /* Used to create an isolate using spawnFunction.*/ 110 /* Used to create an isolate using spawnFunction.*/
112 ''' 111 '''
113 if (isStatic) init.globalFunctions[name] = f; 112 if (isStatic) init.globalFunctions[name] = f;
114 originalDescriptor[getterStubName] = descriptor[getterStubName] = f; 113 originalDescriptor[getterStubName] = descriptor[getterStubName] = f;
115 funcs.push(f); 114 funcs.push(f);
116 if (getterStubName) functions.push(getterStubName); 115 if (getterStubName) functions.push(getterStubName);
117 f.\$stubName = getterStubName; 116 f.\$stubName = getterStubName;
118 f.\$callName = null; 117 f.\$callName = null;
119 if (isIntercepted) init.interceptedNames[getterStubName] = true; 118 if (isIntercepted) init.interceptedNames[getterStubName] = true;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 (function() { 351 (function() {
353 var result = $array[$index]; 352 var result = $array[$index];
354 if ($check) { 353 if ($check) {
355 throw new Error( 354 throw new Error(
356 name + ": expected value of type \'$type\' at index " + ($index) + 355 name + ": expected value of type \'$type\' at index " + ($index) +
357 " but got " + (typeof result)); 356 " but got " + (typeof result));
358 } 357 }
359 return result; 358 return result;
360 })()'''; 359 })()''';
361 } 360 }
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