| OLD | NEW |
| 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 /// This file use methods that aren't used by dart2js.dart, but that we wish to | 5 /// This file use methods that aren't used by dart2js.dart, but that we wish to |
| 6 /// keep anyway. This might be general API that isn't currently in use, | 6 /// keep anyway. This might be general API that isn't currently in use, |
| 7 /// debugging aids, or API only used for testing (see TODO below). | 7 /// debugging aids, or API only used for testing (see TODO below). |
| 8 | 8 |
| 9 library dart2js.use_unused_api; | 9 library dart2js.use_unused_api; |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 useJsOther(new js.SimpleJavaScriptPrintingContext()); | 63 useJsOther(new js.SimpleJavaScriptPrintingContext()); |
| 64 useJsBackend(null); | 64 useJsBackend(null); |
| 65 useColor(); | 65 useColor(); |
| 66 useFilenames(); | 66 useFilenames(); |
| 67 useSsa(null); | 67 useSsa(null); |
| 68 useIo(); | 68 useIo(); |
| 69 usedByTests(); | 69 usedByTests(); |
| 70 useElements(); | 70 useElements(); |
| 71 useCompiler(null); | 71 useCompiler(null); |
| 72 useTypes(); | 72 useTypes(); |
| 73 useCodeEmitterTask(null); | |
| 74 useScript(null); | 73 useScript(null); |
| 75 useProgramBuilder(null); | |
| 76 useSemanticVisitor(); | 74 useSemanticVisitor(); |
| 77 useDeferred(); | 75 useDeferred(); |
| 78 } | 76 } |
| 79 | 77 |
| 80 useApi([api.ReadStringFromUri uri, compiler.Compiler compiler]) { | 78 useApi([api.ReadStringFromUri uri, compiler.Compiler compiler]) { |
| 81 compiler.analyzeUri(null); | 79 compiler.analyzeUri(null); |
| 82 new diagnostics.SourceSpan.fromNode(null, null); | 80 new diagnostics.SourceSpan.fromNode(null, null); |
| 83 } | 81 } |
| 84 | 82 |
| 85 class NullConstantConstructorVisitor | 83 class NullConstantConstructorVisitor |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 pce.copyWithEnclosing(null); | 274 pce.copyWithEnclosing(null); |
| 277 pfe.copyWithEnclosing(null); | 275 pfe.copyWithEnclosing(null); |
| 278 l.forEachImport(null); | 276 l.forEachImport(null); |
| 279 } | 277 } |
| 280 | 278 |
| 281 useCompiler(compiler.Compiler c) { | 279 useCompiler(compiler.Compiler c) { |
| 282 c.libraryLoader | 280 c.libraryLoader |
| 283 ..reset() | 281 ..reset() |
| 284 ..resetAsync(null) | 282 ..resetAsync(null) |
| 285 ..lookupLibrary(null); | 283 ..lookupLibrary(null); |
| 286 c.forgetElement(null); | |
| 287 c.backend.constantCompilerTask.copyConstantValues(null); | 284 c.backend.constantCompilerTask.copyConstantValues(null); |
| 288 c.currentlyInUserCode(); | 285 c.currentlyInUserCode(); |
| 289 } | 286 } |
| 290 | 287 |
| 291 useTypes() {} | 288 useTypes() {} |
| 292 | 289 |
| 293 useCodeEmitterTask(js_emitter.CodeEmitterTask codeEmitterTask) { | |
| 294 full.Emitter fullEmitter = codeEmitterTask.emitter; | |
| 295 fullEmitter.clearCspPrecompiledNodes(); | |
| 296 fullEmitter.buildLazilyInitializedStaticField(null, isolateProperties: null); | |
| 297 } | |
| 298 | |
| 299 useScript(Script script) { | 290 useScript(Script script) { |
| 300 script.copyWithFile(null); | 291 script.copyWithFile(null); |
| 301 } | 292 } |
| 302 | 293 |
| 303 useProgramBuilder(program_builder.ProgramBuilder builder) { | |
| 304 builder.buildMethodHackForIncrementalCompilation(null); | |
| 305 builder.buildFieldsHackForIncrementalCompilation(null); | |
| 306 } | |
| 307 | |
| 308 useSemanticVisitor() { | 294 useSemanticVisitor() { |
| 309 operators.UnaryOperator.fromKind(null); | 295 operators.UnaryOperator.fromKind(null); |
| 310 operators.BinaryOperator.fromKind(null); | 296 operators.BinaryOperator.fromKind(null); |
| 311 new semantic_visitor.BulkSendVisitor()..apply(null, null); | 297 new semantic_visitor.BulkSendVisitor()..apply(null, null); |
| 312 new semantic_visitor.TraversalVisitor(null).apply(null, null); | 298 new semantic_visitor.TraversalVisitor(null).apply(null, null); |
| 313 new semantic_visitor.BulkDeclarationVisitor().apply(null, null); | 299 new semantic_visitor.BulkDeclarationVisitor().apply(null, null); |
| 314 } | 300 } |
| 315 | 301 |
| 316 useDeferred([deferred.DeferredLoadTask task]) { | 302 useDeferred([deferred.DeferredLoadTask task]) { |
| 317 task.dump(); | 303 task.dump(); |
| 318 } | 304 } |
| OLD | NEW |