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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 1457383003: Alternative fix for the js-interop crash. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
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 library mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 int maxConcreteTypeSize: 5, 72 int maxConcreteTypeSize: 5,
73 bool disableTypeInference: false, 73 bool disableTypeInference: false,
74 bool analyzeAll: false, 74 bool analyzeAll: false,
75 bool analyzeOnly: false, 75 bool analyzeOnly: false,
76 bool emitJavaScript: true, 76 bool emitJavaScript: true,
77 bool preserveComments: false, 77 bool preserveComments: false,
78 // Our unit tests check code generation output that is 78 // Our unit tests check code generation output that is
79 // affected by inlining support. 79 // affected by inlining support.
80 bool disableInlining: true, 80 bool disableInlining: true,
81 bool trustTypeAnnotations: false, 81 bool trustTypeAnnotations: false,
82 bool trustJSInteropTypeAnnotations: false,
82 bool enableAsyncAwait: false, 83 bool enableAsyncAwait: false,
83 int this.expectedWarnings, 84 int this.expectedWarnings,
84 int this.expectedErrors, 85 int this.expectedErrors,
85 api.CompilerOutputProvider outputProvider, 86 api.CompilerOutputProvider outputProvider,
86 String patchVersion, 87 String patchVersion,
87 LibrarySourceProvider this.librariesOverride}) 88 LibrarySourceProvider this.librariesOverride})
88 : sourceFiles = new Map<String, SourceFile>(), 89 : sourceFiles = new Map<String, SourceFile>(),
89 testedPatchVersion = patchVersion, 90 testedPatchVersion = patchVersion,
90 super(enableTypeAssertions: enableTypeAssertions, 91 super(enableTypeAssertions: enableTypeAssertions,
91 enableUserAssertions: enableUserAssertions, 92 enableUserAssertions: enableUserAssertions,
92 enableAssertMessage: true, 93 enableAssertMessage: true,
93 enableMinification: enableMinification, 94 enableMinification: enableMinification,
94 maxConcreteTypeSize: maxConcreteTypeSize, 95 maxConcreteTypeSize: maxConcreteTypeSize,
95 disableTypeInferenceFlag: disableTypeInference, 96 disableTypeInferenceFlag: disableTypeInference,
96 analyzeAllFlag: analyzeAll, 97 analyzeAllFlag: analyzeAll,
97 analyzeOnly: analyzeOnly, 98 analyzeOnly: analyzeOnly,
98 emitJavaScript: emitJavaScript, 99 emitJavaScript: emitJavaScript,
99 preserveComments: preserveComments, 100 preserveComments: preserveComments,
100 trustTypeAnnotations: trustTypeAnnotations, 101 trustTypeAnnotations: trustTypeAnnotations,
102 trustJSInteropTypeAnnotations: trustJSInteropTypeAnnotations,
101 diagnosticOptions: 103 diagnosticOptions:
102 new DiagnosticOptions(showPackageWarnings: true), 104 new DiagnosticOptions(showPackageWarnings: true),
103 outputProvider: new LegacyCompilerOutput(outputProvider)) { 105 outputProvider: new LegacyCompilerOutput(outputProvider)) {
104 this.disableInlining = disableInlining; 106 this.disableInlining = disableInlining;
105 107
106 deferredLoadTask = new MockDeferredLoadTask(this); 108 deferredLoadTask = new MockDeferredLoadTask(this);
107 109
108 registerSource(Uris.dart_core, 110 registerSource(Uris.dart_core,
109 buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); 111 buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource));
110 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); 112 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 trustTypeAnnotations: trustTypeAnnotations, 369 trustTypeAnnotations: trustTypeAnnotations,
368 enableTypeAssertions: enableTypeAssertions, 370 enableTypeAssertions: enableTypeAssertions,
369 enableUserAssertions: enableUserAssertions, 371 enableUserAssertions: enableUserAssertions,
370 expectedErrors: expectedErrors, 372 expectedErrors: expectedErrors,
371 expectedWarnings: expectedWarnings, 373 expectedWarnings: expectedWarnings,
372 outputProvider: outputProvider); 374 outputProvider: outputProvider);
373 compiler.registerSource(uri, code); 375 compiler.registerSource(uri, code);
374 compiler.diagnosticHandler = createHandler(compiler, code); 376 compiler.diagnosticHandler = createHandler(compiler, code);
375 return compiler; 377 return compiler;
376 } 378 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/interop_anonymous_unreachable_test.dart ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698