| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index e3613ab84f356e3d189391c67a0058ab4b9c8af3..09c7d80e393217e4d7d7d19712af352a7e65dd45 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -151,6 +151,7 @@ class LChunkBuilder;
|
| V(StoreNamedField) \
|
| V(StoreNamedGeneric) \
|
| V(StringCharCodeAt) \
|
| + V(StringCharFromCode) \
|
| V(StringLength) \
|
| V(Sub) \
|
| V(Test) \
|
| @@ -2563,6 +2564,16 @@ class HMod: public HArithmeticBinaryOperation {
|
| SetFlag(kCanBeDivByZero);
|
| }
|
|
|
| + bool HasPowerOf2Divisor() {
|
| + if (right()->IsConstant() &&
|
| + HConstant::cast(right())->HasInteger32Value()) {
|
| + int32_t value = HConstant::cast(right())->Integer32Value();
|
| + return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value));
|
| + }
|
| +
|
| + return false;
|
| + }
|
| +
|
| virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Mod, "mod")
|
| @@ -3254,6 +3265,23 @@ class HStringCharCodeAt: public HBinaryOperation {
|
| };
|
|
|
|
|
| +class HStringCharFromCode: public HUnaryOperation {
|
| + public:
|
| + explicit HStringCharFromCode(HValue* char_code) : HUnaryOperation(char_code) {
|
| + set_representation(Representation::Tagged());
|
| + SetFlag(kUseGVN);
|
| + }
|
| +
|
| + virtual Representation RequiredInputRepresentation(int index) const {
|
| + return Representation::Integer32();
|
| + }
|
| +
|
| + virtual bool DataEquals(HValue* other) { return true; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string_char_from_code")
|
| +};
|
| +
|
| +
|
| class HStringLength: public HUnaryOperation {
|
| public:
|
| explicit HStringLength(HValue* string) : HUnaryOperation(string) {
|
|
|