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

Side by Side Diff: pkg/compiler/lib/src/resolution/registry.dart

Issue 949733003: Share the JavaScript based LinkedHashMap implementation between constant maps and the LinkedHashMap… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
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 part of resolution; 5 part of resolution;
6 6
7 /// [ResolutionRegistry] collects all resolution information. It stores node 7 /// [ResolutionRegistry] collects all resolution information. It stores node
8 /// related information in a [TreeElements] mapping and registers calls with 8 /// related information in a [TreeElements] mapping and registers calls with
9 /// [Backend], [World] and [Enqueuer]. 9 /// [Backend], [World] and [Enqueuer].
10 // TODO(johnniwinther): Split this into an interface and implementation class. 10 // TODO(johnniwinther): Split this into an interface and implementation class.
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void registerTypeVariableExpression() { 255 void registerTypeVariableExpression() {
256 backend.resolutionCallbacks.onTypeVariableExpression(this); 256 backend.resolutionCallbacks.onTypeVariableExpression(this);
257 } 257 }
258 258
259 void registerTypeLiteral(Send node, DartType type) { 259 void registerTypeLiteral(Send node, DartType type) {
260 mapping.setType(node, type); 260 mapping.setType(node, type);
261 backend.resolutionCallbacks.onTypeLiteral(type, this); 261 backend.resolutionCallbacks.onTypeLiteral(type, this);
262 world.registerInstantiatedClass(compiler.typeClass, this); 262 world.registerInstantiatedClass(compiler.typeClass, this);
263 } 263 }
264 264
265 void registerMapLiteral(Node node, DartType type, bool isConstant) {
266 setType(node, type);
267 backend.resolutionCallbacks.onMapLiteral(this, type, isConstant);
268 }
269
265 // TODO(johnniwinther): Remove the [ResolverVisitor] dependency. Its only 270 // TODO(johnniwinther): Remove the [ResolverVisitor] dependency. Its only
266 // needed to lookup types in the current scope. 271 // needed to lookup types in the current scope.
267 void registerJsCall(Node node, ResolverVisitor visitor) { 272 void registerJsCall(Node node, ResolverVisitor visitor) {
268 world.registerJsCall(node, visitor); 273 world.registerJsCall(node, visitor);
269 } 274 }
270 275
271 // TODO(johnniwinther): Remove the [ResolverVisitor] dependency. Its only 276 // TODO(johnniwinther): Remove the [ResolverVisitor] dependency. Its only
272 // needed to lookup types in the current scope. 277 // needed to lookup types in the current scope.
273 void registerJsEmbeddedGlobalCall(Node node, ResolverVisitor visitor) { 278 void registerJsEmbeddedGlobalCall(Node node, ResolverVisitor visitor) {
274 world.registerJsEmbeddedGlobalCall(node, visitor); 279 world.registerJsEmbeddedGlobalCall(node, visitor);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 312 }
308 313
309 void registerRequiredType(DartType type, Element enclosingElement) { 314 void registerRequiredType(DartType type, Element enclosingElement) {
310 backend.registerRequiredType(type, enclosingElement); 315 backend.registerRequiredType(type, enclosingElement);
311 } 316 }
312 317
313 void registerStringInterpolation() { 318 void registerStringInterpolation() {
314 backend.resolutionCallbacks.onStringInterpolation(this); 319 backend.resolutionCallbacks.onStringInterpolation(this);
315 } 320 }
316 321
317 void registerConstantMap() {
318 backend.resolutionCallbacks.onConstantMap(this);
319 }
320
321 void registerFallThroughError() { 322 void registerFallThroughError() {
322 backend.resolutionCallbacks.onFallThroughError(this); 323 backend.resolutionCallbacks.onFallThroughError(this);
323 } 324 }
324 325
325 void registerCatchStatement() { 326 void registerCatchStatement() {
326 backend.resolutionCallbacks.onCatchStatement(this); 327 backend.resolutionCallbacks.onCatchStatement(this);
327 } 328 }
328 329
329 void registerStackTraceInCatch() { 330 void registerStackTraceInCatch() {
330 backend.resolutionCallbacks.onStackTraceInCatch(this); 331 backend.resolutionCallbacks.onStackTraceInCatch(this);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 366 }
366 367
367 bool isAssert(Send node) { 368 bool isAssert(Send node) {
368 return mapping.isAssert(node); 369 return mapping.isAssert(node);
369 } 370 }
370 371
371 void registerAsyncMarker(FunctionElement element) { 372 void registerAsyncMarker(FunctionElement element) {
372 backend.registerAsyncMarker(element, world, this); 373 backend.registerAsyncMarker(element, world, this);
373 } 374 }
374 } 375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698