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 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1466 Expression* right() const { return right_; } | 1466 Expression* right() const { return right_; } |
1467 virtual int position() const { return pos_; } | 1467 virtual int position() const { return pos_; } |
1468 | 1468 |
1469 virtual bool IsInlineable() const; | 1469 virtual bool IsInlineable() const; |
1470 | 1470 |
1471 // Type feedback information. | 1471 // Type feedback information. |
1472 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 1472 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
1473 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } | 1473 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } |
1474 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } | 1474 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } |
1475 | 1475 |
| 1476 // Match special cases. |
| 1477 bool IsLiteralCompareTypeof(Expression** expr, Handle<String>* check); |
| 1478 bool IsLiteralCompareUndefined(Expression** expr); |
| 1479 |
1476 private: | 1480 private: |
1477 Token::Value op_; | 1481 Token::Value op_; |
1478 Expression* left_; | 1482 Expression* left_; |
1479 Expression* right_; | 1483 Expression* right_; |
1480 int pos_; | 1484 int pos_; |
1481 | 1485 |
1482 enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY }; | 1486 enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY }; |
1483 CompareTypeFeedback compare_type_; | 1487 CompareTypeFeedback compare_type_; |
1484 }; | 1488 }; |
1485 | 1489 |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 | 2139 |
2136 private: | 2140 private: |
2137 Isolate* isolate_; | 2141 Isolate* isolate_; |
2138 bool stack_overflow_; | 2142 bool stack_overflow_; |
2139 }; | 2143 }; |
2140 | 2144 |
2141 | 2145 |
2142 } } // namespace v8::internal | 2146 } } // namespace v8::internal |
2143 | 2147 |
2144 #endif // V8_AST_H_ | 2148 #endif // V8_AST_H_ |
OLD | NEW |