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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 // True if the expression is a loop condition. | 249 // True if the expression is a loop condition. |
250 bool is_loop_condition() const { | 250 bool is_loop_condition() const { |
251 return LoopConditionField::decode(bitfields_); | 251 return LoopConditionField::decode(bitfields_); |
252 } | 252 } |
253 void set_is_loop_condition(bool flag) { | 253 void set_is_loop_condition(bool flag) { |
254 bitfields_ = (bitfields_ & ~LoopConditionField::mask()) | | 254 bitfields_ = (bitfields_ & ~LoopConditionField::mask()) | |
255 LoopConditionField::encode(flag); | 255 LoopConditionField::encode(flag); |
256 } | 256 } |
257 | 257 |
| 258 // The value of the expression is guaranteed to be a smi, because the |
| 259 // top operation is a bit operation with a mask, or a shift. |
| 260 bool GuaranteedSmiResult(); |
| 261 |
258 // AST analysis results | 262 // AST analysis results |
259 | 263 |
260 // True if the expression rooted at this node can be compiled by the | 264 // True if the expression rooted at this node can be compiled by the |
261 // side-effect free compiler. | 265 // side-effect free compiler. |
262 bool side_effect_free() { return SideEffectFreeField::decode(bitfields_); } | 266 bool side_effect_free() { return SideEffectFreeField::decode(bitfields_); } |
263 void set_side_effect_free(bool is_side_effect_free) { | 267 void set_side_effect_free(bool is_side_effect_free) { |
264 bitfields_ &= ~SideEffectFreeField::mask(); | 268 bitfields_ &= ~SideEffectFreeField::mask(); |
265 bitfields_ |= SideEffectFreeField::encode(is_side_effect_free); | 269 bitfields_ |= SideEffectFreeField::encode(is_side_effect_free); |
266 } | 270 } |
267 | 271 |
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 | 2162 |
2159 // Holds the result of copying an expression. | 2163 // Holds the result of copying an expression. |
2160 Expression* expr_; | 2164 Expression* expr_; |
2161 // Holds the result of copying a statement. | 2165 // Holds the result of copying a statement. |
2162 Statement* stmt_; | 2166 Statement* stmt_; |
2163 }; | 2167 }; |
2164 | 2168 |
2165 } } // namespace v8::internal | 2169 } } // namespace v8::internal |
2166 | 2170 |
2167 #endif // V8_AST_H_ | 2171 #endif // V8_AST_H_ |
OLD | NEW |