Revision: 21801
Author:   [email protected]
Date:     Thu Jun 12 09:55:25 2014 UTC
Log:      Revert "Rename kIs64BitArch with kRequiresCodeRange."

[email protected]

Review URL: https://codereview.chromium.org/325343003
http://code.google.com/p/v8/source/detail?r=21801

Modified:
 /branches/bleeding_edge/src/api.cc
 /branches/bleeding_edge/src/globals.h
 /branches/bleeding_edge/src/spaces.cc

=======================================
--- /branches/bleeding_edge/src/api.cc  Thu Jun 12 09:43:51 2014 UTC
+++ /branches/bleeding_edge/src/api.cc  Thu Jun 12 09:55:25 2014 UTC
@@ -465,12 +465,11 @@

   set_max_available_threads(i::Max(i::Min(number_of_processors, 4u), 1u));

-  if (virtual_memory_limit > 0 && i::kRequiresCodeRange) {
+  if (virtual_memory_limit > 0 && i::kIs64BitArch) {
// Reserve no more than 1/8 of the memory for the code range, but at most
-    // kMaximalCodeRangeSize.
+    // 512 MB.
     set_code_range_size(
-        i::Min(i::kMaximalCodeRangeSize / i::MB,
-               static_cast<int>((virtual_memory_limit >> 3) / i::MB)));
+ i::Min(512, static_cast<int>((virtual_memory_limit >> 3) / i::MB)));
   }
 }

=======================================
--- /branches/bleeding_edge/src/globals.h       Thu Jun 12 09:43:51 2014 UTC
+++ /branches/bleeding_edge/src/globals.h       Thu Jun 12 09:55:25 2014 UTC
@@ -153,14 +153,12 @@
 const int kPointerSizeLog2 = 3;
 const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000);
 const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF);
-const bool kRequiresCodeRange = true;
-const int kMaximalCodeRangeSize = 512 * MB;
+const bool kIs64BitArch = true;
 #else
 const int kPointerSizeLog2 = 2;
 const intptr_t kIntptrSignBit = 0x80000000;
 const uintptr_t kUintptrAllBitsSet = 0xFFFFFFFFu;
-const bool kRequiresCodeRange = false;
-const int kMaximalCodeRangeSize = 0 * MB;
+const bool kIs64BitArch = false;
 #endif

 const int kBitsPerByte = 8;
=======================================
--- /branches/bleeding_edge/src/spaces.cc       Thu Jun 12 09:43:51 2014 UTC
+++ /branches/bleeding_edge/src/spaces.cc       Thu Jun 12 09:55:25 2014 UTC
@@ -115,17 +115,15 @@
   ASSERT(code_range_ == NULL);

   if (requested == 0) {
- // When a target requires the code range feature, we put all code objects
-    // in a kMaximalCodeRangeSize range of virtual address space, so that
-    // they can call each other with near calls.
-    if (kRequiresCodeRange) {
-      requested = kMaximalCodeRangeSize;
+    // On 64-bit platform(s), we put all code objects in a 512 MB range of
+ // virtual address space, so that they can call each other with near calls.
+    if (kIs64BitArch) {
+      requested = 512 * MB;
     } else {
       return true;
     }
   }

-  ASSERT(requested <= kMaximalCodeRangeSize);
   code_range_ = new VirtualMemory(requested);
   CHECK(code_range_ != NULL);
   if (!code_range_->IsReserved()) {

--
--
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.

Reply via email to