Revision: 23355
Author:   [email protected]
Date:     Mon Aug 25 13:09:02 2014 UTC
Log:      Encode CEntryStub properties in the minor key.

Eventually, all stubs should encode its properties in the minor key
so that stubs can be restored directly from the stub key.

[email protected]

Review URL: https://codereview.chromium.org/502713003
https://code.google.com/p/v8/source/detail?r=23355

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/arm/code-stubs-arm.h
 /branches/bleeding_edge/src/arm64/code-stubs-arm64.cc
 /branches/bleeding_edge/src/arm64/code-stubs-arm64.h
 /branches/bleeding_edge/src/code-stubs.cc
 /branches/bleeding_edge/src/code-stubs.h
 /branches/bleeding_edge/src/codegen.cc
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.h
 /branches/bleeding_edge/src/mips/code-stubs-mips.cc
 /branches/bleeding_edge/src/mips/code-stubs-mips.h
 /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc
 /branches/bleeding_edge/src/mips64/code-stubs-mips64.h
 /branches/bleeding_edge/src/x64/code-stubs-x64.cc
 /branches/bleeding_edge/src/x64/code-stubs-x64.h
 /branches/bleeding_edge/src/x87/code-stubs-x87.cc
 /branches/bleeding_edge/src/x87/code-stubs-x87.h

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Mon Aug 25 11:17:37 2014 UTC +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Mon Aug 25 13:09:02 2014 UTC
@@ -425,7 +425,7 @@
   class OpBits: public BitField<Token::Value, 2, 14> {};

   Major MajorKey() const { return ConvertToDouble; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 16 bit value.
     return  result1_.code() +
            (result2_.code() << 4) +
@@ -1392,7 +1392,7 @@

   // Enter the exit frame that transitions from JavaScript to C++.
   FrameScope scope(masm, StackFrame::MANUAL);
-  __ EnterExitFrame(save_doubles_);
+  __ EnterExitFrame(save_doubles());

   // Store a copy of argc in callee-saved registers for later.
   __ mov(r4, Operand(r0));
@@ -1476,7 +1476,7 @@
   // sp: stack pointer
   // fp: frame pointer
   // Callee-saved register r4 still holds argc.
-  __ LeaveExitFrame(save_doubles_, r4, true);
+  __ LeaveExitFrame(save_doubles(), r4, true);
   __ mov(pc, lr);

   // Handling of exception.
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.h Fri Aug 22 11:43:39 2014 UTC +++ /branches/bleeding_edge/src/arm/code-stubs-arm.h Mon Aug 25 13:09:02 2014 UTC
@@ -28,7 +28,7 @@
   SaveFPRegsMode save_doubles_;

   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
 };


@@ -69,7 +69,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -100,7 +100,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
@@ -140,7 +140,7 @@
   class ScratchRegisterBits: public BitField<int, 8, 4> {};

   Major MajorKey() const { return WriteInt32ToHeapNumber; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 16 bit value.
     return IntRegisterBits::encode(the_int_.code())
            | HeapNumberRegisterBits::encode(the_heap_number_.code())
@@ -307,7 +307,7 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ObjectBits::encode(object_.code()) |
         ValueBits::encode(value_.code()) |
         AddressBits::encode(address_.code()) |
@@ -348,7 +348,7 @@

  private:
   Major MajorKey() const { return DirectCEntry; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   bool NeedsImmovableCode() { return true; }
 };
@@ -395,7 +395,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const { return LookupModeBits::encode(mode_); }
+  uint32_t MinorKey() const { return LookupModeBits::encode(mode_); }

   class LookupModeBits: public BitField<LookupMode, 0, 1> {};

=======================================
--- /branches/bleeding_edge/src/arm64/code-stubs-arm64.cc Mon Aug 25 11:17:37 2014 UTC +++ /branches/bleeding_edge/src/arm64/code-stubs-arm64.cc Mon Aug 25 13:09:02 2014 UTC
@@ -1377,7 +1377,7 @@
// Enter the exit frame. Reserve three slots to preserve x21-x23 callee-saved
   // registers.
   FrameScope scope(masm, StackFrame::MANUAL);
-  __ EnterExitFrame(save_doubles_, x10, 3);
+  __ EnterExitFrame(save_doubles(), x10, 3);
   DCHECK(csp.Is(__ StackPointer()));

   // Poke callee-saved registers into reserved space.
@@ -1474,7 +1474,7 @@
   __ Peek(argc, 2 * kPointerSize);
   __ Peek(target, 3 * kPointerSize);

-  __ LeaveExitFrame(save_doubles_, x10, true);
+  __ LeaveExitFrame(save_doubles(), x10, true);
   DCHECK(jssp.Is(__ StackPointer()));
   // Pop or drop the remaining stack slots and return from the stub.
// jssp[24]: Arguments array (of size argc), including receiver.
=======================================
--- /branches/bleeding_edge/src/arm64/code-stubs-arm64.h Fri Aug 22 11:43:39 2014 UTC +++ /branches/bleeding_edge/src/arm64/code-stubs-arm64.h Mon Aug 25 13:09:02 2014 UTC
@@ -28,7 +28,7 @@
   SaveFPRegsMode save_doubles_;

   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
 };


@@ -63,7 +63,7 @@
   static void GenerateAheadOfTime(Isolate* isolate);
  private:
   Major MajorKey() const { return StoreRegistersState; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -77,7 +77,7 @@
   static void GenerateAheadOfTime(Isolate* isolate);
  private:
   Major MajorKey() const { return RestoreRegistersState; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -303,16 +303,14 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return MinorKeyFor(object_, value_, address_, remembered_set_action_,
                        save_fp_regs_mode_);
   }

-  static int MinorKeyFor(Register object,
-                         Register value,
-                         Register address,
-                         RememberedSetAction action,
-                         SaveFPRegsMode fp_mode) {
+ static uint32_t MinorKeyFor(Register object, Register value, Register address,
+                              RememberedSetAction action,
+                              SaveFPRegsMode fp_mode) {
     DCHECK(object.Is64Bits());
     DCHECK(value.Is64Bits());
     DCHECK(address.Is64Bits());
@@ -353,7 +351,7 @@

  private:
   Major MajorKey() const { return DirectCEntry; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   bool NeedsImmovableCode() { return true; }
 };
@@ -400,7 +398,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const { return LookupModeBits::encode(mode_); }
+  uint32_t MinorKey() const { return LookupModeBits::encode(mode_); }

   class LookupModeBits: public BitField<LookupMode, 0, 1> {};

@@ -414,7 +412,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -444,7 +442,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc   Mon Aug 25 11:20:43 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.cc   Mon Aug 25 13:09:02 2014 UTC
@@ -380,7 +380,7 @@
 }


-int ICCompareStub::MinorKey() const {
+uint32_t ICCompareStub::MinorKey() const {
   return OpField::encode(op_ - Token::EQ) |
          LeftStateField::encode(left_) |
          RightStateField::encode(right_) |
=======================================
--- /branches/bleeding_edge/src/code-stubs.h    Fri Aug 22 11:43:39 2014 UTC
+++ /branches/bleeding_edge/src/code-stubs.h    Mon Aug 25 13:09:02 2014 UTC
@@ -150,7 +150,7 @@
   static Major MajorKeyFromKey(uint32_t key) {
     return static_cast<Major>(MajorKeyBits::decode(key));
   }
-  static int MinorKeyFromKey(uint32_t key) {
+  static uint32_t MinorKeyFromKey(uint32_t key) {
     return MinorKeyBits::decode(key);
   }

@@ -163,7 +163,7 @@

   static const char* MajorName(Major major_key, bool allow_unknown_keys);

-  explicit CodeStub(Isolate* isolate) : isolate_(isolate) { }
+  explicit CodeStub(Isolate* isolate) : minor_key_(0), isolate_(isolate) {}
   virtual ~CodeStub() {}

   static void GenerateStubsAheadOfTime(Isolate* isolate);
@@ -182,7 +182,7 @@

   // Returns information for computing the number key.
   virtual Major MajorKey() const = 0;
-  virtual int MinorKey() const = 0;
+  virtual uint32_t MinorKey() const { return minor_key_; }

   virtual InlineCacheState GetICState() const { return UNINITIALIZED; }
   virtual ExtraICState GetExtraICState() const { return kNoExtraICState; }
@@ -214,6 +214,8 @@
     DCHECK(static_cast<int>(MajorKey()) < NUMBER_OF_IDS);
return MinorKeyBits::encode(MinorKey()) | MajorKeyBits::encode(MajorKey());
   }
+
+  uint32_t minor_key_;

  private:
   // Perform bookkeeping required after code generation when stub code is
@@ -476,7 +478,7 @@
   class IsMissBits: public BitField<bool, kStubMinorKeyBits - 1, 1> {};

   void GenerateLightweightMiss(MacroAssembler* masm);
-  virtual int MinorKey() const {
+  virtual uint32_t MinorKey() const {
     return IsMissBits::encode(is_uninitialized_) |
         MinorKeyBits::encode(NotMissMinorKey());
   }
@@ -753,7 +755,7 @@

  private:
   Major MajorKey() const { return Instanceof; }
-  int MinorKey() const { return static_cast<int>(flags_); }
+  uint32_t MinorKey() const { return static_cast<int>(flags_); }

   bool HasArgsInRegisters() const {
     return (flags_ & kArgsInRegisters) != 0;
@@ -794,7 +796,7 @@
   virtual void PrintName(OStream& os) const V8_OVERRIDE;  // NOLINT

   virtual CodeStub::Major MajorKey() const { return ArrayConstructor; }
-  virtual int MinorKey() const { return argument_count_; }
+  virtual uint32_t MinorKey() const { return argument_count_; }

   ArgumentCountKey argument_count_;
 };
@@ -808,7 +810,7 @@

  private:
virtual CodeStub::Major MajorKey() const { return InternalArrayConstructor; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }

   void GenerateCase(MacroAssembler* masm, ElementsKind kind);
 };
@@ -824,7 +826,7 @@

  private:
   virtual CodeStub::Major MajorKey() const { return MathPow; }
-  virtual int MinorKey() const { return exponent_type_; }
+  virtual uint32_t MinorKey() const { return exponent_type_; }

   ExponentType exponent_type_;
 };
@@ -857,7 +859,7 @@
   }

  protected:
-  virtual int MinorKey() const { return GetExtraICState(); }
+  virtual uint32_t MinorKey() const { return GetExtraICState(); }
   virtual void PrintState(OStream& os) const V8_OVERRIDE;  // NOLINT

   virtual CodeStub::Major MajorKey() const { return CallIC; }
@@ -897,7 +899,7 @@

  private:
   virtual CodeStub::Major MajorKey() const { return FunctionPrototype; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
 };


@@ -1083,7 +1085,7 @@
  private:
   virtual void Generate(MacroAssembler* masm) V8_OVERRIDE;
   virtual Major MajorKey() const V8_OVERRIDE { return CallApiFunction; }
-  virtual int MinorKey() const V8_OVERRIDE { return bit_field_; }
+  virtual uint32_t MinorKey() const V8_OVERRIDE { return bit_field_; }

   class IsStoreBits: public BitField<bool, 0, 1> {};
   class CallDataUndefinedBits: public BitField<bool, 1, 1> {};
@@ -1102,7 +1104,7 @@
  private:
   virtual void Generate(MacroAssembler* masm) V8_OVERRIDE;
   virtual Major MajorKey() const V8_OVERRIDE { return CallApiGetter; }
-  virtual int MinorKey() const V8_OVERRIDE { return 0; }
+  virtual uint32_t MinorKey() const V8_OVERRIDE { return 0; }

   DISALLOW_COPY_AND_ASSIGN(CallApiGetterStub);
 };
@@ -1196,7 +1198,7 @@
   virtual Major MajorKey() const V8_OVERRIDE {
     return BinaryOpICWithAllocationSite;
   }
-  virtual int MinorKey() const V8_OVERRIDE { return GetExtraICState(); }
+ virtual uint32_t MinorKey() const V8_OVERRIDE { return GetExtraICState(); }

  private:
   static void GenerateAheadOfTime(Isolate* isolate,
@@ -1327,7 +1329,7 @@
   class HandlerStateField: public BitField<int, 11, 4> { };

   virtual CodeStub::Major MajorKey() const { return CompareIC; }
-  virtual int MinorKey() const;
+  virtual uint32_t MinorKey() const;

   virtual Code::Kind GetCodeKind() const { return Code::COMPARE_IC; }

@@ -1460,12 +1462,15 @@

 class CEntryStub : public PlatformCodeStub {
  public:
-  CEntryStub(Isolate* isolate,
-             int result_size,
+  CEntryStub(Isolate* isolate, int result_size,
              SaveFPRegsMode save_doubles = kDontSaveFPRegs)
-      : PlatformCodeStub(isolate),
-        result_size_(result_size),
-        save_doubles_(save_doubles) { }
+      : PlatformCodeStub(isolate) {
+    minor_key_ = SaveDoublesBits::encode(save_doubles == kSaveFPRegs);
+    DCHECK(result_size == 1 || result_size == 2);
+#ifdef _WIN64
+    minor_key_ = ResultSizeBits::update(minor_key_, result_size);
+#endif  // _WIN64
+  }

   void Generate(MacroAssembler* masm);

@@ -1476,14 +1481,17 @@
   static void GenerateAheadOfTime(Isolate* isolate);

  private:
-  // Number of pointers/values returned.
-  const int result_size_;
-  SaveFPRegsMode save_doubles_;
+  Major MajorKey() const { return CEntry; }

-  Major MajorKey() const { return CEntry; }
-  int MinorKey() const;
+  bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
+#ifdef _WIN64
+  int result_size() const { ResultSizeBits::decode(minor_key_); }
+#endif  // _WIN64

   bool NeedsImmovableCode();
+
+  class SaveDoublesBits : public BitField<bool, 0, 1> {};
+  class ResultSizeBits : public BitField<int, 3, 1> {};
 };


@@ -1498,7 +1506,7 @@

  private:
   Major MajorKey() const { return JSEntry; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   virtual void FinishCode(Handle<Code> code);

@@ -1513,7 +1521,7 @@
   void Generate(MacroAssembler* masm) { GenerateBody(masm, true); }

  private:
-  int MinorKey() const { return 1; }
+  uint32_t MinorKey() const { return 1; }

   virtual void PrintName(OStream& os) const V8_OVERRIDE {  // NOLINT
     os << "JSConstructEntryStub";
@@ -1537,7 +1545,7 @@
   Type type_;

   Major MajorKey() const { return ArgumentsAccess; }
-  int MinorKey() const { return type_; }
+  uint32_t MinorKey() const { return type_; }

   void Generate(MacroAssembler* masm);
   void GenerateReadElement(MacroAssembler* masm);
@@ -1555,7 +1563,7 @@

  private:
   Major MajorKey() const { return RegExpExec; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -1615,7 +1623,7 @@
   STATIC_ASSERT(Code::kArgumentsBits + 2 <= kStubMinorKeyBits);

   Major MajorKey() const { return CallFunction; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 32 bit value.
     return FlagBits::encode(flags_) | ArgcBits::encode(argc_);
   }
@@ -1650,7 +1658,7 @@
   virtual void PrintName(OStream& os) const V8_OVERRIDE;  // NOLINT

   Major MajorKey() const { return CallConstruct; }
-  int MinorKey() const { return flags_; }
+  uint32_t MinorKey() const { return flags_; }

   bool RecordCallTarget() const {
     return (flags_ & RECORD_CONSTRUCTOR_TARGET) != 0;
@@ -1859,7 +1867,7 @@

  private:
   Major MajorKey() const { return LoadElement; }
-  int MinorKey() const { return DICTIONARY_ELEMENTS; }
+  uint32_t MinorKey() const { return DICTIONARY_ELEMENTS; }

   DISALLOW_COPY_AND_ASSIGN(LoadDictionaryElementPlatformStub);
 };
@@ -1946,7 +1954,7 @@
public BitField<int, 2 * kBitsPerRegisterNumber + 5, 1> {}; // NOLINT

   Major MajorKey() const { return DoubleToI; }
-  int MinorKey() const { return bit_field_; }
+  uint32_t MinorKey() const { return bit_field_; }

   int bit_field_;

@@ -2282,7 +2290,7 @@
         store_mode_(store_mode) {}

   Major MajorKey() const { return StoreElement; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ElementsKindBits::encode(elements_kind_) |
         IsJSArrayBits::encode(is_js_array_) |
         StoreModeBits::encode(store_mode_);
@@ -2472,7 +2480,7 @@

  private:
   Major MajorKey() const { return StoreArrayLiteralElement; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);

@@ -2492,7 +2500,9 @@
   class FunctionModeField: public BitField<StubFunctionMode,    0, 1> {};

   Major MajorKey() const { return StubFailureTrampoline; }
- int MinorKey() const { return FunctionModeField::encode(function_mode_); }
+  uint32_t MinorKey() const {
+    return FunctionModeField::encode(function_mode_);
+  }

   void Generate(MacroAssembler* masm);

@@ -2518,7 +2528,7 @@
                                   Isolate* isolate);

   Major MajorKey() const { return ProfileEntryHook; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);

=======================================
--- /branches/bleeding_edge/src/codegen.cc      Fri Aug 22 11:43:39 2014 UTC
+++ /branches/bleeding_edge/src/codegen.cc      Mon Aug 25 13:09:02 2014 UTC
@@ -251,17 +251,5 @@
       break;
   }
 }
-
-
-int CEntryStub::MinorKey() const {
-  int result = (save_doubles_ == kSaveFPRegs) ? 1 : 0;
-  DCHECK(result_size_ == 1 || result_size_ == 2);
-#ifdef _WIN64
-  return result | ((result_size_ == 1) ? 0 : 2);
-#else
-  return result;
-#endif
-}
-

 } }  // namespace v8::internal
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Mon Aug 25 11:17:37 2014 UTC +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Mon Aug 25 13:09:02 2014 UTC
@@ -2557,7 +2557,7 @@
   ProfileEntryHookStub::MaybeCallEntryHook(masm);

   // Enter the exit frame that transitions from JavaScript to C++.
-  __ EnterExitFrame(save_doubles_ == kSaveFPRegs);
+  __ EnterExitFrame(save_doubles());

   // ebx: pointer to C function  (C callee-saved)
   // ebp: frame pointer  (restored after C call)
@@ -2565,7 +2565,7 @@
   // edi: number of arguments including receiver  (C callee-saved)
   // esi: pointer to the first argument (C callee-saved)

-  // Result returned in eax, or eax+edx if result_size_ is 2.
+  // Result returned in eax, or eax+edx if result size is 2.

   // Check stack alignment.
   if (FLAG_debug_code) {
@@ -2613,7 +2613,7 @@
   }

   // Exit the JavaScript to C++ exit frame.
-  __ LeaveExitFrame(save_doubles_ == kSaveFPRegs);
+  __ LeaveExitFrame(save_doubles());
   __ ret(0);

   // Handling of exception.
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.h Fri Aug 22 11:43:39 2014 UTC +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.h Mon Aug 25 13:09:02 2014 UTC
@@ -30,7 +30,7 @@
   SaveFPRegsMode save_doubles_;

   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
 };


@@ -70,7 +70,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -98,7 +98,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(
@@ -157,7 +157,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return DictionaryBits::encode(dictionary_.code()) |
         ResultBits::encode(result_.code()) |
         IndexBits::encode(index_.code()) |
@@ -406,7 +406,7 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ObjectBits::encode(object_.code()) |
         ValueBits::encode(value_.code()) |
         AddressBits::encode(address_.code()) |
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Aug 25 09:09:25 2014 UTC +++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Aug 25 13:09:02 2014 UTC
@@ -407,7 +407,7 @@
   class OpBits: public BitField<Token::Value, 2, 14> {};

   Major MajorKey() const { return ConvertToDouble; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 16 bit value.
     return  result1_.code() +
            (result2_.code() << 4) +
@@ -1486,7 +1486,7 @@

   // Enter the exit frame that transitions from JavaScript to C++.
   FrameScope scope(masm, StackFrame::MANUAL);
-  __ EnterExitFrame(save_doubles_);
+  __ EnterExitFrame(save_doubles());

   // s0: number of arguments  including receiver (C callee-saved)
   // s1: pointer to first argument (C callee-saved)
@@ -1574,7 +1574,7 @@
   // sp: stack pointer
   // fp: frame pointer
   // s0: still holds argc (callee-saved).
-  __ LeaveExitFrame(save_doubles_, s0, true, EMIT_RETURN);
+  __ LeaveExitFrame(save_doubles(), s0, true, EMIT_RETURN);

   // Handling of exception.
   __ bind(&exception_returned);
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.h Mon Aug 25 09:09:25 2014 UTC +++ /branches/bleeding_edge/src/mips/code-stubs-mips.h Mon Aug 25 13:09:02 2014 UTC
@@ -29,7 +29,7 @@
   SaveFPRegsMode save_doubles_;

   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
 };


@@ -70,7 +70,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -84,7 +84,7 @@
   static void GenerateAheadOfTime(Isolate* isolate);
  private:
   Major MajorKey() const { return StoreRegistersState; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -97,7 +97,7 @@
   static void GenerateAheadOfTime(Isolate* isolate);
  private:
   Major MajorKey() const { return RestoreRegistersState; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -126,7 +126,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
@@ -176,7 +176,7 @@
   class SignRegisterBits: public BitField<int, 12, 4> {};

   Major MajorKey() const { return WriteInt32ToHeapNumber; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 16 bit value.
     return IntRegisterBits::encode(the_int_.code())
            | HeapNumberRegisterBits::encode(the_heap_number_.code())
@@ -348,7 +348,7 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ObjectBits::encode(object_.code()) |
         ValueBits::encode(value_.code()) |
         AddressBits::encode(address_.code()) |
@@ -389,7 +389,7 @@

  private:
   Major MajorKey() const { return DirectCEntry; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   bool NeedsImmovableCode() { return true; }
 };
@@ -436,7 +436,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const { return LookupModeBits::encode(mode_); }
+  uint32_t MinorKey() const { return LookupModeBits::encode(mode_); }

   class LookupModeBits: public BitField<LookupMode, 0, 1> {};

=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Mon Aug 25 09:09:25 2014 UTC +++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Mon Aug 25 13:09:02 2014 UTC
@@ -406,7 +406,7 @@
   class OpBits: public BitField<Token::Value, 2, 14> {};

   Major MajorKey() const { return ConvertToDouble; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 16 bit value.
     return  result1_.code() +
            (result2_.code() << 4) +
=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.h Mon Aug 25 09:09:25 2014 UTC +++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.h Mon Aug 25 13:09:02 2014 UTC
@@ -29,7 +29,7 @@
   SaveFPRegsMode save_doubles_;

   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
 };


@@ -69,7 +69,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -83,7 +83,7 @@
   static void GenerateAheadOfTime(Isolate* isolate);
  private:
   Major MajorKey() const { return StoreRegistersState; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -96,7 +96,7 @@
   static void GenerateAheadOfTime(Isolate* isolate);
  private:
   Major MajorKey() const { return RestoreRegistersState; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -125,7 +125,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
@@ -175,7 +175,7 @@
   class SignRegisterBits: public BitField<int, 12, 4> {};

   Major MajorKey() const { return WriteInt32ToHeapNumber; }
-  int MinorKey() const {
+  uint32_t MinorKey() const {
     // Encode the parameters in a unique 16 bit value.
     return IntRegisterBits::encode(the_int_.code())
            | HeapNumberRegisterBits::encode(the_heap_number_.code())
@@ -347,7 +347,7 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ObjectBits::encode(object_.code()) |
         ValueBits::encode(value_.code()) |
         AddressBits::encode(address_.code()) |
@@ -388,7 +388,7 @@

  private:
   Major MajorKey() const { return DirectCEntry; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   bool NeedsImmovableCode() { return true; }
 };
@@ -435,7 +435,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const { return LookupModeBits::encode(mode_); }
+  uint32_t MinorKey() const { return LookupModeBits::encode(mode_); }

   class LookupModeBits: public BitField<LookupMode, 0, 1> {};

=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Mon Aug 25 11:17:37 2014 UTC +++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Mon Aug 25 13:09:02 2014 UTC
@@ -2435,11 +2435,11 @@

   // Enter the exit frame that transitions from JavaScript to C++.
 #ifdef _WIN64
-  int arg_stack_space = (result_size_ < 2 ? 2 : 4);
-#else
+  int arg_stack_space = (result_size() < 2 ? 2 : 4);
+#else   // _WIN64
   int arg_stack_space = 0;
-#endif
-  __ EnterExitFrame(arg_stack_space, save_doubles_);
+#endif  // _WIN64
+  __ EnterExitFrame(arg_stack_space, save_doubles());

   // rbx: pointer to builtin function  (C callee-saved).
   // rbp: frame pointer of exit frame  (restored after C call).
@@ -2461,14 +2461,14 @@
   // Windows 64-bit ABI passes arguments in rcx, rdx, r8, r9.
   // Pass argv and argc as two parameters. The arguments object will
   // be created by stubs declared by DECLARE_RUNTIME_FUNCTION().
-  if (result_size_ < 2) {
+  if (result_size() < 2) {
     // Pass a pointer to the Arguments object as the first argument.
     // Return result in single register (rax).
     __ movp(rcx, r14);  // argc.
     __ movp(rdx, r15);  // argv.
     __ Move(r8, ExternalReference::isolate_address(isolate()));
   } else {
-    DCHECK_EQ(2, result_size_);
+    DCHECK_EQ(2, result_size());
     // Pass a pointer to the result location as the first argument.
     __ leap(rcx, StackSpaceOperand(2));
     // Pass a pointer to the Arguments object as the second argument.
@@ -2482,21 +2482,21 @@
   __ movp(rdi, r14);  // argc.
   __ movp(rsi, r15);  // argv.
   __ Move(rdx, ExternalReference::isolate_address(isolate()));
-#endif
+#endif  // _WIN64
   __ call(rbx);
   // Result is in rax - do not destroy this register!

 #ifdef _WIN64
   // If return value is on the stack, pop it to registers.
-  if (result_size_ > 1) {
-    DCHECK_EQ(2, result_size_);
+  if (result_size() > 1) {
+    DCHECK_EQ(2, result_size());
     // Read result values stored on stack. Result is stored
     // above the four argument mirror slots and the two
     // Arguments object slots.
     __ movq(rax, Operand(rsp, 6 * kRegisterSize));
     __ movq(rdx, Operand(rsp, 7 * kRegisterSize));
   }
-#endif
+#endif  // _WIN64

// Runtime functions should not return 'the hole'. Allowing it to escape may
   // lead to crashes in the IC code later.
@@ -2530,7 +2530,7 @@
   }

   // Exit the JavaScript to C++ exit frame.
-  __ LeaveExitFrame(save_doubles_);
+  __ LeaveExitFrame(save_doubles());
   __ ret(0);

   // Handling of exception.
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.h Fri Aug 22 11:43:39 2014 UTC +++ /branches/bleeding_edge/src/x64/code-stubs-x64.h Mon Aug 25 13:09:02 2014 UTC
@@ -27,7 +27,7 @@
   SaveFPRegsMode save_doubles_;

   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ uint32_t MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
 };


@@ -67,7 +67,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -96,7 +96,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(
@@ -158,7 +158,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return DictionaryBits::encode(dictionary_.code()) |
         ResultBits::encode(result_.code()) |
         IndexBits::encode(index_.code()) |
@@ -389,7 +389,7 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ObjectBits::encode(object_.code()) |
         ValueBits::encode(value_.code()) |
         AddressBits::encode(address_.code()) |
=======================================
--- /branches/bleeding_edge/src/x87/code-stubs-x87.cc Mon Aug 25 09:00:04 2014 UTC +++ /branches/bleeding_edge/src/x87/code-stubs-x87.cc Mon Aug 25 13:09:02 2014 UTC
@@ -2240,7 +2240,7 @@
   // edi: number of arguments including receiver  (C callee-saved)
   // esi: pointer to the first argument (C callee-saved)

-  // Result returned in eax, or eax+edx if result_size_ is 2.
+  // Result returned in eax, or eax+edx if result size is 2.

   // Check stack alignment.
   if (FLAG_debug_code) {
=======================================
--- /branches/bleeding_edge/src/x87/code-stubs-x87.h Mon Aug 25 09:00:04 2014 UTC +++ /branches/bleeding_edge/src/x87/code-stubs-x87.h Mon Aug 25 13:09:02 2014 UTC
@@ -28,7 +28,7 @@

  private:
   Major MajorKey() const { return StoreBufferOverflow; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }
 };


@@ -68,7 +68,7 @@

  private:
   Major MajorKey() const { return SubString; }
-  int MinorKey() const { return 0; }
+  uint32_t MinorKey() const { return 0; }

   void Generate(MacroAssembler* masm);
 };
@@ -96,7 +96,7 @@

  private:
   virtual Major MajorKey() const { return StringCompare; }
-  virtual int MinorKey() const { return 0; }
+  virtual uint32_t MinorKey() const { return 0; }
   virtual void Generate(MacroAssembler* masm);

   static void GenerateAsciiCharsCompareLoop(
@@ -155,7 +155,7 @@

   Major MajorKey() const { return NameDictionaryLookup; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return DictionaryBits::encode(dictionary_.code()) |
         ResultBits::encode(result_.code()) |
         IndexBits::encode(index_.code()) |
@@ -383,7 +383,7 @@

   Major MajorKey() const { return RecordWrite; }

-  int MinorKey() const {
+  uint32_t MinorKey() const {
     return ObjectBits::encode(object_.code()) |
         ValueBits::encode(value_.code()) |
         AddressBits::encode(address_.code()) |

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to