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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart

Issue 2680823002: Extract InterceptorData from JavaScriptBackend. (Closed)
Patch Set: Updated cf. comments Created 3 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
OLDNEW
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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 MethodElement element = method.element; 863 MethodElement element = method.element;
864 bool isIntercepted = backend.isInterceptedMethod(element); 864 bool isIntercepted =
865 backend.interceptorData.isInterceptedMethod(element);
865 data.add(new js.LiteralBool(isIntercepted)); 866 data.add(new js.LiteralBool(isIntercepted));
866 data.add(js.quoteName(method.tearOffName)); 867 data.add(js.quoteName(method.tearOffName));
867 data.add((method.functionType)); 868 data.add((method.functionType));
868 } 869 }
869 870
870 data.addAll(method.parameterStubs.expand(makeNameCallNameCodeTriplet)); 871 data.addAll(method.parameterStubs.expand(makeNameCallNameCodeTriplet));
871 if (method.canBeApplied) { 872 if (method.canBeApplied) {
872 data.add(js.number(method.requiredParameterCount)); 873 data.add(js.number(method.requiredParameterCount));
873 data.add(_encodeOptionalParameterDefaultValues(method)); 874 data.add(_encodeOptionalParameterDefaultValues(method));
874 } 875 }
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 #eagerClasses; 1269 #eagerClasses;
1269 1270
1270 var end = Date.now(); 1271 var end = Date.now();
1271 // print('Setup: ' + (end - start) + ' ms.'); 1272 // print('Setup: ' + (end - start) + ' ms.');
1272 1273
1273 #invokeMain; // Start main. 1274 #invokeMain; // Start main.
1274 1275
1275 })(Date.now(), #code) 1276 })(Date.now(), #code)
1276 }"""; 1277 }""";
1277 } 1278 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart ('k') | pkg/compiler/lib/src/js_emitter/native_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698