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

Side by Side Diff: lib/compiler/implementation/js_backend/emitter.dart

Issue 10834330: Clean-up of getCompilationUnit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * A function element that represents a closure call. The signature is copied 6 * A function element that represents a closure call. The signature is copied
7 * from the given element. 7 * from the given element.
8 */ 8 */
9 class ClosureInvocationElement extends FunctionElement { 9 class ClosureInvocationElement extends FunctionElement {
10 ClosureInvocationElement(SourceString name, 10 ClosureInvocationElement(SourceString name,
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 } 957 }
958 return selector.applies(element, compiler); 958 return selector.applies(element, compiler);
959 } 959 }
960 960
961 // If the selector is typed, we check to see if that type may 961 // If the selector is typed, we check to see if that type may
962 // have a user-defined noSuchMethod implementation. If not, we 962 // have a user-defined noSuchMethod implementation. If not, we
963 // skip the selector altogether. 963 // skip the selector altogether.
964 Type receiverType = objectType; 964 Type receiverType = objectType;
965 ClassElement receiverClass = objectClass; 965 ClassElement receiverClass = objectClass;
966 if (selector is TypedSelector) { 966 if (selector is TypedSelector) {
967 receiverType = (selector as TypedSelector).receiverType; 967 TypedSelector typedSelector = selector;
968 receiverType = typedSelector.receiverType;
968 receiverClass = receiverType.element; 969 receiverClass = receiverType.element;
969 } 970 }
970 971
971 // If the receiver class is guaranteed to have a member that 972 // If the receiver class is guaranteed to have a member that
972 // matches what we're looking for, there's no need to 973 // matches what we're looking for, there's no need to
973 // introduce a noSuchMethod handler. It will never be called. 974 // introduce a noSuchMethod handler. It will never be called.
974 // 975 //
975 // As an example, consider this class hierarchy: 976 // As an example, consider this class hierarchy:
976 // 977 //
977 // A <-- noSuchMethod 978 // A <-- noSuchMethod
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 sourceName = token.slowToString(); 1175 sourceName = token.slowToString();
1175 } 1176 }
1176 int totalOffset = bufferOffset + offset; 1177 int totalOffset = bufferOffset + offset;
1177 sourceMapBuilder.addMapping( 1178 sourceMapBuilder.addMapping(
1178 sourceFile, token.charOffset, sourceName, totalOffset); 1179 sourceFile, token.charOffset, sourceName, totalOffset);
1179 }); 1180 });
1180 } 1181 }
1181 } 1182 }
1182 1183
1183 typedef void DefineMemberFunction(String invocationName, CodeBuffer definition); 1184 typedef void DefineMemberFunction(String invocationName, CodeBuffer definition);
OLDNEW
« no previous file with comments | « lib/compiler/implementation/js/printer.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698