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

Unified Diff: frog/await/awaitc.dart

Issue 10548047: Remove frog from the repository. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move test and update apidoc.gyp. Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/analyze_frame.dart ('k') | frog/await/checker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/await/awaitc.dart
diff --git a/frog/await/awaitc.dart b/frog/await/awaitc.dart
deleted file mode 100644
index 21291d136981c1f28f0876d75d9f059d2b9f2c01..0000000000000000000000000000000000000000
--- a/frog/await/awaitc.dart
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Separate entrypoint for the frog compiler with experimental support for the
-// 'await' keyword.
-
-#import('../lang.dart');
-#import('../minfrog.dart', prefix:'minfrog');
-#source('nodeset.dart');
-#source('checker.dart');
-#source('normalizer.dart');
-#source('transformation.dart');
-
-/**
- * The main entry point method - needed to ensure we handle correctly await
- * expressions within main.
- */
-Member _mainMethod;
-
-/**
- * A phase in the compilation process that processes the entire AST and
- * desugars await expressions.
- */
-awaitTransformation() {
- _mainMethod =
- world.findMainMethod(world.getOrAddLibrary(options.dartScript));
- for (var lib in world.libraries.getValues()) {
- for (var type in lib.types.getValues()) {
- for (var member in type.members.getValues()) {
- _process(member);
- }
- for (var member in type.constructors.getValues()) {
- _process(member);
- }
- }
- }
-}
-
-/** Analyze and transform a single member (method or property). */
-_process(Member member) {
- if (member.isConstructor || member.isMethod) {
- _processFunction(member.definition);
- } else if (member.isProperty) {
- PropertyMember p = member;
- if (p.getter != null) _process(p.getter);
- if (p.setter != null) _process(p.setter);
- }
-}
-
-/** Analyze and transform a function definition and nested definitions. */
-_processFunction(FunctionDefinition func) {
- AwaitChecker checker = new AwaitChecker();
-
- // Run checker that collects nested functions and which nodes may contain
- // await expressions.
- func.visit(checker);
-
- // Rewrite nested asynchronous functions first.
- for (FunctionDefinition f in checker.nestedFunctions) {
- _processFunction(f);
- }
-
- if (checker.haveAwait.contains(func)) {
- // Normalize
- func.visit(new AwaitNormalizer(checker.haveAwait));
- // Re-run the checker to derive appropriate node information (this
- // makes the normalizer simpler as we don't have to keep track of this
- // information).
- checker = new AwaitChecker();
- func.visit(checker);
-
- // Transform the code.
- func.visit(new AwaitProcessor(checker.haveAwait));
- }
-}
-
-/** Run frog, setting the await transformation correctly. */
-void main() {
- experimentalAwaitPhase = () {
- world.withTiming('remove await expressions', awaitTransformation);
- };
- minfrog.main();
-}
« no previous file with comments | « frog/analyze_frame.dart ('k') | frog/await/checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698