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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips ports Created 4 years, 10 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/x64/macro-assembler-x64.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 8eb3df6e645b83a542f7f0bbf3cebcc255e889bb..85ff61d825545aaa48fe8520689f202141ef4d5b 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -251,38 +251,9 @@ void MacroAssembler::InNewSpace(Register object,
Condition cc,
Label* branch,
Label::Distance distance) {
- if (serializer_enabled()) {
- // Can't do arithmetic on external references if it might get serialized.
- // The mask isn't really an address. We load it as an external reference in
- // case the size of the new space is different between the snapshot maker
- // and the running system.
- if (scratch.is(object)) {
- Move(kScratchRegister, ExternalReference::new_space_mask(isolate()));
- andp(scratch, kScratchRegister);
- } else {
- Move(scratch, ExternalReference::new_space_mask(isolate()));
- andp(scratch, object);
- }
- Move(kScratchRegister, ExternalReference::new_space_start(isolate()));
- cmpp(scratch, kScratchRegister);
- j(cc, branch, distance);
- } else {
- DCHECK(kPointerSize == kInt64Size
- ? is_int32(static_cast<int64_t>(isolate()->heap()->NewSpaceMask()))
- : kPointerSize == kInt32Size);
- intptr_t new_space_start =
- reinterpret_cast<intptr_t>(isolate()->heap()->NewSpaceStart());
- Move(kScratchRegister, reinterpret_cast<Address>(-new_space_start),
- Assembler::RelocInfoNone());
- if (scratch.is(object)) {
- addp(scratch, kScratchRegister);
- } else {
- leap(scratch, Operand(object, kScratchRegister, times_1, 0));
- }
- andp(scratch,
- Immediate(static_cast<int32_t>(isolate()->heap()->NewSpaceMask())));
- j(cc, branch, distance);
- }
+ const int mask =
+ (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE);
+ CheckPageFlag(object, scratch, mask, cc, branch, distance);
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698