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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js/nodes.dart

Issue 12042003: Move relational operators to the new interceptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 js; 5 part of js;
6 6
7 abstract class NodeVisitor<T> { 7 abstract class NodeVisitor<T> {
8 T visitProgram(Program node); 8 T visitProgram(Program node);
9 9
10 T visitBlock(Block node); 10 T visitBlock(Block node);
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 int get precedenceLevel => PRIMARY; 859 int get precedenceLevel => PRIMARY;
860 } 860 }
861 861
862 Prefix typeOf(Expression argument) => new Prefix('typeof', argument); 862 Prefix typeOf(Expression argument) => new Prefix('typeof', argument);
863 863
864 Binary equals(Expression left, Expression right) { 864 Binary equals(Expression left, Expression right) {
865 return new Binary('==', left, right); 865 return new Binary('==', left, right);
866 } 866 }
867 867
868 Binary identity(Expression left, Expression right) {
kasperl 2013/01/21 09:45:11 At this level strictEquals is probably a better na
ngeoffray 2013/01/21 10:41:44 Done.
869 return new Binary('===', left, right);
870 }
871
868 LiteralString string(String value) => new LiteralString('"$value"'); 872 LiteralString string(String value) => new LiteralString('"$value"');
869 873
870 If if_(Expression condition, Node then, [Node otherwise]) { 874 If if_(Expression condition, Node then, [Node otherwise]) {
871 return (otherwise == null) 875 return (otherwise == null)
872 ? new If.noElse(condition, then) 876 ? new If.noElse(condition, then)
873 : new If(condition, then, otherwise); 877 : new If(condition, then, otherwise);
874 } 878 }
875 879
876 Return return_([Expression value]) => new Return(value); 880 Return return_([Expression value]) => new Return(value);
877 881
(...skipping 16 matching lines...) Expand all
894 Fun fun(List<String> parameterNames, Block body) { 898 Fun fun(List<String> parameterNames, Block body) {
895 return new Fun(parameterNames.mappedBy((n) => new Parameter(n)).toList(), 899 return new Fun(parameterNames.mappedBy((n) => new Parameter(n)).toList(),
896 body); 900 body);
897 } 901 }
898 902
899 Assignment assign(Expression leftHandSide, Expression value) { 903 Assignment assign(Expression leftHandSide, Expression value) {
900 return new Assignment(leftHandSide, value); 904 return new Assignment(leftHandSide, value);
901 } 905 }
902 906
903 Expression undefined() => new Prefix('void', new LiteralNumber('0')); 907 Expression undefined() => new Prefix('void', new LiteralNumber('0'));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698