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

Unified Diff: src/heap/heap.cc

Issue 1991253002: [heap] Bundle platform-specific constants for CodeRange (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/globals.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index cbc6d72ad839a31822e64cbd93df6503ccca5133..82c709dce134635373a59852d60f7b77e735a349 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3327,8 +3327,7 @@ AllocationResult Heap::AllocateCode(int object_size, bool immovable) {
result->set_map_no_write_barrier(code_map());
Code* code = Code::cast(result);
DCHECK(IsAligned(bit_cast<intptr_t>(code->address()), kCodeAlignment));
- DCHECK(memory_allocator()->code_range() == NULL ||
- !memory_allocator()->code_range()->valid() ||
+ DCHECK(!memory_allocator()->code_range()->valid() ||
memory_allocator()->code_range()->contains(code->address()) ||
object_size <= code_space()->AreaSize());
code->set_gc_metadata(Smi::FromInt(0));
@@ -3354,8 +3353,7 @@ AllocationResult Heap::CopyCode(Code* code) {
// Relocate the copy.
DCHECK(IsAligned(bit_cast<intptr_t>(new_code->address()), kCodeAlignment));
- DCHECK(memory_allocator()->code_range() == NULL ||
- !memory_allocator()->code_range()->valid() ||
+ DCHECK(!memory_allocator()->code_range()->valid() ||
memory_allocator()->code_range()->contains(code->address()) ||
obj_size <= code_space()->AreaSize());
new_code->Relocate(new_addr - old_addr);
@@ -3424,8 +3422,7 @@ AllocationResult Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
// Relocate the copy.
DCHECK(IsAligned(bit_cast<intptr_t>(new_code->address()), kCodeAlignment));
- DCHECK(memory_allocator()->code_range() == NULL ||
- !memory_allocator()->code_range()->valid() ||
+ DCHECK(!memory_allocator()->code_range()->valid() ||
memory_allocator()->code_range()->contains(code->address()) ||
new_obj_size <= code_space()->AreaSize());
« no previous file with comments | « src/globals.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698