summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/code-stubs-x64.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/x64/code-stubs-x64.h')
-rw-r--r--deps/v8/src/x64/code-stubs-x64.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/deps/v8/src/x64/code-stubs-x64.h b/deps/v8/src/x64/code-stubs-x64.h
index 2d6d21d0a..71fc5aba5 100644
--- a/deps/v8/src/x64/code-stubs-x64.h
+++ b/deps/v8/src/x64/code-stubs-x64.h
@@ -5,7 +5,7 @@
#ifndef V8_X64_CODE_STUBS_X64_H_
#define V8_X64_CODE_STUBS_X64_H_
-#include "ic-inl.h"
+#include "src/ic-inl.h"
namespace v8 {
namespace internal {
@@ -26,8 +26,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; }
};
@@ -36,11 +36,11 @@ class StringHelper : public AllStatic {
// Generate code for copying characters using the rep movs instruction.
// Copies rcx characters from rsi to rdi. Copying of overlapping regions is
// not supported.
- static void GenerateCopyCharactersREP(MacroAssembler* masm,
- Register dest, // Must be rdi.
- Register src, // Must be rsi.
- Register count, // Must be rcx.
- bool ascii);
+ static void GenerateCopyCharacters(MacroAssembler* masm,
+ Register dest,
+ Register src,
+ Register count,
+ String::Encoding encoding);
// Generate string hash.
@@ -66,8 +66,8 @@ 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);
};
@@ -95,8 +95,8 @@ class StringCompareStub: public PlatformCodeStub {
Register scratch2);
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(
@@ -156,9 +156,9 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
NameDictionary::kHeaderSize +
NameDictionary::kElementsStartIndex * kPointerSize;
- Major MajorKey() { return NameDictionaryLookup; }
+ Major MajorKey() const { return NameDictionaryLookup; }
- int MinorKey() {
+ int MinorKey() const {
return DictionaryBits::encode(dictionary_.code()) |
ResultBits::encode(result_.code()) |
IndexBits::encode(index_.code()) |
@@ -218,13 +218,13 @@ class RecordWriteStub: public PlatformCodeStub {
return INCREMENTAL;
}
- ASSERT(first_instruction == kTwoByteNopInstruction);
+ DCHECK(first_instruction == kTwoByteNopInstruction);
if (second_instruction == kFiveByteJumpInstruction) {
return INCREMENTAL_COMPACTION;
}
- ASSERT(second_instruction == kFiveByteNopInstruction);
+ DCHECK(second_instruction == kFiveByteNopInstruction);
return STORE_BUFFER_ONLY;
}
@@ -232,23 +232,23 @@ class RecordWriteStub: public PlatformCodeStub {
static void Patch(Code* stub, Mode mode) {
switch (mode) {
case STORE_BUFFER_ONLY:
- ASSERT(GetMode(stub) == INCREMENTAL ||
+ DCHECK(GetMode(stub) == INCREMENTAL ||
GetMode(stub) == INCREMENTAL_COMPACTION);
stub->instruction_start()[0] = kTwoByteNopInstruction;
stub->instruction_start()[2] = kFiveByteNopInstruction;
break;
case INCREMENTAL:
- ASSERT(GetMode(stub) == STORE_BUFFER_ONLY);
+ DCHECK(GetMode(stub) == STORE_BUFFER_ONLY);
stub->instruction_start()[0] = kTwoByteJumpInstruction;
break;
case INCREMENTAL_COMPACTION:
- ASSERT(GetMode(stub) == STORE_BUFFER_ONLY);
+ DCHECK(GetMode(stub) == STORE_BUFFER_ONLY);
stub->instruction_start()[0] = kTwoByteNopInstruction;
stub->instruction_start()[2] = kFiveByteJumpInstruction;
break;
}
- ASSERT(GetMode(stub) == mode);
- CPU::FlushICache(stub->instruction_start(), 7);
+ DCHECK(GetMode(stub) == mode);
+ CpuFeatures::FlushICache(stub->instruction_start(), 7);
}
private:
@@ -266,7 +266,7 @@ class RecordWriteStub: public PlatformCodeStub {
object_(object),
address_(address),
scratch0_(scratch0) {
- ASSERT(!AreAliased(scratch0, object, address, no_reg));
+ DCHECK(!AreAliased(scratch0, object, address, no_reg));
scratch1_ = GetRegThatIsNotRcxOr(object_, address_, scratch0_);
if (scratch0.is(rcx)) {
scratch0_ = GetRegThatIsNotRcxOr(object_, address_, scratch1_);
@@ -277,15 +277,15 @@ class RecordWriteStub: public PlatformCodeStub {
if (address.is(rcx)) {
address_ = GetRegThatIsNotRcxOr(object_, scratch0_, scratch1_);
}
- ASSERT(!AreAliased(scratch0_, object_, address_, rcx));
+ DCHECK(!AreAliased(scratch0_, object_, address_, rcx));
}
void Save(MacroAssembler* masm) {
- ASSERT(!address_orig_.is(object_));
- ASSERT(object_.is(object_orig_) || address_.is(address_orig_));
- ASSERT(!AreAliased(object_, address_, scratch1_, scratch0_));
- ASSERT(!AreAliased(object_orig_, address_, scratch1_, scratch0_));
- ASSERT(!AreAliased(object_, address_orig_, scratch1_, scratch0_));
+ DCHECK(!address_orig_.is(object_));
+ DCHECK(object_.is(object_orig_) || address_.is(address_orig_));
+ DCHECK(!AreAliased(object_, address_, scratch1_, scratch0_));
+ DCHECK(!AreAliased(object_orig_, address_, scratch1_, scratch0_));
+ DCHECK(!AreAliased(object_, address_orig_, scratch1_, scratch0_));
// We don't have to save scratch0_orig_ because it was given to us as
// a scratch register. But if we had to switch to a different reg then
// we should save the new scratch0_.
@@ -387,9 +387,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()) |