| Index: src/hydrogen-instructions.h
|
| ===================================================================
|
| --- src/hydrogen-instructions.h (revision 7161)
|
| +++ src/hydrogen-instructions.h (working copy)
|
| @@ -151,6 +151,7 @@
|
| V(StoreNamedField) \
|
| V(StoreNamedGeneric) \
|
| V(StringCharCodeAt) \
|
| + V(StringCharFromCode) \
|
| V(StringLength) \
|
| V(Sub) \
|
| V(Test) \
|
| @@ -2567,6 +2568,16 @@
|
| 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")
|
| @@ -3258,6 +3269,23 @@
|
| };
|
|
|
|
|
| +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) {
|
|
|