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

Side by Side Diff: pkg/compiler/lib/src/js_backend/codegen/codegen.dart

Issue 1250633002: Add operators test to source_mapping_test. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 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
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 library code_generator; 5 library code_generator;
6 6
7 import 'glue.dart'; 7 import 'glue.dart';
8 8
9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; 9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
10 import '../../tree_ir/tree_ir_nodes.dart' show BuiltinOperator; 10 import '../../tree_ir/tree_ir_nodes.dart' show BuiltinOperator;
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 <js.Expression>[name, internalName, kind, arguments, argumentNames]); 638 <js.Expression>[name, internalName, kind, arguments, argumentNames]);
639 } 639 }
640 640
641 @override 641 @override
642 js.Expression visitInterceptor(tree_ir.Interceptor node) { 642 js.Expression visitInterceptor(tree_ir.Interceptor node) {
643 glue.registerUseInterceptorInCodegen(); 643 glue.registerUseInterceptorInCodegen();
644 registry.registerSpecializedGetInterceptor(node.interceptedClasses); 644 registry.registerSpecializedGetInterceptor(node.interceptedClasses);
645 js.Name helperName = glue.getInterceptorName(node.interceptedClasses); 645 js.Name helperName = glue.getInterceptorName(node.interceptedClasses);
646 js.Expression globalHolder = glue.getInterceptorLibrary(); 646 js.Expression globalHolder = glue.getInterceptorLibrary();
647 return js.js('#.#(#)', 647 return js.js('#.#(#)',
648 [globalHolder, helperName, visitExpression(node.input)]); 648 [globalHolder, helperName, visitExpression(node.input)])
649 .withSourceInformation(node.sourceInformation);
karlklose 2015/07/22 09:06:48 Indentation.
Johnni Winther 2015/07/22 10:50:05 Done.
649 } 650 }
650 651
651 @override 652 @override
652 js.Expression visitGetField(tree_ir.GetField node) { 653 js.Expression visitGetField(tree_ir.GetField node) {
653 registry.registerFieldGetter(node.field); 654 registry.registerFieldGetter(node.field);
654 return new js.PropertyAccess( 655 return new js.PropertyAccess(
655 visitExpression(node.object), 656 visitExpression(node.object),
656 glue.instanceFieldPropertyName(node.field)); 657 glue.instanceFieldPropertyName(node.field));
657 } 658 }
658 659
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 return js.js("typeof # === 'number' && Math.floor(#) === #", args); 826 return js.js("typeof # === 'number' && Math.floor(#) === #", args);
826 } 827 }
827 } 828 }
828 829
829 visitFunctionExpression(tree_ir.FunctionExpression node) { 830 visitFunctionExpression(tree_ir.FunctionExpression node) {
830 // FunctionExpressions are currently unused. 831 // FunctionExpressions are currently unused.
831 // We might need them if we want to emit raw JS nested functions. 832 // We might need them if we want to emit raw JS nested functions.
832 throw 'FunctionExpressions should not be used'; 833 throw 'FunctionExpressions should not be used';
833 } 834 }
834 } 835 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698