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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart

Issue 253753002: Correctly minify magic [call] property of [Closure]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « no previous file | sdk/lib/_internal/lib/js_helper.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 class ClassEmitter extends CodeEmitterHelper { 7 class ClassEmitter extends CodeEmitterHelper {
8 /** 8 /**
9 * Documentation wanted -- johnniwinther 9 * Documentation wanted -- johnniwinther
10 * 10 *
(...skipping 30 matching lines...) Expand all
41 onlyForRti: onlyForRti); 41 onlyForRti: onlyForRti);
42 emitFields(classElement, builder, superName, onlyForRti: onlyForRti); 42 emitFields(classElement, builder, superName, onlyForRti: onlyForRti);
43 emitClassGettersSetters(classElement, builder, onlyForRti: onlyForRti); 43 emitClassGettersSetters(classElement, builder, onlyForRti: onlyForRti);
44 emitInstanceMembers(classElement, builder, onlyForRti: onlyForRti); 44 emitInstanceMembers(classElement, builder, onlyForRti: onlyForRti);
45 task.typeTestEmitter.emitIsTests(classElement, builder); 45 task.typeTestEmitter.emitIsTests(classElement, builder);
46 if (additionalProperties != null) { 46 if (additionalProperties != null) {
47 additionalProperties.forEach(builder.addProperty); 47 additionalProperties.forEach(builder.addProperty);
48 } 48 }
49 49
50 if (classElement == compiler.closureClass) { 50 if (classElement == compiler.closureClass) {
51 // We add a special getter here to allow for tearing off a closure form 51 // We add a special getter here to allow for tearing off a closure from
52 // itself. 52 // itself.
53 String name = namer.safeName(Compiler.CALL_OPERATOR_NAME); 53 String name = namer.getMappedInstanceName(Compiler.CALL_OPERATOR_NAME);
54 jsAst.Fun function = js('function() { return this; }'); 54 jsAst.Fun function = js('function() { return this; }');
55 builder.addProperty(namer.getterNameFromAccessorName(name), function); 55 builder.addProperty(namer.getterNameFromAccessorName(name), function);
56 } 56 }
57 57
58 emitTypeVariableReaders(classElement, builder); 58 emitTypeVariableReaders(classElement, builder);
59 59
60 emitClassBuilderWithReflectionData( 60 emitClassBuilderWithReflectionData(
61 className, classElement, builder, properties); 61 className, classElement, builder, properties);
62 } 62 }
63 63
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 computeTypeVariable = 620 computeTypeVariable =
621 js(r'this.$builtinTypeInfo && this.$builtinTypeInfo[#]', index); 621 js(r'this.$builtinTypeInfo && this.$builtinTypeInfo[#]', index);
622 } 622 }
623 jsAst.Expression convertRtiToRuntimeType = 623 jsAst.Expression convertRtiToRuntimeType =
624 namer.elementAccess(compiler.findHelper('convertRtiToRuntimeType')); 624 namer.elementAccess(compiler.findHelper('convertRtiToRuntimeType'));
625 builder.addProperty(name, 625 builder.addProperty(name,
626 js('function () { return #(#) }', 626 js('function () { return #(#) }',
627 [convertRtiToRuntimeType, computeTypeVariable])); 627 [convertRtiToRuntimeType, computeTypeVariable]));
628 } 628 }
629 } 629 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698