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

Side by Side Diff: src/spaces.cc

Issue 325343003: Revert "Rename kIs64BitArch with kRequiresCodeRange." (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/full-codegen.h" 7 #include "src/full-codegen.h"
8 #include "src/macro-assembler.h" 8 #include "src/macro-assembler.h"
9 #include "src/mark-compact.h" 9 #include "src/mark-compact.h"
10 #include "src/msan.h" 10 #include "src/msan.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 free_list_(0), 108 free_list_(0),
109 allocation_list_(0), 109 allocation_list_(0),
110 current_allocation_block_index_(0) { 110 current_allocation_block_index_(0) {
111 } 111 }
112 112
113 113
114 bool CodeRange::SetUp(size_t requested) { 114 bool CodeRange::SetUp(size_t requested) {
115 ASSERT(code_range_ == NULL); 115 ASSERT(code_range_ == NULL);
116 116
117 if (requested == 0) { 117 if (requested == 0) {
118 // When a target requires the code range feature, we put all code objects 118 // On 64-bit platform(s), we put all code objects in a 512 MB range of
119 // in a kMaximalCodeRangeSize range of virtual address space, so that 119 // virtual address space, so that they can call each other with near calls.
120 // they can call each other with near calls. 120 if (kIs64BitArch) {
121 if (kRequiresCodeRange) { 121 requested = 512 * MB;
122 requested = kMaximalCodeRangeSize;
123 } else { 122 } else {
124 return true; 123 return true;
125 } 124 }
126 } 125 }
127 126
128 ASSERT(requested <= kMaximalCodeRangeSize);
129 code_range_ = new VirtualMemory(requested); 127 code_range_ = new VirtualMemory(requested);
130 CHECK(code_range_ != NULL); 128 CHECK(code_range_ != NULL);
131 if (!code_range_->IsReserved()) { 129 if (!code_range_->IsReserved()) {
132 delete code_range_; 130 delete code_range_;
133 code_range_ = NULL; 131 code_range_ = NULL;
134 return false; 132 return false;
135 } 133 }
136 134
137 // We are sure that we have mapped a block of requested addresses. 135 // We are sure that we have mapped a block of requested addresses.
138 ASSERT(code_range_->size() == requested); 136 ASSERT(code_range_->size() == requested);
(...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 object->ShortPrint(); 3113 object->ShortPrint();
3116 PrintF("\n"); 3114 PrintF("\n");
3117 } 3115 }
3118 printf(" --------------------------------------\n"); 3116 printf(" --------------------------------------\n");
3119 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3117 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3120 } 3118 }
3121 3119
3122 #endif // DEBUG 3120 #endif // DEBUG
3123 3121
3124 } } // namespace v8::internal 3122 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698