| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 Expression* left, | 1420 Expression* left, |
| 1421 Expression* right, | 1421 Expression* right, |
| 1422 int pos) | 1422 int pos) |
| 1423 : op_(op), left_(left), right_(right), pos_(pos) { | 1423 : op_(op), left_(left), right_(right), pos_(pos) { |
| 1424 ASSERT(Token::IsBinaryOp(op)); | 1424 ASSERT(Token::IsBinaryOp(op)); |
| 1425 right_id_ = (op == Token::AND || op == Token::OR) | 1425 right_id_ = (op == Token::AND || op == Token::OR) |
| 1426 ? static_cast<int>(GetNextId()) | 1426 ? static_cast<int>(GetNextId()) |
| 1427 : AstNode::kNoNumber; | 1427 : AstNode::kNoNumber; |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 // Create the binary operation corresponding to a compound assignment. | |
| 1431 explicit BinaryOperation(Assignment* assignment); | |
| 1432 | |
| 1433 DECLARE_NODE_TYPE(BinaryOperation) | 1430 DECLARE_NODE_TYPE(BinaryOperation) |
| 1434 | 1431 |
| 1435 virtual bool IsInlineable() const; | 1432 virtual bool IsInlineable() const; |
| 1436 | 1433 |
| 1437 virtual bool ResultOverwriteAllowed(); | 1434 virtual bool ResultOverwriteAllowed(); |
| 1438 | 1435 |
| 1439 Token::Value op() const { return op_; } | 1436 Token::Value op() const { return op_; } |
| 1440 Expression* left() const { return left_; } | 1437 Expression* left() const { return left_; } |
| 1441 Expression* right() const { return right_; } | 1438 Expression* right() const { return right_; } |
| 1442 virtual int position() const { return pos_; } | 1439 virtual int position() const { return pos_; } |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2180 | 2177 |
| 2181 private: | 2178 private: |
| 2182 Isolate* isolate_; | 2179 Isolate* isolate_; |
| 2183 bool stack_overflow_; | 2180 bool stack_overflow_; |
| 2184 }; | 2181 }; |
| 2185 | 2182 |
| 2186 | 2183 |
| 2187 } } // namespace v8::internal | 2184 } } // namespace v8::internal |
| 2188 | 2185 |
| 2189 #endif // V8_AST_H_ | 2186 #endif // V8_AST_H_ |
| OLD | NEW |