Reviewers: Benedikt Meurer,
Description:
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
Please review this at https://codereview.chromium.org/261903002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+9, -22 lines):
M src/arm/codegen-arm.cc
M src/mips/codegen-mips.cc
M src/platform.h
M src/platform-posix.cc
M src/platform-win32.cc
M src/v8.cc
Index: src/arm/codegen-arm.cc
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc
index
7ac14e382a525fbb02f2963b0fd54c145cf9829a..a8e38777bf5a79e44ff7be34e2d328d94d7095f3
100644
--- a/src/arm/codegen-arm.cc
+++ b/src/arm/codegen-arm.cc
@@ -79,14 +79,11 @@ UnaryMathFunction CreateExpFunction() {
#if defined(V8_HOST_ARCH_ARM)
OS::MemCopyUint8Function CreateMemCopyUint8Function(
- bool serializer_enabled,
OS::MemCopyUint8Function stub) {
#if defined(USE_SIMULATOR)
return stub;
#else
- if (serializer_enabled || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES))
{
- return stub;
- }
+ if (!CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) return stub;
size_t actual_size;
byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size,
true));
if (buffer == NULL) return stub;
@@ -238,14 +235,11 @@ OS::MemCopyUint8Function CreateMemCopyUint8Function(
// Convert 8 to 16. The number of character to copy must be at least 8.
OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
- bool serializer_enabled,
OS::MemCopyUint16Uint8Function stub) {
#if defined(USE_SIMULATOR)
return stub;
#else
- if (serializer_enabled || !CpuFeatures::IsSupported(UNALIGNED_ACCESSES))
{
- return stub;
- }
+ if (!CpuFeatures::IsSupported(UNALIGNED_ACCESSES)) return stub;
size_t actual_size;
byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size,
true));
if (buffer == NULL) return stub;
Index: src/mips/codegen-mips.cc
diff --git a/src/mips/codegen-mips.cc b/src/mips/codegen-mips.cc
index
c69c8f21e8609a056a5c27d447833706b41a9ed4..ce04dd463888667619985535b962b2bfd99019c6
100644
--- a/src/mips/codegen-mips.cc
+++ b/src/mips/codegen-mips.cc
@@ -72,13 +72,10 @@ UnaryMathFunction CreateExpFunction() {
#if defined(V8_HOST_ARCH_MIPS)
OS::MemCopyUint8Function CreateMemCopyUint8Function(
- bool serializer_enabled,
OS::MemCopyUint8Function stub) {
#if defined(USE_SIMULATOR)
return stub;
#else
- if (serializer_enabled) return stub;
-
size_t actual_size;
byte* buffer = static_cast<byte*>(OS::Allocate(3 * KB, &actual_size,
true));
if (buffer == NULL) return stub;
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index
01eb6392a009e427d8d4ac4197eae30b4b4f6366..6375fddc8e4e881b070ac86d4f52ef800ebf2095
100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -514,22 +514,19 @@ OS::MemCopyUint16Uint8Function
OS::memcopy_uint16_uint8_function =
&OS::MemCopyUint16Uint8Wrapper;
// Defined in codegen-arm.cc.
OS::MemCopyUint8Function CreateMemCopyUint8Function(
- bool serializer_enabled,
OS::MemCopyUint8Function stub);
OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
- bool serializer_enabled,
OS::MemCopyUint16Uint8Function stub);
#elif defined(V8_HOST_ARCH_MIPS)
OS::MemCopyUint8Function OS::memcopy_uint8_function =
&OS::MemCopyUint8Wrapper;
// Defined in codegen-mips.cc.
OS::MemCopyUint8Function CreateMemCopyUint8Function(
- bool serializer_enabled,
OS::MemCopyUint8Function stub);
#endif
-void OS::PostSetUp(bool serializer_enabled) {
+void OS::PostSetUp() {
#if V8_TARGET_ARCH_IA32
OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
if (generated_memmove != NULL) {
@@ -537,13 +534,12 @@ void OS::PostSetUp(bool serializer_enabled) {
}
#elif defined(V8_HOST_ARCH_ARM)
OS::memcopy_uint8_function =
- CreateMemCopyUint8Function(serializer_enabled,
&OS::MemCopyUint8Wrapper);
+ CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
OS::memcopy_uint16_uint8_function =
- CreateMemCopyUint16Uint8Function(serializer_enabled,
- &OS::MemCopyUint16Uint8Wrapper);
+ CreateMemCopyUint16Uint8Function(&OS::MemCopyUint16Uint8Wrapper);
#elif defined(V8_HOST_ARCH_MIPS)
OS::memcopy_uint8_function =
- CreateMemCopyUint8Function(serializer_enabled,
&OS::MemCopyUint8Wrapper);
+ CreateMemCopyUint8Function(&OS::MemCopyUint8Wrapper);
#endif
// fast_exp is initialized lazily.
init_fast_sqrt_function();
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index
4486caff382ca6c4d2594930707291969ef4dced..11dcdcc769c87382dccf2abb7d52512336fff2b2
100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -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
// CPU.
MathSetup();
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index
d82dea191948892c1635d9ebd3f5dd14c8809738..31b7bdfd36d2c270265ed095f9e5374a0a0685b8
100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -151,7 +151,7 @@ class OS {
public:
// Initializes the platform OS support that depend on CPU features. This
is
// called after CPU initialization.
- static void PostSetUp(bool serializer_enabled);
+ static void PostSetUp();
// Returns the accumulated user time for thread. This routine
// can be used for profiling. The implementation should
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index
c5c6df33a0de198859a93776e780c66e34c58e00..eed4333520390935eaab5259bc6ee751aff1763e
100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -124,7 +124,7 @@ void V8::InitializeOncePerProcessImpl() {
// TODO(svenpanne) Clean this up when Serializer is a real object.
bool serializer_enabled = Serializer::enabled(NULL);
CpuFeatures::Probe(serializer_enabled);
- OS::PostSetUp(serializer_enabled);
+ OS::PostSetUp();
ElementsAccessor::InitializeOncePerProcess();
LOperand::SetUpCaches();
SetUpJSCallerSavedCodeData();
--
--
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.