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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10964016: Change the type inference for fields in dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor fixes and rebased Created 8 years, 3 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 | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | lib/compiler/implementation/enqueue.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 17ed94fb5ebc701034c5630a3868c64cfddf7fc2..264f090e3bccfe3f6ccaa6d126d7df125068dc99 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -10,11 +10,6 @@
const bool REPORT_EXCESS_RESOLUTION = false;
/**
- * If true, trace information on pass2 optimizations.
- */
-const bool REPORT_PASS2_OPTIMIZATIONS = false;
-
-/**
* If true, dump the inferred types after compilation.
*/
const bool DUMP_INFERRED_TYPES = false;
@@ -176,7 +171,6 @@ class Compiler implements DiagnosticListener {
static const int PHASE_SCANNING = 0;
static const int PHASE_RESOLVING = 1;
static const int PHASE_COMPILING = 2;
- static const int PHASE_RECOMPILING = 3;
int phase;
bool compilationFailed = false;
@@ -570,10 +564,6 @@ class Compiler implements DiagnosticListener {
log('Compiling...');
phase = PHASE_COMPILING;
processQueue(enqueuer.codegen, main);
- log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} "
- "methods...");
- phase = PHASE_RECOMPILING;
- processRecompilationQueue(enqueuer.codegen);
log('Compiled ${codegenWorld.generatedCode.length} methods.');
if (compilationFailed) return;
@@ -601,23 +591,9 @@ class Compiler implements DiagnosticListener {
print("Inferred return types:");
print("----------------------");
backend.dumpReturnTypes();
- }
- }
-
- void processRecompilationQueue(Enqueuer world) {
- assert(phase == PHASE_RECOMPILING);
- while (!world.recompilationCandidates.isEmpty()) {
- WorkItem work = world.recompilationCandidates.next();
- CodeBuffer oldCode = world.universe.generatedCode[work.element];
- world.universe.generatedCode.remove(work.element);
- world.universe.generatedBailoutCode.remove(work.element);
- withCurrentElement(work.element, () => work.run(this, world));
- CodeBuffer newCode = world.universe.generatedCode[work.element];
- if (REPORT_PASS2_OPTIMIZATIONS && newCode != oldCode) {
- log("Pass 2 optimization:");
- log("Before:\n$oldCode");
- log("After:\n$newCode");
- }
+ print("Inferred field types:");
+ print("------------------------");
+ backend.fieldTypes.dump();
}
}
@@ -722,11 +698,7 @@ class Compiler implements DiagnosticListener {
if (progress.elapsedInMs() > 500) {
// TODO(ahe): Add structured diagnostics to the compiler API and
// use it to separate this from the --verbose option.
- if (phase == PHASE_COMPILING) {
- log('Compiled ${codegenWorld.generatedCode.length} methods.');
- } else {
- log('Recompiled ${world.recompilationCandidates.processed} methods.');
- }
+ log('Compiled ${codegenWorld.generatedCode.length} methods.');
progress.reset();
}
backend.codegen(work);
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | lib/compiler/implementation/enqueue.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698