Generation of our home-grown memmove doesn't depend on serializer state anymore.

The serializer state has to be per-Isolate, but at the point where we
generate our memmoves we don't really have an Isolate. Furthermore,
there was no fundamental reason why we shouldn't use our home-grown
memmove during mksnapshot time.

Perhaps we can totally remove our own memmove nowadays, but this would
be a separate CL.

BUG=359977
LOG=y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 972bfb0d
...@@ -79,14 +79,11 @@ UnaryMathFunction CreateExpFunction() { ...@@ -79,14 +79,11 @@ UnaryMathFunction CreateExpFunction() {
#if defined(V8_HOST_ARCH_ARM) #if defined(V8_HOST_ARCH_ARM)
OS::MemCopyUint8Function CreateMemCopyUint8Function( OS::MemCopyUint8Function CreateMemCopyUint8Function(
bool serializer_enabled,
OS::MemCopyUint8Function stub) { OS::MemCopyUint8Function stub) {
#if defined(USE_SIMULATOR) #if defined(USE_SIMULATOR)
return stub; return stub;
#else #else
if (serializer_enabled || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) { if (!CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) return stub;
return stub;
}
size_t actual_size; size_t actual_size;
byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true));
if (buffer == NULL) return stub; if (buffer == NULL) return stub;
...@@ -238,14 +235,11 @@ OS::MemCopyUint8Function CreateMemCopyUint8Function( ...@@ -238,14 +235,11 @@ OS::MemCopyUint8Function CreateMemCopyUint8Function(
// Convert 8 to 16. The number of character to copy must be at least 8. // Convert 8 to 16. The number of character to copy must be at least 8.
OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
bool serializer_enabled,
OS::MemCopyUint16Uint8Function stub) { OS::MemCopyUint16Uint8Function stub) {
#if defined(USE_SIMULATOR) #if defined(USE_SIMULATOR)
return stub; return stub;
#else #else
if (serializer_enabled || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) { if (!CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) return stub;
return stub;
}
size_t actual_size; size_t actual_size;
byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true)); byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true));
if (buffer == NULL) return stub; if (buffer == NULL) return stub;
......
...@@ -72,13 +72,10 @@ UnaryMathFunction CreateExpFunction() { ...@@ -72,13 +72,10 @@ UnaryMathFunction CreateExpFunction() {
#if defined(V8_HOST_ARCH_MIPS) #if defined(V8_HOST_ARCH_MIPS)
OS::MemCopyUint8Function CreateMemCopyUint8Function( OS::MemCopyUint8Function CreateMemCopyUint8Function(
bool serializer_enabled,
OS::MemCopyUint8Function stub) { OS::MemCopyUint8Function stub) {
#if defined(USE_SIMULATOR) #if defined(USE_SIMULATOR)
return stub; return stub;
#else #else
if (serializer_enabled) return stub;
size_t actual_size; size_t actual_size;
byte* buffer = static_cast<byte*>(OS::Allocate(3 * KB, &actual_size, true)); byte* buffer = static_cast<byte*>(OS::Allocate(3 * KB, &actual_size, true));
if (buffer == NULL) return stub; if (buffer == NULL) return stub;
......
...@@ -514,22 +514,19 @@ OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function = ...@@ -514,22 +514,19 @@ OS::MemCopyUint16Uint8Function OS::memcopy_uint16_uint8_function =
&OS::MemCopyUint16Uint8Wrapper; &OS::MemCopyUint16Uint8Wrapper;
// Defined in codegen-arm.cc. // Defined in codegen-arm.cc.
OS::MemCopyUint8Function CreateMemCopyUint8Function( OS::MemCopyUint8Function CreateMemCopyUint8Function(
bool serializer_enabled,
OS::MemCopyUint8Function stub); OS::MemCopyUint8Function stub);
OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function( OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
bool serializer_enabled,
OS::MemCopyUint16Uint8Function stub); OS::MemCopyUint16Uint8Function stub);
#elif defined(V8_HOST_ARCH_MIPS) #elif defined(V8_HOST_ARCH_MIPS)
OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper; OS::MemCopyUint8Function OS::memcopy_uint8_function = &OS::MemCopyUint8Wrapper;
// Defined in codegen-mips.cc. // Defined in codegen-mips.cc.
OS::MemCopyUint8Function CreateMemCopyUint8Function( OS::MemCopyUint8Function CreateMemCopyUint8Function(
bool serializer_enabled,
OS::MemCopyUint8Function stub); OS::MemCopyUint8Function stub);
#endif #endif
void OS::PostSetUp(bool serializer_enabled) { void OS::PostSetUp() {
#if V8_TARGET_ARCH_IA32 #if V8_TARGET_ARCH_IA32
OS::MemMoveFunction generated_memmove = CreateMemMoveFunction(); OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
if (generated_memmove != NULL) { if (generated_memmove != NULL) {
...@@ -537,13 +534,12 @@ void OS::PostSetUp(bool serializer_enabled) { ...@@ -537,13 +534,12 @@ void OS::PostSetUp(bool serializer_enabled) {
} }
#elif defined(V8_HOST_ARCH_ARM) #elif defined(V8_HOST_ARCH_ARM)
OS::memcopy_uint8_function = OS::memcopy_uint8_function =
CreateMemCopyUint8Function(serializer_enabled, &OS::MemCopyUint8Wrapper); CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
OS::memcopy_uint16_uint8_function = OS::memcopy_uint16_uint8_function =
CreateMemCopyUint16Uint8Function(serializer_enabled, CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper);
&OS::MemCopyUint16Uint8Wrapper);
#elif defined(V8_HOST_ARCH_MIPS) #elif defined(V8_HOST_ARCH_MIPS)
OS::memcopy_uint8_function = OS::memcopy_uint8_function =
CreateMemCopyUint8Function(serializer_enabled, &OS::MemCopyUint8Wrapper); CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
#endif #endif
// fast_exp is initialized lazily. // fast_exp is initialized lazily.
init_fast_sqrt_function(); init_fast_sqrt_function();
......
...@@ -515,7 +515,7 @@ char* Win32Time::LocalTimezone(TimezoneCache* cache) { ...@@ -515,7 +515,7 @@ char* Win32Time::LocalTimezone(TimezoneCache* cache) {
} }
void OS::PostSetUp(bool serializer_enabled) { void OS::PostSetUp() {
// Math functions depend on CPU features therefore they are initialized after // Math functions depend on CPU features therefore they are initialized after
// CPU. // CPU.
MathSetup(); MathSetup();
......
...@@ -151,7 +151,7 @@ class OS { ...@@ -151,7 +151,7 @@ class OS {
public: public:
// Initializes the platform OS support that depend on CPU features. This is // Initializes the platform OS support that depend on CPU features. This is
// called after CPU initialization. // called after CPU initialization.
static void PostSetUp(bool serializer_enabled); static void PostSetUp();
// Returns the accumulated user time for thread. This routine // Returns the accumulated user time for thread. This routine
// can be used for profiling. The implementation should // can be used for profiling. The implementation should
......
...@@ -124,7 +124,7 @@ void V8::InitializeOncePerProcessImpl() { ...@@ -124,7 +124,7 @@ void V8::InitializeOncePerProcessImpl() {
// TODO(svenpanne) Clean this up when Serializer is a real object. // TODO(svenpanne) Clean this up when Serializer is a real object.
bool serializer_enabled = Serializer::enabled(NULL); bool serializer_enabled = Serializer::enabled(NULL);
CpuFeatures::Probe(serializer_enabled); CpuFeatures::Probe(serializer_enabled);
OS::PostSetUp(serializer_enabled); OS::PostSetUp();
ElementsAccessor::InitializeOncePerProcess(); ElementsAccessor::InitializeOncePerProcess();
LOperand::SetUpCaches(); LOperand::SetUpCaches();
SetUpJSCallerSavedCodeData(); SetUpJSCallerSavedCodeData();
......
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