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

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

Issue 12540005: Mark test passing and fix bad merge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | tests/language/language.status » ('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 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1400
1401 void generateGetter(Element member, String fieldName, String accessorName, 1401 void generateGetter(Element member, String fieldName, String accessorName,
1402 ClassBuilder builder) { 1402 ClassBuilder builder) {
1403 String getterName = namer.getterNameFromAccessorName(accessorName); 1403 String getterName = namer.getterNameFromAccessorName(accessorName);
1404 String receiver = backend.isInterceptorClass(member.getEnclosingClass()) 1404 String receiver = backend.isInterceptorClass(member.getEnclosingClass())
1405 ? 'receiver' : 'this'; 1405 ? 'receiver' : 'this';
1406 List<String> args = backend.isInterceptedMethod(member) 1406 List<String> args = backend.isInterceptedMethod(member)
1407 ? ['receiver'] 1407 ? ['receiver']
1408 : []; 1408 : [];
1409 builder.addProperty(getterName, 1409 builder.addProperty(getterName,
1410 js.fun([], js.return_(js['this.$receiver.$fieldName']))); 1410 js.fun([], js.return_(js['$receiver.$fieldName'])));
1411 } 1411 }
1412 1412
1413 void generateSetter(Element member, String fieldName, String accessorName, 1413 void generateSetter(Element member, String fieldName, String accessorName,
1414 ClassBuilder builder) { 1414 ClassBuilder builder) {
1415 String setterName = namer.setterNameFromAccessorName(accessorName); 1415 String setterName = namer.setterNameFromAccessorName(accessorName);
1416 String receiver = backend.isInterceptorClass(member.getEnclosingClass()) 1416 String receiver = backend.isInterceptorClass(member.getEnclosingClass())
1417 ? 'receiver' : 'this'; 1417 ? 'receiver' : 'this';
1418 List<String> args = backend.isInterceptedMethod(member) 1418 List<String> args = backend.isInterceptedMethod(member)
1419 ? ['receiver', 'v'] 1419 ? ['receiver', 'v']
1420 : ['v']; 1420 : ['v'];
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 """; 3058 """;
3059 const String HOOKS_API_USAGE = """ 3059 const String HOOKS_API_USAGE = """
3060 // The code supports the following hooks: 3060 // The code supports the following hooks:
3061 // dartPrint(message) - if this function is defined it is called 3061 // dartPrint(message) - if this function is defined it is called
3062 // instead of the Dart [print] method. 3062 // instead of the Dart [print] method.
3063 // dartMainRunner(main) - if this function is defined, the Dart [main] 3063 // dartMainRunner(main) - if this function is defined, the Dart [main]
3064 // method will not be invoked directly. 3064 // method will not be invoked directly.
3065 // Instead, a closure that will invoke [main] is 3065 // Instead, a closure that will invoke [main] is
3066 // passed to [dartMainRunner]. 3066 // passed to [dartMainRunner].
3067 """; 3067 """;
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698