Revision: 23721
Author: [email protected]
Date: Fri Sep 5 09:37:43 2014 UTC
Log: MIPS: Introduce code stub constructors for stub keys.
Port r23716 (9118048)
BUG=
[email protected]
Review URL: https://codereview.chromium.org/535373003
https://code.google.com/p/v8/source/detail?r=23721
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.h
/branches/bleeding_edge/src/mips64/code-stubs-mips64.h
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.h Thu Sep 4 15:25:19
2014 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.h Fri Sep 5 09:37:43
2014 UTC
@@ -5,9 +5,6 @@
#ifndef V8_MIPS_CODE_STUBS_ARM_H_
#define V8_MIPS_CODE_STUBS_ARM_H_
-#include "src/code-stubs.h"
-
-
namespace v8 {
namespace internal {
@@ -65,24 +62,25 @@
: PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
+
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
- uint32_t MinorKey() const { return 0; }
+ void Generate(MacroAssembler* masm);
- void Generate(MacroAssembler* masm);
+ DEFINE_CODE_STUB(StoreRegistersState, PlatformCodeStub);
};
+
class RestoreRegistersStateStub: public PlatformCodeStub {
public:
explicit RestoreRegistersStateStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
+
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
- uint32_t MinorKey() const { return 0; }
+ void Generate(MacroAssembler* masm);
- void Generate(MacroAssembler* masm);
+ DEFINE_CODE_STUB(RestoreRegistersState, PlatformCodeStub);
};
@@ -108,8 +106,6 @@
static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
Register the_int() const {
@@ -134,7 +130,7 @@
class ScratchRegisterBits: public BitField<int, 8, 4> {};
class SignRegisterBits: public BitField<int, 12, 4> {};
- DISALLOW_COPY_AND_ASSIGN(WriteInt32ToHeapNumberStub);
+ DEFINE_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub);
};
@@ -156,6 +152,9 @@
RememberedSetActionBits::encode(remembered_set_action) |
SaveFPRegsModeBits::encode(fp_mode);
}
+
+ RecordWriteStub(uint32_t key, Isolate* isolate)
+ : PlatformCodeStub(key, isolate), regs_(object(), address(),
value()) {}
enum Mode {
STORE_BUFFER_ONLY,
@@ -288,7 +287,7 @@
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- virtual inline Major MajorKey() const FINAL OVERRIDE;
+ virtual inline Major MajorKey() const FINAL OVERRIDE { return
RecordWrite; }
void Generate(MacroAssembler* masm);
void GenerateIncremental(MacroAssembler* masm, Mode mode);
@@ -347,11 +346,9 @@
void GenerateCall(MacroAssembler* masm, Register target);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
bool NeedsImmovableCode() { return true; }
- DISALLOW_COPY_AND_ASSIGN(DirectCEntryStub);
+ DEFINE_CODE_STUB(DirectCEntry, PlatformCodeStub);
};
@@ -396,13 +393,11 @@
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
LookupMode mode() const { return LookupModeBits::decode(minor_key_); }
class LookupModeBits: public BitField<LookupMode, 0, 1> {};
- DISALLOW_COPY_AND_ASSIGN(NameDictionaryLookupStub);
+ DEFINE_CODE_STUB(NameDictionaryLookup, PlatformCodeStub);
};
=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.h Thu Sep 4
15:25:19 2014 UTC
+++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.h Fri Sep 5
09:37:43 2014 UTC
@@ -5,9 +5,6 @@
#ifndef V8_MIPS_CODE_STUBS_ARM_H_
#define V8_MIPS_CODE_STUBS_ARM_H_
-#include "src/code-stubs.h"
-
-
namespace v8 {
namespace internal {
@@ -66,24 +63,25 @@
: PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
+
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
- uint32_t MinorKey() const { return 0; }
+ void Generate(MacroAssembler* masm);
- void Generate(MacroAssembler* masm);
+ DEFINE_CODE_STUB(StoreRegistersState, PlatformCodeStub);
};
+
class RestoreRegistersStateStub: public PlatformCodeStub {
public:
explicit RestoreRegistersStateStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
+
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
- uint32_t MinorKey() const { return 0; }
+ void Generate(MacroAssembler* masm);
- void Generate(MacroAssembler* masm);
+ DEFINE_CODE_STUB(RestoreRegistersState, PlatformCodeStub);
};
// This stub can convert a signed int32 to a heap number (double). It does
@@ -108,8 +106,6 @@
static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
Register the_int() const {
@@ -134,7 +130,7 @@
class ScratchRegisterBits: public BitField<int, 8, 4> {};
class SignRegisterBits: public BitField<int, 12, 4> {};
- DISALLOW_COPY_AND_ASSIGN(WriteInt32ToHeapNumberStub);
+ DEFINE_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub);
};
@@ -156,6 +152,9 @@
RememberedSetActionBits::encode(remembered_set_action) |
SaveFPRegsModeBits::encode(fp_mode);
}
+
+ RecordWriteStub(uint32_t key, Isolate* isolate)
+ : PlatformCodeStub(key, isolate), regs_(object(), address(),
value()) {}
enum Mode {
STORE_BUFFER_ONLY,
@@ -288,7 +287,7 @@
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
- virtual inline Major MajorKey() const FINAL OVERRIDE;
+ virtual inline Major MajorKey() const FINAL OVERRIDE { return
RecordWrite; }
void Generate(MacroAssembler* masm);
void GenerateIncremental(MacroAssembler* masm, Mode mode);
@@ -347,11 +346,9 @@
void GenerateCall(MacroAssembler* masm, Register target);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
bool NeedsImmovableCode() { return true; }
- DISALLOW_COPY_AND_ASSIGN(DirectCEntryStub);
+ DEFINE_CODE_STUB(DirectCEntry, PlatformCodeStub);
};
@@ -396,13 +393,11 @@
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
LookupMode mode() const { return LookupModeBits::decode(minor_key_); }
class LookupModeBits: public BitField<LookupMode, 0, 1> {};
- DISALLOW_COPY_AND_ASSIGN(NameDictionaryLookupStub);
+ DEFINE_CODE_STUB(NameDictionaryLookup, PlatformCodeStub);
};
--
--
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.