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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 18749002: Use typedefs in lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « sdk/lib/_collection_dev/iterable.dart ('k') | sdk/lib/async/stream.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 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * A function element that represents a closure call. The signature is copied 8 * A function element that represents a closure call. The signature is copied
9 * from the given element. 9 * from the given element.
10 */ 10 */
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 ? 'receiver' : 'this'; 1537 ? 'receiver' : 'this';
1538 List<String> args = backend.isInterceptedMethod(member) 1538 List<String> args = backend.isInterceptedMethod(member)
1539 ? ['receiver', 'v'] 1539 ? ['receiver', 'v']
1540 : ['v']; 1540 : ['v'];
1541 builder.addProperty(setterName, 1541 builder.addProperty(setterName,
1542 js.fun(args, js('$receiver.$fieldName = v'))); 1542 js.fun(args, js('$receiver.$fieldName = v')));
1543 } 1543 }
1544 1544
1545 bool canGenerateCheckedSetter(Element member) { 1545 bool canGenerateCheckedSetter(Element member) {
1546 DartType type = member.computeType(compiler); 1546 DartType type = member.computeType(compiler);
1547 if (type.element.isTypeVariable() 1547 if (type.containsTypeVariables ||
Johnni Winther 2013/07/05 06:38:26 This is a temporary fix for issue 11273.
karlklose 2013/07/08 08:37:30 Change that to bailout for function types and go t
karlklose 2013/07/08 08:37:30 Change that to bailout for function types and go t
1548 || type.element == compiler.dynamicClass 1548 type.element == compiler.dynamicClass ||
1549 || type.element == compiler.objectClass) { 1549 type.element == compiler.objectClass) {
1550 // TODO(ngeoffray): Support type checks on type parameters. 1550 // TODO(ngeoffray): Support type checks on type parameters.
1551 return false; 1551 return false;
1552 } 1552 }
1553 return true; 1553 return true;
1554 } 1554 }
1555 1555
1556 void generateCheckedSetter(Element member, 1556 void generateCheckedSetter(Element member,
1557 String fieldName, 1557 String fieldName,
1558 String accessorName, 1558 String accessorName,
1559 ClassBuilder builder) { 1559 ClassBuilder builder) {
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
3701 3701
3702 const String HOOKS_API_USAGE = """ 3702 const String HOOKS_API_USAGE = """
3703 // The code supports the following hooks: 3703 // The code supports the following hooks:
3704 // dartPrint(message) - if this function is defined it is called 3704 // dartPrint(message) - if this function is defined it is called
3705 // instead of the Dart [print] method. 3705 // instead of the Dart [print] method.
3706 // dartMainRunner(main) - if this function is defined, the Dart [main] 3706 // dartMainRunner(main) - if this function is defined, the Dart [main]
3707 // method will not be invoked directly. 3707 // method will not be invoked directly.
3708 // Instead, a closure that will invoke [main] is 3708 // Instead, a closure that will invoke [main] is
3709 // passed to [dartMainRunner]. 3709 // passed to [dartMainRunner].
3710 """; 3710 """;
OLDNEW
« no previous file with comments | « sdk/lib/_collection_dev/iterable.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698