diff options
Diffstat (limited to 'deps/v8/src/codegen.h')
-rw-r--r-- | deps/v8/src/codegen.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/deps/v8/src/codegen.h b/deps/v8/src/codegen.h index 783bef00d1..74855fd5a3 100644 --- a/deps/v8/src/codegen.h +++ b/deps/v8/src/codegen.h @@ -461,11 +461,15 @@ class CompareStub: public CodeStub { CompareStub(Condition cc, bool strict, NaNInformation nan_info = kBothCouldBeNaN, - bool include_number_compare = true) : + bool include_number_compare = true, + Register lhs = no_reg, + Register rhs = no_reg) : cc_(cc), strict_(strict), never_nan_nan_(nan_info == kCantBothBeNaN), include_number_compare_(include_number_compare), + lhs_(lhs), + rhs_(rhs), name_(NULL) { } void Generate(MacroAssembler* masm); @@ -483,12 +487,19 @@ class CompareStub: public CodeStub { // comparison code is used when the number comparison has been inlined, and // the stub will be called if one of the operands is not a number. bool include_number_compare_; - - // Encoding of the minor key CCCCCCCCCCCCCCNS. + // Register holding the left hand side of the comparison if the stub gives + // a choice, no_reg otherwise. + Register lhs_; + // Register holding the right hand side of the comparison if the stub gives + // a choice, no_reg otherwise. + Register rhs_; + + // Encoding of the minor key CCCCCCCCCCCCRCNS. class StrictField: public BitField<bool, 0, 1> {}; class NeverNanNanField: public BitField<bool, 1, 1> {}; class IncludeNumberCompareField: public BitField<bool, 2, 1> {}; - class ConditionField: public BitField<int, 3, 13> {}; + class RegisterField: public BitField<bool, 3, 1> {}; + class ConditionField: public BitField<int, 4, 12> {}; Major MajorKey() { return Compare; } @@ -507,11 +518,17 @@ class CompareStub: public CodeStub { #ifdef DEBUG void Print() { PrintF("CompareStub (cc %d), (strict %s), " - "(never_nan_nan %s), (number_compare %s)\n", + "(never_nan_nan %s), (number_compare %s) ", static_cast<int>(cc_), strict_ ? "true" : "false", never_nan_nan_ ? "true" : "false", include_number_compare_ ? "included" : "not included"); + + if (!lhs_.is(no_reg) && !rhs_.is(no_reg)) { + PrintF("(lhs r%d), (rhs r%d)\n", lhs_.code(), rhs_.code()); + } else { + PrintF("\n"); + } } #endif }; |