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

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

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import 'package:async_helper/async_helper.dart'; 6 import 'package:async_helper/async_helper.dart';
7 import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask; 7 import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask;
8 import 'package:compiler/src/compiler.dart'; 8 import 'package:compiler/src/compiler.dart';
9 9
10 import 'memory_compiler.dart'; 10 import 'memory_compiler.dart';
(...skipping 11 matching lines...) Expand all
22 var a = new Float32List(9); 22 var a = new Float32List(9);
23 return myList[0] + myOtherList[0]; 23 return myList[0] + myOtherList[0];
24 } 24 }
25 ''' 25 '''
26 }; 26 };
27 27
28 void main() { 28 void main() {
29 asyncTest(() async { 29 asyncTest(() async {
30 CompilationResult result = await runCompiler(memorySourceFiles: TEST); 30 CompilationResult result = await runCompiler(memorySourceFiles: TEST);
31 Compiler compiler = result.compiler; 31 Compiler compiler = result.compiler;
32 var typesInferrer = compiler.globalInference.typesInferrer; 32 var typesInferrer = compiler.globalInference.typesInferrerInternal;
33 33
34 checkType(String name, type, length) { 34 checkType(String name, type, length) {
35 var element = findElement(compiler, name); 35 var element = findElement(compiler, name);
36 TypeMask mask = typesInferrer.getTypeOfElement(element); 36 TypeMask mask = typesInferrer.getTypeOfElement(element);
37 Expect.isTrue(mask.isContainer); 37 Expect.isTrue(mask.isContainer);
38 ContainerTypeMask container = mask; 38 ContainerTypeMask container = mask;
39 Expect.equals(type, simplify(container.elementType, compiler), name); 39 Expect.equals(type, simplify(container.elementType, compiler), name);
40 Expect.equals(container.length, length); 40 Expect.equals(container.length, length);
41 } 41 }
42 42
43 checkType('myList', compiler.commonMasks.numType, 42); 43 checkType('myList', compiler.closedWorld.commonMasks.numType, 42);
44 checkType('myOtherList', compiler.commonMasks.uint31Type, 32); 44 checkType('myOtherList', compiler.closedWorld.commonMasks.uint31Type, 32);
45 }); 45 });
46 } 46 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/list_tracer_test.dart ('k') | tests/compiler/dart2js/map_tracer_const_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698