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

Unified Diff: src/platform-cygwin.cc

Issue 353113003: Remove dependency from platform files on v8.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/platform.h ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-cygwin.cc
diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc
index ea72fd11c3ad354f2c2efa209d142a7bcd5efffc..ac313b2a0348e16a78d672c5ba8b15cf686bba68 100644
--- a/src/platform-cygwin.cc
+++ b/src/platform-cygwin.cc
@@ -14,12 +14,13 @@
#include <sys/time.h>
#include <unistd.h> // sysconf
-#undef MAP_TYPE
+#include <cmath>
-#include "src/v8.h"
+#undef MAP_TYPE
#include "src/base/win32-headers.h"
#include "src/platform.h"
+#include "src/utils.h"
namespace v8 {
namespace internal {
@@ -237,7 +238,7 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment)
static_cast<intptr_t>(OS::AllocateAlignment()));
void* address = ReserveRegion(request_size);
if (address == NULL) return;
- Address base = RoundUp(static_cast<Address>(address), alignment);
+ uint8_t* base = RoundUp(static_cast<uint8_t*>(address), alignment);
// Try reducing the size by freeing and then reallocating a specific area.
bool result = ReleaseRegion(address, request_size);
USE(result);
@@ -245,7 +246,7 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment)
address = VirtualAlloc(base, size, MEM_RESERVE, PAGE_NOACCESS);
if (address != NULL) {
request_size = size;
- ASSERT(base == static_cast<Address>(address));
+ ASSERT(base == static_cast<uint8_t*>(address));
} else {
// Resizing failed, just go with a bigger area.
address = ReserveRegion(request_size);
« no previous file with comments | « src/platform.h ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698