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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 140543002: Revert "Redo "Make dart2js typed_data implementation classes private"" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
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 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after
4034 TypeMaskFactory.inferredForNode(sourceElement, send, compiler); 4034 TypeMaskFactory.inferredForNode(sourceElement, send, compiler);
4035 return inferred.containsAll(compiler) 4035 return inferred.containsAll(compiler)
4036 ? backend.extendableArrayType 4036 ? backend.extendableArrayType
4037 : inferred; 4037 : inferred;
4038 } else if (Elements.isConstructorOfTypedArraySubclass( 4038 } else if (Elements.isConstructorOfTypedArraySubclass(
4039 originalElement, compiler)) { 4039 originalElement, compiler)) {
4040 isFixedList = true; 4040 isFixedList = true;
4041 TypeMask inferred = 4041 TypeMask inferred =
4042 TypeMaskFactory.inferredForNode(sourceElement, send, compiler); 4042 TypeMaskFactory.inferredForNode(sourceElement, send, compiler);
4043 ClassElement cls = element.getEnclosingClass(); 4043 ClassElement cls = element.getEnclosingClass();
4044 assert(cls.thisType.element.isNative());
4045 return inferred.containsAll(compiler) 4044 return inferred.containsAll(compiler)
4046 ? new TypeMask.nonNullExact(cls.thisType.element) 4045 ? new TypeMask.nonNullExact(cls.thisType.element)
4047 : inferred; 4046 : inferred;
4048 } else if (element.isGenerativeConstructor()) { 4047 } else if (element.isGenerativeConstructor()) {
4049 ClassElement cls = element.getEnclosingClass(); 4048 ClassElement cls = element.getEnclosingClass();
4050 return new TypeMask.nonNullExact(cls.thisType.element); 4049 return new TypeMask.nonNullExact(cls.thisType.element);
4051 } else { 4050 } else {
4052 return TypeMaskFactory.inferredReturnTypeForElement( 4051 return TypeMaskFactory.inferredReturnTypeForElement(
4053 originalElement, compiler); 4052 originalElement, compiler);
4054 } 4053 }
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
6405 DartType unaliased = type.unalias(builder.compiler); 6404 DartType unaliased = type.unalias(builder.compiler);
6406 if (unaliased is TypedefType) throw 'unable to unalias $type'; 6405 if (unaliased is TypedefType) throw 'unable to unalias $type';
6407 unaliased.accept(this, builder); 6406 unaliased.accept(this, builder);
6408 } 6407 }
6409 6408
6410 void visitDynamicType(DynamicType type, SsaFromAstMixin builder) { 6409 void visitDynamicType(DynamicType type, SsaFromAstMixin builder) {
6411 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); 6410 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType');
6412 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); 6411 builder.push(new HDynamicType(type, new TypeMask.exact(cls)));
6413 } 6412 }
6414 } 6413 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/native_handler.dart ('k') | sdk/lib/_internal/libraries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698