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

Unified Diff: test/cctest/test-serialize.cc

Issue 2090983002: Revert of Reland [heap] Avoid the use of cells to point from code to new-space objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « test/cctest/heap/test-heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 8fcebbd77ff04ad556564ae0c0992a323d8a3e72..de36877dfa6f3dc82267d8bc0fa140a98a732ae6 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -1852,19 +1852,15 @@
assembler.enable_serializer();
Handle<HeapNumber> number = isolate->factory()->NewHeapNumber(0.3);
CHECK(isolate->heap()->InNewSpace(*number));
- Handle<Code> code;
- {
- MacroAssembler* masm = &assembler;
- Handle<Cell> cell = isolate->factory()->NewCell(number);
- masm->Move(rax, cell, RelocInfo::CELL);
- masm->movp(rax, Operand(rax, 0));
- masm->ret(0);
- CodeDesc desc;
- masm->GetCode(&desc);
- code = isolate->factory()->NewCode(desc, Code::ComputeFlags(Code::FUNCTION),
- masm->CodeObject());
- code->set_has_reloc_info_for_serialization(true);
- }
+ MacroAssembler* masm = &assembler;
+ masm->MoveHeapObject(rax, number);
+ masm->ret(0);
+ CodeDesc desc;
+ masm->GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::FUNCTION), masm->CodeObject());
+ code->set_has_reloc_info_for_serialization(true);
+
RelocIterator rit1(*code, 1 << RelocInfo::CELL);
CHECK_EQ(*number, rit1.rinfo()->target_cell()->value());
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698