| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 dart2js.js_emitter.lazy_emitter.model_emitter; | 5 library dart2js.js_emitter.lazy_emitter.model_emitter; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart' | 7 import 'package:js_runtime/shared/embedded_names.dart' |
| 8 show | 8 show |
| 9 CREATE_NEW_ISOLATE, | 9 CREATE_NEW_ISOLATE, |
| 10 DEFERRED_LIBRARY_URIS, | 10 DEFERRED_LIBRARY_URIS, |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 // [name, [aliasName, function, callName, isIntercepted, tearOffName, | 853 // [name, [aliasName, function, callName, isIntercepted, tearOffName, |
| 854 // functionType, stub1_name, stub1_callName, stub1_code, ...] | 854 // functionType, stub1_name, stub1_callName, stub1_code, ...] |
| 855 var data = []; | 855 var data = []; |
| 856 if (method.aliasName != null) { | 856 if (method.aliasName != null) { |
| 857 data.add(js.quoteName(method.aliasName)); | 857 data.add(js.quoteName(method.aliasName)); |
| 858 } | 858 } |
| 859 data.add(method.code); | 859 data.add(method.code); |
| 860 data.add(js.quoteName(method.callName, allowNull: true)); | 860 data.add(js.quoteName(method.callName, allowNull: true)); |
| 861 | 861 |
| 862 if (method.needsTearOff) { | 862 if (method.needsTearOff) { |
| 863 bool isIntercepted = backend.isInterceptedMethod(method.element); | 863 MethodElement element = method.element; |
| 864 bool isIntercepted = backend.isInterceptedMethod(element); |
| 864 data.add(new js.LiteralBool(isIntercepted)); | 865 data.add(new js.LiteralBool(isIntercepted)); |
| 865 data.add(js.quoteName(method.tearOffName)); | 866 data.add(js.quoteName(method.tearOffName)); |
| 866 data.add((method.functionType)); | 867 data.add((method.functionType)); |
| 867 } | 868 } |
| 868 | 869 |
| 869 data.addAll(method.parameterStubs.expand(makeNameCallNameCodeTriplet)); | 870 data.addAll(method.parameterStubs.expand(makeNameCallNameCodeTriplet)); |
| 870 if (method.canBeApplied) { | 871 if (method.canBeApplied) { |
| 871 data.add(js.number(method.requiredParameterCount)); | 872 data.add(js.number(method.requiredParameterCount)); |
| 872 data.add(_encodeOptionalParameterDefaultValues(method)); | 873 data.add(_encodeOptionalParameterDefaultValues(method)); |
| 873 } | 874 } |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 #eagerClasses; | 1268 #eagerClasses; |
| 1268 | 1269 |
| 1269 var end = Date.now(); | 1270 var end = Date.now(); |
| 1270 // print('Setup: ' + (end - start) + ' ms.'); | 1271 // print('Setup: ' + (end - start) + ' ms.'); |
| 1271 | 1272 |
| 1272 #invokeMain; // Start main. | 1273 #invokeMain; // Start main. |
| 1273 | 1274 |
| 1274 })(Date.now(), #code) | 1275 })(Date.now(), #code) |
| 1275 }"""; | 1276 }"""; |
| 1276 } | 1277 } |
| OLD | NEW |