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

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

Issue 902783008: The execution of an async* should only be scheduled when the stream is (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase 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) 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 ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 SsaCodeGeneratorTask generator; 8 SsaCodeGeneratorTask generator;
9 SsaBuilderTask builder; 9 SsaBuilderTask builder;
10 SsaOptimizerTask optimizer; 10 SsaOptimizerTask optimizer;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 yieldStarExpression: backend.emitter.staticFunctionAccess( 45 yieldStarExpression: backend.emitter.staticFunctionAccess(
46 backend.getYieldStar()), 46 backend.getYieldStar()),
47 safeVariableName: backend.namer.safeVariableName); 47 safeVariableName: backend.namer.safeVariableName);
48 } 48 }
49 else if (element.asyncMarker == AsyncMarker.ASYNC_STAR) { 49 else if (element.asyncMarker == AsyncMarker.ASYNC_STAR) {
50 rewriter = new AsyncRewriter( 50 rewriter = new AsyncRewriter(
51 backend.compiler, 51 backend.compiler,
52 backend.compiler.currentElement, 52 backend.compiler.currentElement,
53 streamHelper: backend.emitter.staticFunctionAccess( 53 streamHelper: backend.emitter.staticFunctionAccess(
54 backend.getStreamHelper()), 54 backend.getStreamHelper()),
55 streamOfController: backend.emitter.staticFunctionAccess(
56 backend.getStreamOfController()),
55 newController: backend.emitter.staticFunctionAccess( 57 newController: backend.emitter.staticFunctionAccess(
56 backend.getASyncStarControllerConstructor()), 58 backend.getASyncStarControllerConstructor()),
57 safeVariableName: backend.namer.safeVariableName, 59 safeVariableName: backend.namer.safeVariableName,
58 yieldExpression: backend.emitter.staticFunctionAccess( 60 yieldExpression: backend.emitter.staticFunctionAccess(
59 backend.getYieldSingle()), 61 backend.getYieldSingle()),
60 yieldStarExpression: backend.emitter.staticFunctionAccess( 62 yieldStarExpression: backend.emitter.staticFunctionAccess(
61 backend.getYieldStar())); 63 backend.getYieldStar()));
62 } 64 }
63 if (rewriter != null) { 65 if (rewriter != null) {
64 result = rewriter.rewrite(result); 66 result = rewriter.rewrite(result);
(...skipping 6807 matching lines...) Expand 10 before | Expand all | Expand 10 after
6872 if (unaliased is TypedefType) throw 'unable to unalias $type'; 6874 if (unaliased is TypedefType) throw 'unable to unalias $type';
6873 unaliased.accept(this, builder); 6875 unaliased.accept(this, builder);
6874 } 6876 }
6875 6877
6876 void visitDynamicType(DynamicType type, SsaBuilder builder) { 6878 void visitDynamicType(DynamicType type, SsaBuilder builder) {
6877 JavaScriptBackend backend = builder.compiler.backend; 6879 JavaScriptBackend backend = builder.compiler.backend;
6878 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 6880 ClassElement cls = backend.findHelper('DynamicRuntimeType');
6879 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 6881 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
6880 } 6882 }
6881 } 6883 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698