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 {
class ModeBits: public BitField<OverwriteMode, 0, 2> {};
class OpBits: public BitField<Token::Value, 2, 14> {};
Major MajorKey() { return ConvertToDouble; }
int MinorKey() {
Major MajorKey() const { return ConvertToDouble; }
int MinorKey() const {
// Encode the parameters in a unique 16 bit value.
return result1_.code() +
(result2_.code() << 4) +
......
......@@ -28,8 +28,8 @@ class StoreBufferOverflowStub: public PlatformCodeStub {
private:
SaveFPRegsMode save_doubles_;
Major MajorKey() { return StoreBufferOverflow; }
int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
Major MajorKey() const { return StoreBufferOverflow; }
int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
};
......@@ -69,12 +69,13 @@ class SubStringStub: public PlatformCodeStub {
explicit SubStringStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
private:
Major MajorKey() { return SubString; }
int MinorKey() { return 0; }
Major MajorKey() const { return SubString; }
int MinorKey() const { return 0; }
void Generate(MacroAssembler* masm);
};
class StoreRegistersStateStub: public PlatformCodeStub {
public:
explicit StoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode with_fp)
......@@ -82,8 +83,8 @@ class StoreRegistersStateStub: public PlatformCodeStub {
static void GenerateAheadOfTime(Isolate* isolate);
private:
Major MajorKey() { return StoreRegistersState; }
int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
Major MajorKey() const { return StoreRegistersState; }
int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
SaveFPRegsMode save_doubles_;
void Generate(MacroAssembler* masm);
......@@ -96,8 +97,8 @@ class RestoreRegistersStateStub: public PlatformCodeStub {
static void GenerateAheadOfTime(Isolate* isolate);
private:
Major MajorKey() { return RestoreRegistersState; }
int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
Major MajorKey() const { return RestoreRegistersState; }
int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
SaveFPRegsMode save_doubles_;
void Generate(MacroAssembler* masm);
......@@ -126,8 +127,8 @@ class StringCompareStub: public PlatformCodeStub {
Register scratch3);
private:
virtual Major MajorKey() { return StringCompare; }
virtual int MinorKey() { return 0; }
virtual Major MajorKey() const { return StringCompare; }
virtual int MinorKey() const { return 0; }
virtual void Generate(MacroAssembler* masm);
static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm,
......@@ -176,8 +177,8 @@ class WriteInt32ToHeapNumberStub : public PlatformCodeStub {
class ScratchRegisterBits: public BitField<int, 8, 4> {};
class SignRegisterBits: public BitField<int, 12, 4> {};
Major MajorKey() { return WriteInt32ToHeapNumber; }
int MinorKey() {
Major MajorKey() const { return WriteInt32ToHeapNumber; }
int MinorKey() const {
// Encode the parameters in a unique 16 bit value.
return IntRegisterBits::encode(the_int_.code())
| HeapNumberRegisterBits::encode(the_heap_number_.code())
......@@ -347,9 +348,9 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
Major MajorKey() { return RecordWrite; }
Major MajorKey() const { return RecordWrite; }
int MinorKey() {
int MinorKey() const {
return ObjectBits::encode(object_.code()) |
ValueBits::encode(value_.code()) |
AddressBits::encode(address_.code()) |
......@@ -389,8 +390,8 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
Major MajorKey() { return DirectCEntry; }
int MinorKey() { return 0; }
Major MajorKey() const { return DirectCEntry; }
int MinorKey() const { return 0; }
bool NeedsImmovableCode() { return true; }
};
......@@ -435,11 +436,9 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
Major MajorKey() { return NameDictionaryLookup; }
Major MajorKey() const { return NameDictionaryLookup; }
int MinorKey() {
return LookupModeBits::encode(mode_);
}
int MinorKey() const { return LookupModeBits::encode(mode_); }
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