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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 11602016: Emit classes using ASTs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 js_backend; 5 part of js_backend;
6 6
7 typedef void Recompile(Element element); 7 typedef void Recompile(Element element);
8 8
9 class ReturnInfo { 9 class ReturnInfo {
10 HType returnType; 10 HType returnType;
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 // the static variable. 910 // the static variable.
911 // We also need to register the use of the cyclic-error helper. 911 // We also need to register the use of the cyclic-error helper.
912 compiler.enqueuer.codegen.registerStaticUse(cyclicThrowHelper); 912 compiler.enqueuer.codegen.registerStaticUse(cyclicThrowHelper);
913 } 913 }
914 } 914 }
915 915
916 HGraph graph = builder.build(work); 916 HGraph graph = builder.build(work);
917 optimizer.optimize(work, graph, false); 917 optimizer.optimize(work, graph, false);
918 if (work.allowSpeculativeOptimization 918 if (work.allowSpeculativeOptimization
919 && optimizer.trySpeculativeOptimizations(work, graph)) { 919 && optimizer.trySpeculativeOptimizations(work, graph)) {
920 CodeBuffer codeBuffer = generator.generateBailoutMethod(work, graph); 920 js.Expression code = generator.generateBailoutMethod(work, graph);
921 compiler.codegenWorld.addBailoutCode(work, codeBuffer); 921 compiler.codegenWorld.addBailoutCode(work, code);
922 optimizer.prepareForSpeculativeOptimizations(work, graph); 922 optimizer.prepareForSpeculativeOptimizations(work, graph);
923 optimizer.optimize(work, graph, true); 923 optimizer.optimize(work, graph, true);
924 } 924 }
925 CodeBuffer codeBuffer = generator.generateCode(work, graph); 925 js.Expression code = generator.generateCode(work, graph);
926 compiler.codegenWorld.addGeneratedCode(work, codeBuffer); 926 compiler.codegenWorld.addGeneratedCode(work, code);
927 invalidateAfterCodegen.forEach(compiler.enqueuer.codegen.eagerRecompile); 927 invalidateAfterCodegen.forEach(compiler.enqueuer.codegen.eagerRecompile);
928 invalidateAfterCodegen.clear(); 928 invalidateAfterCodegen.clear();
929 } 929 }
930 930
931 931
932 native.NativeEnqueuer nativeResolutionEnqueuer(Enqueuer world) { 932 native.NativeEnqueuer nativeResolutionEnqueuer(Enqueuer world) {
933 return new native.NativeResolutionEnqueuer(world, compiler); 933 return new native.NativeResolutionEnqueuer(world, compiler);
934 } 934 }
935 935
936 native.NativeEnqueuer nativeCodegenEnqueuer(Enqueuer world) { 936 native.NativeEnqueuer nativeCodegenEnqueuer(Enqueuer world) {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 print("Inferred return types:"); 1138 print("Inferred return types:");
1139 print("----------------------"); 1139 print("----------------------");
1140 dumpReturnTypes(); 1140 dumpReturnTypes();
1141 print(""); 1141 print("");
1142 print("Inferred field types:"); 1142 print("Inferred field types:");
1143 print("------------------------"); 1143 print("------------------------");
1144 fieldTypes.dump(); 1144 fieldTypes.dump();
1145 print(""); 1145 print("");
1146 } 1146 }
1147 } 1147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698