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

Unified Diff: src/arm/codegen-arm.cc

Issue 23970004: Revert r16648, r16641, r16638 and r16637. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « include/v8config.h ('k') | src/cpu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/codegen-arm.cc
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc
index faf7b54d43a139139d37789afca4ce46eb639c24..1bcf3e3a605b051571dc9c51912264c65b90e14e 100644
--- a/src/arm/codegen-arm.cc
+++ b/src/arm/codegen-arm.cc
@@ -64,8 +64,7 @@ double fast_exp_simulator(double x) {
UnaryMathFunction CreateExpFunction() {
if (!FLAG_fast_math) return &exp;
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- 1 * KB, &actual_size, VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true));
if (buffer == NULL) return &exp;
ExternalReference::InitializeMathExpData();
@@ -103,9 +102,7 @@ UnaryMathFunction CreateExpFunction() {
ASSERT(!RelocInfo::RequiresRelocation(desc));
CPU::FlushICache(buffer, actual_size);
- bool result = VirtualMemory::WriteProtectRegion(buffer, actual_size);
- ASSERT(result);
- USE(result);
+ OS::ProtectCode(buffer, actual_size);
#if !defined(USE_SIMULATOR)
return FUNCTION_CAST<UnaryMathFunction>(buffer);
@@ -125,8 +122,7 @@ OS::MemCopyUint8Function CreateMemCopyUint8Function(
return stub;
}
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- 1 * KB, &actual_size, VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true));
if (buffer == NULL) return stub;
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
@@ -268,9 +264,7 @@ OS::MemCopyUint8Function CreateMemCopyUint8Function(
ASSERT(!RelocInfo::RequiresRelocation(desc));
CPU::FlushICache(buffer, actual_size);
- bool result = VirtualMemory::WriteProtectRegion(buffer, actual_size);
- ASSERT(result);
- USE(result);
+ OS::ProtectCode(buffer, actual_size);
return FUNCTION_CAST<OS::MemCopyUint8Function>(buffer);
#endif
}
@@ -286,8 +280,7 @@ OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
return stub;
}
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- 1 * KB, &actual_size, VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, &actual_size, true));
if (buffer == NULL) return stub;
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
@@ -359,9 +352,7 @@ OS::MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
masm.GetCode(&desc);
CPU::FlushICache(buffer, actual_size);
- bool result = VirtualMemory::WriteProtectRegion(buffer, actual_size);
- ASSERT(result);
- USE(result);
+ OS::ProtectCode(buffer, actual_size);
return FUNCTION_CAST<OS::MemCopyUint16Uint8Function>(buffer);
#endif
« no previous file with comments | « include/v8config.h ('k') | src/cpu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698