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

Side by Side Diff: src/ast.cc

Issue 1592001: Simplify IA32 code generator API. (Closed)
Patch Set: Created 10 years, 8 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
« no previous file with comments | « src/ast.h ('k') | src/ia32/codegen-ia32.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 : Expression(other), 845 : Expression(other),
846 expression_(expression), 846 expression_(expression),
847 arguments_(arguments), 847 arguments_(arguments),
848 pos_(other->pos_) {} 848 pos_(other->pos_) {}
849 849
850 850
851 UnaryOperation::UnaryOperation(UnaryOperation* other, Expression* expression) 851 UnaryOperation::UnaryOperation(UnaryOperation* other, Expression* expression)
852 : Expression(other), op_(other->op_), expression_(expression) {} 852 : Expression(other), op_(other->op_), expression_(expression) {}
853 853
854 854
855 BinaryOperation::BinaryOperation(BinaryOperation* other, 855 BinaryOperation::BinaryOperation(Expression* other,
856 Token::Value op,
856 Expression* left, 857 Expression* left,
857 Expression* right) 858 Expression* right)
858 : Expression(other), 859 : Expression(other), op_(op), left_(left), right_(right) {}
859 op_(other->op_),
860 left_(left),
861 right_(right) {}
862 860
863 861
864 CountOperation::CountOperation(CountOperation* other, Expression* expression) 862 CountOperation::CountOperation(CountOperation* other, Expression* expression)
865 : Expression(other), 863 : Expression(other),
866 is_prefix_(other->is_prefix_), 864 is_prefix_(other->is_prefix_),
867 op_(other->op_), 865 op_(other->op_),
868 expression_(expression) {} 866 expression_(expression) {}
869 867
870 868
871 CompareOperation::CompareOperation(CompareOperation* other, 869 CompareOperation::CompareOperation(CompareOperation* other,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 1101
1104 1102
1105 void CopyAstVisitor::VisitCountOperation(CountOperation* expr) { 1103 void CopyAstVisitor::VisitCountOperation(CountOperation* expr) {
1106 expr_ = new CountOperation(expr, 1104 expr_ = new CountOperation(expr,
1107 DeepCopyExpr(expr->expression())); 1105 DeepCopyExpr(expr->expression()));
1108 } 1106 }
1109 1107
1110 1108
1111 void CopyAstVisitor::VisitBinaryOperation(BinaryOperation* expr) { 1109 void CopyAstVisitor::VisitBinaryOperation(BinaryOperation* expr) {
1112 expr_ = new BinaryOperation(expr, 1110 expr_ = new BinaryOperation(expr,
1111 expr->op(),
1113 DeepCopyExpr(expr->left()), 1112 DeepCopyExpr(expr->left()),
1114 DeepCopyExpr(expr->right())); 1113 DeepCopyExpr(expr->right()));
1115 } 1114 }
1116 1115
1117 1116
1118 void CopyAstVisitor::VisitCompareOperation(CompareOperation* expr) { 1117 void CopyAstVisitor::VisitCompareOperation(CompareOperation* expr) {
1119 expr_ = new CompareOperation(expr, 1118 expr_ = new CompareOperation(expr,
1120 DeepCopyExpr(expr->left()), 1119 DeepCopyExpr(expr->left()),
1121 DeepCopyExpr(expr->right())); 1120 DeepCopyExpr(expr->right()));
1122 } 1121 }
1123 1122
1124 1123
1125 void CopyAstVisitor::VisitThisFunction(ThisFunction* expr) { 1124 void CopyAstVisitor::VisitThisFunction(ThisFunction* expr) {
1126 SetStackOverflow(); 1125 SetStackOverflow();
1127 } 1126 }
1128 1127
1129 1128
1130 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { 1129 void CopyAstVisitor::VisitDeclaration(Declaration* decl) {
1131 UNREACHABLE(); 1130 UNREACHABLE();
1132 } 1131 }
1133 1132
1134 1133
1135 } } // namespace v8::internal 1134 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698