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

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

Issue 1312763006: [heap] User safer root set accessor when possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-heap-root-set-1
Patch Set: Created 5 years, 4 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
« src/snapshot/serialize.cc ('K') | « src/snapshot/serialize.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/macro-assembler-x87.cc
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
index 1fab3aa7a3bcb754757f48f1ac389e2a4a05457b..d888f9fa63809ff68e32622cfab2c06caa983b65 100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -66,8 +66,7 @@ void MacroAssembler::Store(Register src, const Operand& dst, Representation r) {
void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) {
if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) {
- Handle<Object> value(&isolate()->heap()->roots_array_start()[index]);
- mov(destination, value);
+ mov(destination, isolate()->heap()->root_handle(index));
return;
}
ExternalReference roots_array_start =
@@ -105,16 +104,14 @@ void MacroAssembler::CompareRoot(Register with,
void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) {
DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
- Handle<Object> value(&isolate()->heap()->roots_array_start()[index]);
- cmp(with, value);
+ cmp(with, isolate()->heap()->root_handle(index));
}
void MacroAssembler::CompareRoot(const Operand& with,
Heap::RootListIndex index) {
DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
- Handle<Object> value(&isolate()->heap()->roots_array_start()[index]);
- cmp(with, value);
+ cmp(with, isolate()->heap()->root_handle(index));
}
« src/snapshot/serialize.cc ('K') | « src/snapshot/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698