// root array to force relocation to be able to later patch with
// the cached map.
Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
- __ mov(ip, Operand(Handle<Object>(cell)));
- __ ldr(ip, FieldMemOperand(ip, PropertyCell::kValueOffset));
+ __ mov(ip, Operand(cell));
+ __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
__ cmp(map, Operand(ip));
__ b(ne, &cache_miss);
__ bind(deferred->load_bool()); // Label for calculating code patching.
if (isolate()->heap()->InNewSpace(*object)) {
Register reg = ToRegister(instr->value());
Handle<Cell> cell = isolate()->factory()->NewCell(object);
- __ mov(ip, Operand(Handle<Object>(cell)));
+ __ mov(ip, Operand(cell));
__ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
__ cmp(reg, ip);
} else {
UseScratchRegisterScope temps(masm());
Register temp = temps.AcquireX();
Handle<Cell> cell = isolate()->factory()->NewCell(object);
- __ Mov(temp, Operand(Handle<Object>(cell)));
+ __ Mov(temp, Operand(cell));
__ Ldr(temp, FieldMemOperand(temp, Cell::kValueOffset));
__ Cmp(reg, temp);
} else {
__ bind(&map_check);
// Will be patched with the cached map.
Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
- __ ldr(scratch, Immediate(Handle<Object>(cell)));
- __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
+ __ ldr(scratch, Immediate(cell));
+ __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
__ cmp(map, scratch);
__ b(&cache_miss, ne);
// The address of this instruction is computed relative to the map check
bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
LookupIterator* it) {
target_ = Handle<JSFunction>::null();
- cell_ = Handle<Cell>::null();
DCHECK(it->IsFound() && it->GetHolder<JSObject>().is_identical_to(global));
- cell_ = it->GetPropertyCell();
- if (cell_->value()->IsJSFunction()) {
- Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
+ Handle<PropertyCell> cell = it->GetPropertyCell();
+ if (cell->value()->IsJSFunction()) {
+ Handle<JSFunction> candidate(JSFunction::cast(cell->value()));
// If the function is in new space we assume it's more likely to
// change and thus prefer the general IC code.
if (!it->isolate()->heap()->InNewSpace(*candidate)) {
Handle<JSFunction> target() { return target_; }
- Handle<Cell> cell() { return cell_; }
-
Handle<AllocationSite> allocation_site() { return allocation_site_; }
void set_target(Handle<JSFunction> target) { target_ = target; }
Expression* expression_;
ZoneList<Expression*>* arguments_;
Handle<JSFunction> target_;
- Handle<Cell> cell_;
Handle<AllocationSite> allocation_site_;
class IsUninitializedField : public BitField8<bool, 0, 1> {};
uint8_t bit_field_;
HValue* cell = Add<HLoadNamedField>(weak_cell, nullptr,
HObjectAccess::ForWeakCellValue());
Add<HCheckHeapObject>(cell);
- HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
+ HObjectAccess access = HObjectAccess::ForPropertyCellValue();
HValue* cell_contents = Add<HLoadNamedField>(cell, nullptr, access);
if (stub->is_constant()) {
void V8HeapExplorer::ExtractPropertyCellReferences(int entry,
PropertyCell* cell) {
- ExtractCellReferences(entry, cell);
+ SetInternalReference(cell, entry, "value", cell->value(),
+ PropertyCell::kValueOffset);
MarkAsWeakContainer(cell->dependent_code());
SetInternalReference(cell, entry, "dependent_code", cell->dependent_code(),
PropertyCell::kDependentCodeOffset);
}
-HObjectAccess HObjectAccess::ForCellPayload(Isolate* isolate) {
- return HObjectAccess(kInobject, Cell::kValueOffset, Representation::Tagged(),
- isolate->factory()->cell_value_string());
-}
-
-
void HObjectAccess::SetGVNFlags(HValue *instr, PropertyAccessType access_type) {
// set the appropriate GVN flags for a given load or store instruction
if (access_type == STORE) {
Representation representation,
Handle<String> name);
- // Create an access for the payload of a Cell or JSGlobalPropertyCell.
- static HObjectAccess ForCellPayload(Isolate* isolate);
-
static HObjectAccess ForJSTypedArrayLength() {
return HObjectAccess::ForObservableJSObjectOffset(
JSTypedArray::kLengthOffset);
void PropertyHandlerCompiler::GenerateCheckPropertyCell(
MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
Register scratch, Label* miss) {
- Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
+ Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
DCHECK(cell->value()->IsTheHole());
Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell);
__ LoadWeakValue(scratch, weak_cell, miss);
- __ ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
+ __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
__ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
__ cmp(scratch, ip);
__ b(ne, miss);
void PropertyHandlerCompiler::GenerateCheckPropertyCell(
MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
Register scratch, Label* miss) {
- Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
+ Handle<PropertyCell> cell = JSGlobalObject::EnsurePropertyCell(global, name);
DCHECK(cell->value()->IsTheHole());
Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell);
__ LoadWeakValue(scratch, weak_cell, miss);
- __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset));
+ __ Ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
__ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss);
}
// - Symbol
// - HeapNumber
// - Cell
-// - PropertyCell
+// - PropertyCell
// - Code
// - Map
// - Oddball
};
-class PropertyCell: public Cell {
+class PropertyCell : public HeapObject {
public:
// [value]: value of the global property.
DECL_ACCESSORS(value, Object)
DECLARE_VERIFIER(PropertyCell)
// Layout description.
+ static const int kValueOffset = HeapObject::kHeaderSize;
static const int kDependentCodeOffset = kValueOffset + kPointerSize;
static const int kSize = kDependentCodeOffset + kPointerSize;