MIPS: Start using OStreams.

Port r22179 (01402bc)

Original commit message:
Note that until everything is OStream-based, there are a few places
where we have to do some impedance matching. A few accessors had to be
const-corrected on the way.

BUG=
R=palfia@homejinni.com

Review URL: https://codereview.chromium.org/369873002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a0c10d11
...@@ -418,8 +418,8 @@ class ConvertToDoubleStub : public PlatformCodeStub { ...@@ -418,8 +418,8 @@ class ConvertToDoubleStub : public PlatformCodeStub {
class ModeBits: public BitField<OverwriteMode, 0, 2> {}; class ModeBits: public BitField<OverwriteMode, 0, 2> {};
class OpBits: public BitField<Token::Value, 2, 14> {}; class OpBits: public BitField<Token::Value, 2, 14> {};
Major MajorKey() { return ConvertToDouble; } Major MajorKey() const { return ConvertToDouble; }
int MinorKey() { int MinorKey() const {
// Encode the parameters in a unique 16 bit value. // Encode the parameters in a unique 16 bit value.
return result1_.code() + return result1_.code() +
(result2_.code() << 4) + (result2_.code() << 4) +
......
...@@ -28,8 +28,8 @@ class StoreBufferOverflowStub: public PlatformCodeStub { ...@@ -28,8 +28,8 @@ class StoreBufferOverflowStub: public PlatformCodeStub {
private: private:
SaveFPRegsMode save_doubles_; SaveFPRegsMode save_doubles_;
Major MajorKey() { return StoreBufferOverflow; } Major MajorKey() const { return StoreBufferOverflow; }
int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
}; };
...@@ -69,12 +69,13 @@ class SubStringStub: public PlatformCodeStub { ...@@ -69,12 +69,13 @@ class SubStringStub: public PlatformCodeStub {
explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {} explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
private: private:
Major MajorKey() { return SubString; } Major MajorKey() const { return SubString; }
int MinorKey() { return 0; } int MinorKey() const { return 0; }
void Generate(MacroAssembler* masm); void Generate(MacroAssembler* masm);
}; };
class StoreRegistersStateStub: public PlatformCodeStub { class StoreRegistersStateStub: public PlatformCodeStub {
public: public:
explicit StoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode with_fp) explicit StoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode with_fp)
...@@ -82,8 +83,8 @@ class StoreRegistersStateStub: public PlatformCodeStub { ...@@ -82,8 +83,8 @@ class StoreRegistersStateStub: public PlatformCodeStub {
static void GenerateAheadOfTime(Isolate* isolate); static void GenerateAheadOfTime(Isolate* isolate);
private: private:
Major MajorKey() { return StoreRegistersState; } Major MajorKey() const { return StoreRegistersState; }
int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
SaveFPRegsMode save_doubles_; SaveFPRegsMode save_doubles_;
void Generate(MacroAssembler* masm); void Generate(MacroAssembler* masm);
...@@ -96,8 +97,8 @@ class RestoreRegistersStateStub: public PlatformCodeStub { ...@@ -96,8 +97,8 @@ class RestoreRegistersStateStub: public PlatformCodeStub {
static void GenerateAheadOfTime(Isolate* isolate); static void GenerateAheadOfTime(Isolate* isolate);
private: private:
Major MajorKey() { return RestoreRegistersState; } Major MajorKey() const { return RestoreRegistersState; }
int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
SaveFPRegsMode save_doubles_; SaveFPRegsMode save_doubles_;
void Generate(MacroAssembler* masm); void Generate(MacroAssembler* masm);
...@@ -126,8 +127,8 @@ class StringCompareStub: public PlatformCodeStub { ...@@ -126,8 +127,8 @@ class StringCompareStub: public PlatformCodeStub {
Register scratch3); Register scratch3);
private: private:
virtual Major MajorKey() { return StringCompare; } virtual Major MajorKey() const { return StringCompare; }
virtual int MinorKey() { return 0; } virtual int MinorKey() const { return 0; }
virtual void Generate(MacroAssembler* masm); virtual void Generate(MacroAssembler* masm);
static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm, static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
...@@ -176,8 +177,8 @@ class WriteInt32ToHeapNumberStub : public PlatformCodeStub { ...@@ -176,8 +177,8 @@ class WriteInt32ToHeapNumberStub : public PlatformCodeStub {
class ScratchRegisterBits: public BitField<int, 8, 4> {}; class ScratchRegisterBits: public BitField<int, 8, 4> {};
class SignRegisterBits: public BitField<int, 12, 4> {}; class SignRegisterBits: public BitField<int, 12, 4> {};
Major MajorKey() { return WriteInt32ToHeapNumber; } Major MajorKey() const { return WriteInt32ToHeapNumber; }
int MinorKey() { int MinorKey() const {
// Encode the parameters in a unique 16 bit value. // Encode the parameters in a unique 16 bit value.
return IntRegisterBits::encode(the_int_.code()) return IntRegisterBits::encode(the_int_.code())
| HeapNumberRegisterBits::encode(the_heap_number_.code()) | HeapNumberRegisterBits::encode(the_heap_number_.code())
...@@ -347,9 +348,9 @@ class RecordWriteStub: public PlatformCodeStub { ...@@ -347,9 +348,9 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode); Mode mode);
void InformIncrementalMarker(MacroAssembler* masm); void InformIncrementalMarker(MacroAssembler* masm);
Major MajorKey() { return RecordWrite; } Major MajorKey() const { return RecordWrite; }
int MinorKey() { int MinorKey() const {
return ObjectBits::encode(object_.code()) | return ObjectBits::encode(object_.code()) |
ValueBits::encode(value_.code()) | ValueBits::encode(value_.code()) |
AddressBits::encode(address_.code()) | AddressBits::encode(address_.code()) |
...@@ -389,8 +390,8 @@ class DirectCEntryStub: public PlatformCodeStub { ...@@ -389,8 +390,8 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target); void GenerateCall(MacroAssembler* masm, Register target);
private: private:
Major MajorKey() { return DirectCEntry; } Major MajorKey() const { return DirectCEntry; }
int MinorKey() { return 0; } int MinorKey() const { return 0; }
bool NeedsImmovableCode() { return true; } bool NeedsImmovableCode() { return true; }
}; };
...@@ -435,11 +436,9 @@ class NameDictionaryLookupStub: public PlatformCodeStub { ...@@ -435,11 +436,9 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
NameDictionary::kHeaderSize + NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize; NameDictionary::kElementsStartIndex * kPointerSize;
Major MajorKey() { return NameDictionaryLookup; } Major MajorKey() const { return NameDictionaryLookup; }
int MinorKey() { int MinorKey() const { return LookupModeBits::encode(mode_); }
return LookupModeBits::encode(mode_);
}
class LookupModeBits: public BitField<LookupMode, 0, 1> {}; class LookupModeBits: public BitField<LookupMode, 0, 1> {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment