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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.startup_emitter.model_emitter; 5 part of dart2js.js_emitter.startup_emitter.model_emitter;
6 6
7 /// The name of the property that stores the tear-off getter on a static 7 /// The name of the property that stores the tear-off getter on a static
8 /// function. 8 /// function.
9 /// 9 ///
10 /// This property is only used when isolates are used. 10 /// This property is only used when isolates are used.
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 addFunOrName(stubMethod); 959 addFunOrName(stubMethod);
960 } 960 }
961 961
962 js.ArrayInitializer callNameArray = 962 js.ArrayInitializer callNameArray =
963 new js.ArrayInitializer(callNames.map(js.quoteName).toList()); 963 new js.ArrayInitializer(callNames.map(js.quoteName).toList());
964 js.ArrayInitializer funsOrNamesArray = new js.ArrayInitializer(funsOrNames); 964 js.ArrayInitializer funsOrNamesArray = new js.ArrayInitializer(funsOrNames);
965 965
966 bool isIntercepted = false; 966 bool isIntercepted = false;
967 if (method is InstanceMethod) { 967 if (method is InstanceMethod) {
968 MethodElement element = method.element; 968 MethodElement element = method.element;
969 isIntercepted = backend.isInterceptedMethod(element); 969 isIntercepted = backend.interceptorData.isInterceptedMethod(element);
970 } 970 }
971 int requiredParameterCount = 0; 971 int requiredParameterCount = 0;
972 js.Expression optionalParameterDefaultValues = new js.LiteralNull(); 972 js.Expression optionalParameterDefaultValues = new js.LiteralNull();
973 if (method.canBeApplied) { 973 if (method.canBeApplied) {
974 requiredParameterCount = method.requiredParameterCount; 974 requiredParameterCount = method.requiredParameterCount;
975 optionalParameterDefaultValues = 975 optionalParameterDefaultValues =
976 _encodeOptionalParameterDefaultValues(method); 976 _encodeOptionalParameterDefaultValues(method);
977 } 977 }
978 978
979 return js.js.statement( 979 return js.js.statement(
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 } 1385 }
1386 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);", 1386 statements.add(js.js.statement("setOrUpdateInterceptorsByTag(#);",
1387 js.objectLiteral(interceptorsByTag))); 1387 js.objectLiteral(interceptorsByTag)));
1388 statements.add( 1388 statements.add(
1389 js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags))); 1389 js.js.statement("setOrUpdateLeafTags(#);", js.objectLiteral(leafTags)));
1390 statements.addAll(subclassAssignments); 1390 statements.addAll(subclassAssignments);
1391 1391
1392 return new js.Block(statements); 1392 return new js.Block(statements);
1393 } 1393 }
1394 } 1394 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698