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

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

Issue 15985005: Re-apply: Fix type propagation bug by always narrowing types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/language/type_propagation_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:collection'; 8 import 'dart:collection';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 Node parsedTree; 187 Node parsedTree;
188 188
189 MockCompiler({String coreSource: DEFAULT_CORELIB, 189 MockCompiler({String coreSource: DEFAULT_CORELIB,
190 String helperSource: DEFAULT_HELPERLIB, 190 String helperSource: DEFAULT_HELPERLIB,
191 String interceptorsSource: DEFAULT_INTERCEPTORSLIB, 191 String interceptorsSource: DEFAULT_INTERCEPTORSLIB,
192 String isolateHelperSource: DEFAULT_ISOLATE_HELPERLIB, 192 String isolateHelperSource: DEFAULT_ISOLATE_HELPERLIB,
193 bool enableTypeAssertions: false, 193 bool enableTypeAssertions: false,
194 bool enableMinification: false, 194 bool enableMinification: false,
195 bool enableConcreteTypeInference: false, 195 bool enableConcreteTypeInference: false,
196 int maxConcreteTypeSize: 5, 196 int maxConcreteTypeSize: 5,
197 bool disableTypeInference: false,
197 bool analyzeAll: false, 198 bool analyzeAll: false,
198 bool analyzeOnly: false, 199 bool analyzeOnly: false,
199 bool preserveComments: false}) 200 bool preserveComments: false})
200 : warnings = [], errors = [], 201 : warnings = [], errors = [],
201 sourceFiles = new Map<String, SourceFile>(), 202 sourceFiles = new Map<String, SourceFile>(),
202 super(enableTypeAssertions: enableTypeAssertions, 203 super(enableTypeAssertions: enableTypeAssertions,
203 enableMinification: enableMinification, 204 enableMinification: enableMinification,
204 enableConcreteTypeInference: enableConcreteTypeInference, 205 enableConcreteTypeInference: enableConcreteTypeInference,
205 maxConcreteTypeSize: maxConcreteTypeSize, 206 maxConcreteTypeSize: maxConcreteTypeSize,
207 disableTypeInference: disableTypeInference,
206 analyzeAll: analyzeAll, 208 analyzeAll: analyzeAll,
207 analyzeOnly: analyzeOnly, 209 analyzeOnly: analyzeOnly,
208 preserveComments: preserveComments) { 210 preserveComments: preserveComments) {
209 coreLibrary = createLibrary("core", coreSource); 211 coreLibrary = createLibrary("core", coreSource);
210 // We need to set the assert method to avoid calls with a 'null' 212 // We need to set the assert method to avoid calls with a 'null'
211 // target being interpreted as a call to assert. 213 // target being interpreted as a call to assert.
212 jsHelperLibrary = createLibrary("helper", helperSource); 214 jsHelperLibrary = createLibrary("helper", helperSource);
213 foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY); 215 foreignLibrary = createLibrary("foreign", FOREIGN_LIBRARY);
214 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); 216 interceptorsLibrary = createLibrary("interceptors", interceptorsSource);
215 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); 217 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 430 }
429 } 431 }
430 432
431 class MockDeferredLoadTask extends DeferredLoadTask { 433 class MockDeferredLoadTask extends DeferredLoadTask {
432 MockDeferredLoadTask(Compiler compiler) : super(compiler); 434 MockDeferredLoadTask(Compiler compiler) : super(compiler);
433 435
434 void registerMainApp(LibraryElement mainApp) { 436 void registerMainApp(LibraryElement mainApp) {
435 // Do nothing. 437 // Do nothing.
436 } 438 }
437 } 439 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/language/type_propagation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698