OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 | 119 |
120 Assignment::Assignment(Token::Value op, | 120 Assignment::Assignment(Token::Value op, |
121 Expression* target, | 121 Expression* target, |
122 Expression* value, | 122 Expression* value, |
123 int pos) | 123 int pos) |
124 : op_(op), | 124 : op_(op), |
125 target_(target), | 125 target_(target), |
126 value_(value), | 126 value_(value), |
127 pos_(pos), | 127 pos_(pos), |
128 compound_bailout_id_(kNoNumber), | 128 binary_operation_(NULL), |
| 129 compound_load_id_(kNoNumber), |
| 130 assignment_id_(GetNextId()), |
129 block_start_(false), | 131 block_start_(false), |
130 block_end_(false), | 132 block_end_(false), |
131 is_monomorphic_(false), | 133 is_monomorphic_(false), |
132 receiver_types_(NULL) { | 134 receiver_types_(NULL) { |
133 ASSERT(Token::IsAssignmentOp(op)); | 135 ASSERT(Token::IsAssignmentOp(op)); |
134 binary_operation_ = is_compound() | |
135 ? new BinaryOperation(binary_op(), target, value, pos + 1) | |
136 : NULL; | |
137 if (is_compound()) { | 136 if (is_compound()) { |
138 compound_bailout_id_ = GetNextId(); | 137 binary_operation_ = |
| 138 new BinaryOperation(binary_op(), target, value, pos + 1); |
| 139 compound_load_id_ = GetNextId(); |
139 } | 140 } |
140 } | 141 } |
141 | 142 |
142 | 143 |
143 Token::Value Assignment::binary_op() const { | 144 Token::Value Assignment::binary_op() const { |
144 switch (op_) { | 145 switch (op_) { |
145 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; | 146 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; |
146 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; | 147 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; |
147 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; | 148 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; |
148 case Token::ASSIGN_SHL: return Token::SHL; | 149 case Token::ASSIGN_SHL: return Token::SHL; |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 | 1035 |
1035 CaseClause::CaseClause(Expression* label, | 1036 CaseClause::CaseClause(Expression* label, |
1036 ZoneList<Statement*>* statements, | 1037 ZoneList<Statement*>* statements, |
1037 int pos) | 1038 int pos) |
1038 : label_(label), | 1039 : label_(label), |
1039 statements_(statements), | 1040 statements_(statements), |
1040 position_(pos), | 1041 position_(pos), |
1041 compare_type_(NONE) {} | 1042 compare_type_(NONE) {} |
1042 | 1043 |
1043 } } // namespace v8::internal | 1044 } } // namespace v8::internal |
OLD | NEW |