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

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

Issue 935033005: Register literals through backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changes commited as r43876. 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
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 FunctionElement helperForBadMain() => null; 517 FunctionElement helperForBadMain() => null;
518 518
519 FunctionElement helperForMissingMain() => null; 519 FunctionElement helperForMissingMain() => null;
520 520
521 FunctionElement helperForMainArity() => null; 521 FunctionElement helperForMainArity() => null;
522 522
523 void forgetElement(Element element) {} 523 void forgetElement(Element element) {}
524 524
525 void registerMainHasArguments(Enqueuer enqueuer) {} 525 void registerMainHasArguments(Enqueuer enqueuer) {}
526 526
527 void registerAsyncMarker(FunctionElement element, 527 void registerAsyncMarker(
528 Enqueuer enqueuer, 528 FunctionElement element,
529 Registry registry) {} 529 Enqueuer enqueuer,
530 Registry registry) {}
530 } 531 }
531 532
532 /// Backend callbacks function specific to the resolution phase. 533 /// Backend callbacks function specific to the resolution phase.
533 class ResolutionCallbacks { 534 class ResolutionCallbacks {
534 /// Register that [node] is a call to `assert`. 535 /// Register that [node] is a call to `assert`.
535 void onAssert(Send node, Registry registry) {} 536 void onAssert(Send node, Registry registry) {}
536 537
537 /// Called during resolution to notify to the backend that the 538 /// Called during resolution to notify to the backend that the
538 /// program uses string interpolation. 539 /// program uses string interpolation.
539 void onStringInterpolation(Registry registry) {} 540 void onStringInterpolation(Registry registry) {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 587
587 /// Register that a super call will end up calling 588 /// Register that a super call will end up calling
588 /// [: super.noSuchMethod :]. 589 /// [: super.noSuchMethod :].
589 void onSuperNoSuchMethod(Registry registry) {} 590 void onSuperNoSuchMethod(Registry registry) {}
590 591
591 /// Register that the application creates a constant map. 592 /// Register that the application creates a constant map.
592 void onConstantMap(Registry registry) {} 593 void onConstantMap(Registry registry) {}
593 594
594 /// Called when resolving the `Symbol` constructor. 595 /// Called when resolving the `Symbol` constructor.
595 void onSymbolConstructor(Registry registry) {} 596 void onSymbolConstructor(Registry registry) {}
597
598 /// Called when resolving a literal int.
599 void onLiteralInt(Registry registry) {}
600
601 /// Called when resolving a literal double.
602 void onLiteralDouble(Registry registry) {}
603
604 /// Called when resolving a literal bool.
605 void onLiteralBool(Registry registry) {}
606
607 /// Called when resolving a literal String.
608 void onLiteralString(Registry registry) {}
609
610 /// Called when resolving a literal null.
611 void onLiteralNull(Registry registry) {}
612
613 /// Called when resolving a literal Symbol.
614 void onLiteralSymbol(Registry registry) {}
615
616 /// Called when resolving a literal Function (aka a closure).
617 void onLiteralFunction(Registry registry) {}
596 } 618 }
597 619
598 /** 620 /**
599 * Key class used in [TokenMap] in which the hash code for a token is based 621 * Key class used in [TokenMap] in which the hash code for a token is based
600 * on the [charOffset]. 622 * on the [charOffset].
601 */ 623 */
602 class TokenKey { 624 class TokenKey {
603 final Token token; 625 final Token token;
604 TokenKey(this.token); 626 TokenKey(this.token);
605 int get hashCode => token.charOffset; 627 int get hashCode => token.charOffset;
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 return futureClass.computeType(compiler).createInstantiation([elementType]); 2421 return futureClass.computeType(compiler).createInstantiation([elementType]);
2400 } 2422 }
2401 2423
2402 @override 2424 @override
2403 InterfaceType streamType([DartType elementType = const DynamicType()]) { 2425 InterfaceType streamType([DartType elementType = const DynamicType()]) {
2404 return streamClass.computeType(compiler).createInstantiation([elementType]); 2426 return streamClass.computeType(compiler).createInstantiation([elementType]);
2405 } 2427 }
2406 } 2428 }
2407 2429
2408 typedef void InternalErrorFunction(Spannable location, String message); 2430 typedef void InternalErrorFunction(Spannable location, String message);
OLDNEW
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698