Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: src/arm/code-stubs-arm.h

Issue 542613003: Introduce code stub constructors for stub keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: define MajorKey inline Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.h » ('j') | test/cctest/test-code-stubs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.h
diff --git a/src/arm/code-stubs-arm.h b/src/arm/code-stubs-arm.h
index f6fb50af08a9378d63d86dbf94add036f92cba5b..90a922567d22de9323af076b99e34278d1028852 100644
--- a/src/arm/code-stubs-arm.h
+++ b/src/arm/code-stubs-arm.h
@@ -5,8 +5,6 @@
#ifndef V8_ARM_CODE_STUBS_ARM_H_
#define V8_ARM_CODE_STUBS_ARM_H_
-#include "src/code-stubs.h"
-
namespace v8 {
namespace internal {
@@ -27,7 +25,6 @@ class StringHelper : public AllStatic {
Register scratch,
String::Encoding encoding);
-
// Generate string hash.
static void GenerateHashInit(MacroAssembler* masm,
Register hash,
@@ -86,8 +83,6 @@ class WriteInt32ToHeapNumberStub : public PlatformCodeStub {
static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
private:
- virtual inline Major MajorKey() const FINAL OVERRIDE;
-
void Generate(MacroAssembler* masm);
Register the_int() const {
@@ -107,7 +102,7 @@ class WriteInt32ToHeapNumberStub : public PlatformCodeStub {
class HeapNumberRegisterBits: public BitField<int, 4, 4> {};
class ScratchRegisterBits: public BitField<int, 8, 4> {};
- DISALLOW_COPY_AND_ASSIGN(WriteInt32ToHeapNumberStub);
+ DEFINE_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub);
};
@@ -130,6 +125,9 @@ class RecordWriteStub: public PlatformCodeStub {
SaveFPRegsModeBits::encode(fp_mode);
}
+ RecordWriteStub(uint32_t key, Isolate* isolate)
+ : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {}
+
enum Mode {
STORE_BUFFER_ONLY,
INCREMENTAL,
@@ -257,7 +255,7 @@ class RecordWriteStub: public PlatformCodeStub {
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);
@@ -316,11 +314,9 @@ class DirectCEntryStub: public PlatformCodeStub {
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);
};
@@ -365,13 +361,11 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
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);
};
} } // namespace v8::internal
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.h » ('j') | test/cctest/test-code-stubs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698