| Index: src/codegen.h
|
| ===================================================================
|
| --- src/codegen.h (revision 5030)
|
| +++ src/codegen.h (working copy)
|
| @@ -75,6 +75,7 @@
|
|
|
| // Mode to overwrite BinaryExpression values.
|
| enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
|
| +enum UnaryOverwriteMode { UNARY_OVERWRITE, UNARY_NO_OVERWRITE };
|
|
|
| // Types of uncatchable exceptions.
|
| enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION };
|
| @@ -414,21 +415,33 @@
|
| };
|
|
|
|
|
| +enum NegativeZeroHandling {
|
| + kStrictNegativeZero,
|
| + kIgnoreNegativeZero
|
| +};
|
| +
|
| +
|
| class GenericUnaryOpStub : public CodeStub {
|
| public:
|
| - GenericUnaryOpStub(Token::Value op, bool overwrite)
|
| - : op_(op), overwrite_(overwrite) { }
|
| + GenericUnaryOpStub(Token::Value op,
|
| + UnaryOverwriteMode overwrite,
|
| + NegativeZeroHandling negative_zero = kStrictNegativeZero)
|
| + : op_(op), overwrite_(overwrite), negative_zero_(negative_zero) { }
|
|
|
| private:
|
| Token::Value op_;
|
| - bool overwrite_;
|
| + UnaryOverwriteMode overwrite_;
|
| + NegativeZeroHandling negative_zero_;
|
|
|
| - class OverwriteField: public BitField<int, 0, 1> {};
|
| - class OpField: public BitField<Token::Value, 1, kMinorBits - 1> {};
|
| + class OverwriteField: public BitField<UnaryOverwriteMode, 0, 1> {};
|
| + class NegativeZeroField: public BitField<NegativeZeroHandling, 1, 1> {};
|
| + class OpField: public BitField<Token::Value, 2, kMinorBits - 2> {};
|
|
|
| Major MajorKey() { return GenericUnaryOp; }
|
| int MinorKey() {
|
| - return OpField::encode(op_) | OverwriteField::encode(overwrite_);
|
| + return OpField::encode(op_) |
|
| + OverwriteField::encode(overwrite_) |
|
| + NegativeZeroField::encode(negative_zero_);
|
| }
|
|
|
| void Generate(MacroAssembler* masm);
|
|
|