Commit bc0d2e23 authored by ulan's avatar ulan Committed by Commit bot

Use weak cell in LoadGlobal handler.

BUG=v8:3629
LOG=N

Review URL: https://codereview.chromium.org/816923004

Cr-Commit-Position: refs/heads/master@{#25902}
parent f7e46890
......@@ -704,7 +704,8 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
// Get the value from the cell.
Register result = StoreDescriptor::ValueRegister();
__ mov(result, Operand(cell));
Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
__ LoadWeakValue(result, weak_cell, &miss);
__ ldr(result, FieldMemOperand(result, Cell::kValueOffset));
// Check for deleted property if property can actually be deleted.
......
......@@ -334,7 +334,8 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
// Get the value from the cell.
Register result = StoreDescriptor::ValueRegister();
__ Mov(result, Operand(cell));
Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
__ LoadWeakValue(result, weak_cell, &miss);
__ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
// Check for deleted property if property can actually be deleted.
......
......@@ -724,12 +724,9 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreDescriptor::ValueRegister();
if (masm()->serializer_enabled()) {
__ mov(result, Immediate(cell));
__ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
} else {
__ mov(result, Operand::ForCell(cell));
}
Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
__ LoadWeakValue(result, weak_cell, &miss);
__ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
// Check for deleted property if property can actually be deleted.
if (is_configurable) {
......
......@@ -701,7 +701,8 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
// Get the value from the cell.
Register result = StoreDescriptor::ValueRegister();
__ li(result, Operand(cell));
Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
__ LoadWeakValue(result, weak_cell, &miss);
__ lw(result, FieldMemOperand(result, Cell::kValueOffset));
// Check for deleted property if property can actually be deleted.
......
......@@ -712,7 +712,8 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
// Get the value from the cell.
Register result = StoreDescriptor::ValueRegister();
__ Move(result, cell);
Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
__ LoadWeakValue(result, weak_cell, &miss);
__ movp(result, FieldOperand(result, PropertyCell::kValueOffset));
// Check for deleted property if property can actually be deleted.
......
......@@ -724,12 +724,9 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreDescriptor::ValueRegister();
if (masm()->serializer_enabled()) {
__ mov(result, Immediate(cell));
__ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
} else {
__ mov(result, Operand::ForCell(cell));
}
Handle<WeakCell> weak_cell = factory()->NewWeakCell(cell);
__ LoadWeakValue(result, weak_cell, &miss);
__ mov(result, FieldOperand(result, PropertyCell::kValueOffset));
// Check for deleted property if property can actually be deleted.
if (is_configurable) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment