Refactor only: Rename JSGlobaPropertyCell to PropertyCell
R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/17064002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3626e48e5c
commit
61a23ceb4d
@ -7346,7 +7346,7 @@ void ArrayConstructorStub::Generate(MacroAssembler* masm) {
|
||||
// Get the elements kind and case on that.
|
||||
__ cmp(r2, Operand(undefined_sentinel));
|
||||
__ b(eq, &no_info);
|
||||
__ ldr(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset));
|
||||
__ ldr(r3, FieldMemOperand(r2, PropertyCell::kValueOffset));
|
||||
__ JumpIfNotSmi(r3, &no_info);
|
||||
__ SmiUntag(r3);
|
||||
__ jmp(&switch_ready);
|
||||
|
@ -2764,7 +2764,7 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
|
||||
PredictableCodeSizeScope predictable(masm_, 5 * Assembler::kInstrSize);
|
||||
Handle<Cell> cell = factory()->NewCell(factory()->the_hole_value());
|
||||
__ mov(ip, Operand(Handle<Object>(cell)));
|
||||
__ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
|
||||
__ ldr(ip, FieldMemOperand(ip, PropertyCell::kValueOffset));
|
||||
__ cmp(map, Operand(ip));
|
||||
__ b(ne, &cache_miss);
|
||||
// We use Factory::the_hole_value() on purpose instead of loading from the
|
||||
@ -5253,7 +5253,7 @@ void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
|
||||
AllowDeferredHandleDereference smi_check;
|
||||
if (isolate()->heap()->InNewSpace(*target)) {
|
||||
Register reg = ToRegister(instr->value());
|
||||
Handle<Cell> cell = isolate()->factory()->NewJSGlobalPropertyCell(target);
|
||||
Handle<Cell> cell = isolate()->factory()->NewPropertyCell(target);
|
||||
__ mov(ip, Operand(Handle<Object>(cell)));
|
||||
__ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
|
||||
__ cmp(reg, ip);
|
||||
|
@ -2706,7 +2706,7 @@ Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object,
|
||||
Handle<Code> CallStubCompiler::CompileCallGlobal(
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<JSFunction> function,
|
||||
Handle<Name> name) {
|
||||
// ----------- S t a t e -------------
|
||||
@ -2879,7 +2879,7 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
||||
|
||||
Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
Handle<GlobalObject> object,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name) {
|
||||
Label miss;
|
||||
|
||||
@ -3023,7 +3023,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
|
||||
Handle<Code> LoadStubCompiler::CompileLoadGlobal(
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> global,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name,
|
||||
bool is_dont_delete) {
|
||||
Label success, miss;
|
||||
|
@ -2500,8 +2500,8 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from,
|
||||
Handle<Object> value = Handle<Object>(properties->ValueAt(i),
|
||||
isolate());
|
||||
ASSERT(!value->IsCell());
|
||||
if (value->IsJSGlobalPropertyCell()) {
|
||||
value = Handle<Object>(JSGlobalPropertyCell::cast(*value)->value(),
|
||||
if (value->IsPropertyCell()) {
|
||||
value = Handle<Object>(PropertyCell::cast(*value)->value(),
|
||||
isolate());
|
||||
}
|
||||
PropertyDetails details = properties->DetailsAt(i);
|
||||
|
@ -491,13 +491,12 @@ Handle<Cell> Factory::NewCell(Handle<Object> value) {
|
||||
}
|
||||
|
||||
|
||||
Handle<JSGlobalPropertyCell> Factory::NewJSGlobalPropertyCell(
|
||||
Handle<Object> value) {
|
||||
Handle<PropertyCell> Factory::NewPropertyCell(Handle<Object> value) {
|
||||
AllowDeferredHandleDereference convert_to_cell;
|
||||
CALL_HEAP_FUNCTION(
|
||||
isolate(),
|
||||
isolate()->heap()->AllocateJSGlobalPropertyCell(*value),
|
||||
JSGlobalPropertyCell);
|
||||
isolate()->heap()->AllocatePropertyCell(*value),
|
||||
PropertyCell);
|
||||
}
|
||||
|
||||
|
||||
|
@ -237,8 +237,7 @@ class Factory {
|
||||
|
||||
Handle<Cell> NewCell(Handle<Object> value);
|
||||
|
||||
Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell(
|
||||
Handle<Object> value);
|
||||
Handle<PropertyCell> NewPropertyCell(Handle<Object> value);
|
||||
|
||||
Handle<Map> NewMap(
|
||||
InstanceType type,
|
||||
|
@ -313,13 +313,13 @@ MaybeObject* Heap::AllocateRawCell() {
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* Heap::AllocateRawJSGlobalPropertyCell() {
|
||||
MaybeObject* Heap::AllocateRawPropertyCell() {
|
||||
#ifdef DEBUG
|
||||
isolate_->counters()->objs_since_last_full()->Increment();
|
||||
isolate_->counters()->objs_since_last_young()->Increment();
|
||||
#endif
|
||||
MaybeObject* result =
|
||||
property_cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize);
|
||||
property_cell_space_->AllocateRaw(PropertyCell::kSize);
|
||||
if (result->IsFailure()) old_gen_exhausted_ = true;
|
||||
return result;
|
||||
}
|
||||
|
@ -890,7 +890,7 @@ const char* V8HeapExplorer::GetSystemEntryName(HeapObject* object) {
|
||||
default: return "system / Map";
|
||||
}
|
||||
case CELL_TYPE: return "system / Cell";
|
||||
case PROPERTY_CELL_TYPE: return "system / JSGlobalPropertyCell";
|
||||
case PROPERTY_CELL_TYPE: return "system / PropertyCell";
|
||||
case FOREIGN_TYPE: return "system / Foreign";
|
||||
case ODDBALL_TYPE: return "system / Oddball";
|
||||
#define MAKE_STRUCT_CASE(NAME, Name, name) \
|
||||
@ -981,9 +981,9 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) {
|
||||
} else if (obj->IsCell()) {
|
||||
ExtractCellReferences(entry, Cell::cast(obj));
|
||||
extract_indexed_refs = false;
|
||||
} else if (obj->IsJSGlobalPropertyCell()) {
|
||||
ExtractJSGlobalPropertyCellReferences(
|
||||
entry, JSGlobalPropertyCell::cast(obj));
|
||||
} else if (obj->IsPropertyCell()) {
|
||||
ExtractPropertyCellReferences(
|
||||
entry, PropertyCell::cast(obj));
|
||||
extract_indexed_refs = false;
|
||||
}
|
||||
if (extract_indexed_refs) {
|
||||
@ -1283,8 +1283,8 @@ void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) {
|
||||
}
|
||||
|
||||
|
||||
void V8HeapExplorer::ExtractJSGlobalPropertyCellReferences(
|
||||
int entry, JSGlobalPropertyCell* cell) {
|
||||
void V8HeapExplorer::ExtractPropertyCellReferences(int entry,
|
||||
PropertyCell* cell) {
|
||||
SetInternalReference(cell, entry, "value", cell->value());
|
||||
SetInternalReference(cell, entry, "type", cell->type());
|
||||
}
|
||||
@ -1386,8 +1386,8 @@ void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) {
|
||||
if (dictionary->IsKey(k)) {
|
||||
Object* target = dictionary->ValueAt(i);
|
||||
// We assume that global objects can only have slow properties.
|
||||
Object* value = target->IsJSGlobalPropertyCell()
|
||||
? JSGlobalPropertyCell::cast(target)->value()
|
||||
Object* value = target->IsPropertyCell()
|
||||
? PropertyCell::cast(target)->value()
|
||||
: target;
|
||||
if (k != heap_->hidden_string()) {
|
||||
SetPropertyReference(js_obj, entry, String::cast(k), value);
|
||||
|
@ -465,8 +465,7 @@ class V8HeapExplorer : public HeapEntriesAllocator {
|
||||
void ExtractCodeCacheReferences(int entry, CodeCache* code_cache);
|
||||
void ExtractCodeReferences(int entry, Code* code);
|
||||
void ExtractCellReferences(int entry, Cell* cell);
|
||||
void ExtractJSGlobalPropertyCellReferences(int entry,
|
||||
JSGlobalPropertyCell* cell);
|
||||
void ExtractPropertyCellReferences(int entry, PropertyCell* cell);
|
||||
void ExtractClosureReferences(JSObject* js_obj, int entry);
|
||||
void ExtractPropertyReferences(JSObject* js_obj, int entry);
|
||||
void ExtractElementReferences(JSObject* js_obj, int entry);
|
||||
|
20
src/heap.cc
20
src/heap.cc
@ -1394,8 +1394,8 @@ void Heap::Scavenge() {
|
||||
for (HeapObject* heap_object = js_global_property_cell_iterator.Next();
|
||||
heap_object != NULL;
|
||||
heap_object = js_global_property_cell_iterator.Next()) {
|
||||
if (heap_object->IsJSGlobalPropertyCell()) {
|
||||
JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(heap_object);
|
||||
if (heap_object->IsPropertyCell()) {
|
||||
PropertyCell* cell = PropertyCell::cast(heap_object);
|
||||
Address value_address = cell->ValueAddress();
|
||||
scavenge_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
|
||||
Address type_address = cell->TypeAddress();
|
||||
@ -2678,7 +2678,7 @@ bool Heap::CreateInitialMaps() {
|
||||
set_cell_map(Map::cast(obj));
|
||||
|
||||
{ MaybeObject* maybe_obj = AllocateMap(PROPERTY_CELL_TYPE,
|
||||
JSGlobalPropertyCell::kSize);
|
||||
PropertyCell::kSize);
|
||||
if (!maybe_obj->ToObject(&obj)) return false;
|
||||
}
|
||||
set_global_property_cell_map(Map::cast(obj));
|
||||
@ -2823,15 +2823,15 @@ MaybeObject* Heap::AllocateCell(Object* value) {
|
||||
}
|
||||
|
||||
|
||||
MaybeObject* Heap::AllocateJSGlobalPropertyCell(Object* value) {
|
||||
MaybeObject* Heap::AllocatePropertyCell(Object* value) {
|
||||
Object* result;
|
||||
{ MaybeObject* maybe_result = AllocateRawJSGlobalPropertyCell();
|
||||
{ MaybeObject* maybe_result = AllocateRawPropertyCell();
|
||||
if (!maybe_result->ToObject(&result)) return maybe_result;
|
||||
}
|
||||
HeapObject::cast(result)->set_map_no_write_barrier(
|
||||
global_property_cell_map());
|
||||
JSGlobalPropertyCell::cast(result)->set_value(value);
|
||||
JSGlobalPropertyCell::cast(result)->set_type(Type::None());
|
||||
PropertyCell::cast(result)->set_value(value);
|
||||
PropertyCell::cast(result)->set_type(Type::None());
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -4724,7 +4724,7 @@ MaybeObject* Heap::AllocateGlobalObject(JSFunction* constructor) {
|
||||
|
||||
// Make sure no field properties are described in the initial map.
|
||||
// This guarantees us that normalizing the properties does not
|
||||
// require us to change property values to JSGlobalPropertyCells.
|
||||
// require us to change property values to PropertyCells.
|
||||
ASSERT(map->NextFreePropertyIndex() == 0);
|
||||
|
||||
// Make sure we don't have a ton of pre-allocated slots in the
|
||||
@ -4753,7 +4753,7 @@ MaybeObject* Heap::AllocateGlobalObject(JSFunction* constructor) {
|
||||
ASSERT(details.type() == CALLBACKS); // Only accessors are expected.
|
||||
PropertyDetails d = PropertyDetails(details.attributes(), CALLBACKS, i + 1);
|
||||
Object* value = descs->GetCallbacksObject(i);
|
||||
MaybeObject* maybe_value = AllocateJSGlobalPropertyCell(value);
|
||||
MaybeObject* maybe_value = AllocatePropertyCell(value);
|
||||
if (!maybe_value->ToObject(&value)) return maybe_value;
|
||||
|
||||
MaybeObject* maybe_added = dictionary->Add(descs->GetKey(i), value, d);
|
||||
@ -6078,7 +6078,7 @@ void Heap::ReportHeapStatistics(const char* title) {
|
||||
map_space_->ReportStatistics();
|
||||
PrintF("Cell space : ");
|
||||
cell_space_->ReportStatistics();
|
||||
PrintF("JSGlobalPropertyCell space : ");
|
||||
PrintF("PropertyCell space : ");
|
||||
property_cell_space_->ReportStatistics();
|
||||
PrintF("Large object space : ");
|
||||
lo_space_->ReportStatistics();
|
||||
|
@ -949,7 +949,7 @@ class Heap {
|
||||
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
|
||||
// failed.
|
||||
// Please note this does not perform a garbage collection.
|
||||
MUST_USE_RESULT MaybeObject* AllocateJSGlobalPropertyCell(Object* value);
|
||||
MUST_USE_RESULT MaybeObject* AllocatePropertyCell(Object* value);
|
||||
|
||||
// Allocate Box.
|
||||
MUST_USE_RESULT MaybeObject* AllocateBox(Object* value,
|
||||
@ -2131,7 +2131,7 @@ class Heap {
|
||||
MUST_USE_RESULT inline MaybeObject* AllocateRawCell();
|
||||
|
||||
// Allocate an uninitialized object in the global property cell space.
|
||||
MUST_USE_RESULT inline MaybeObject* AllocateRawJSGlobalPropertyCell();
|
||||
MUST_USE_RESULT inline MaybeObject* AllocateRawPropertyCell();
|
||||
|
||||
// Initializes a JSObject based on its map.
|
||||
void InitializeJSObjectFromMap(JSObject* obj,
|
||||
|
@ -5068,7 +5068,7 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object,
|
||||
class HStoreGlobalCell: public HUnaryOperation {
|
||||
public:
|
||||
HStoreGlobalCell(HValue* value,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
PropertyDetails details)
|
||||
: HUnaryOperation(value),
|
||||
cell_(cell),
|
||||
@ -5076,7 +5076,7 @@ class HStoreGlobalCell: public HUnaryOperation {
|
||||
SetGVNFlag(kChangesGlobalVars);
|
||||
}
|
||||
|
||||
Handle<JSGlobalPropertyCell> cell() const { return cell_; }
|
||||
Handle<PropertyCell> cell() const { return cell_; }
|
||||
bool RequiresHoleCheck() {
|
||||
return !details_.IsDontDelete() || details_.IsReadOnly();
|
||||
}
|
||||
@ -5092,7 +5092,7 @@ class HStoreGlobalCell: public HUnaryOperation {
|
||||
DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell)
|
||||
|
||||
private:
|
||||
Handle<JSGlobalPropertyCell> cell_;
|
||||
Handle<PropertyCell> cell_;
|
||||
PropertyDetails details_;
|
||||
};
|
||||
|
||||
|
@ -5626,7 +5626,7 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) {
|
||||
|
||||
if (type == kUseCell) {
|
||||
Handle<GlobalObject> global(current_info()->global_object());
|
||||
Handle<JSGlobalPropertyCell> cell(global->GetPropertyCell(&lookup));
|
||||
Handle<PropertyCell> cell(global->GetPropertyCell(&lookup));
|
||||
HLoadGlobalCell* instr =
|
||||
new(zone()) HLoadGlobalCell(cell, lookup.GetPropertyDetails());
|
||||
return ast_context()->ReturnInstruction(instr, expr->id());
|
||||
@ -6606,7 +6606,7 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment(
|
||||
GlobalPropertyAccess type = LookupGlobalProperty(var, &lookup, true);
|
||||
if (type == kUseCell) {
|
||||
Handle<GlobalObject> global(current_info()->global_object());
|
||||
Handle<JSGlobalPropertyCell> cell(global->GetPropertyCell(&lookup));
|
||||
Handle<PropertyCell> cell(global->GetPropertyCell(&lookup));
|
||||
HInstruction* instr =
|
||||
new(zone()) HStoreGlobalCell(value, cell, lookup.GetPropertyDetails());
|
||||
instr->set_position(position);
|
||||
|
@ -4688,7 +4688,7 @@ static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) {
|
||||
Label initialize, done;
|
||||
|
||||
// Load the cache state into ecx.
|
||||
__ mov(ecx, FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset));
|
||||
__ mov(ecx, FieldOperand(ebx, PropertyCell::kValueOffset));
|
||||
|
||||
// A monomorphic cache hit or an already megamorphic state: invoke the
|
||||
// function without changing the state.
|
||||
|
@ -2885,7 +2885,7 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
|
||||
|
||||
void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
|
||||
Register value = ToRegister(instr->value());
|
||||
Handle<JSGlobalPropertyCell> cell_handle = instr->hydrogen()->cell();
|
||||
Handle<PropertyCell> cell_handle = instr->hydrogen()->cell();
|
||||
|
||||
// If the cell we are storing to contains the hole it could have
|
||||
// been deleted from the property dictionary. In that case, we need
|
||||
|
@ -764,13 +764,13 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm,
|
||||
Handle<Name> name,
|
||||
Register scratch,
|
||||
Label* miss) {
|
||||
Handle<JSGlobalPropertyCell> cell =
|
||||
Handle<PropertyCell> cell =
|
||||
GlobalObject::EnsurePropertyCell(global, name);
|
||||
ASSERT(cell->value()->IsTheHole());
|
||||
Handle<Oddball> the_hole = masm->isolate()->factory()->the_hole_value();
|
||||
if (Serializer::enabled()) {
|
||||
__ mov(scratch, Immediate(cell));
|
||||
__ cmp(FieldOperand(scratch, JSGlobalPropertyCell::kValueOffset),
|
||||
__ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
|
||||
Immediate(the_hole));
|
||||
} else {
|
||||
__ cmp(Operand::ForCell(cell), Immediate(the_hole));
|
||||
@ -2780,7 +2780,7 @@ Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object,
|
||||
Handle<Code> CallStubCompiler::CompileCallGlobal(
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<JSFunction> function,
|
||||
Handle<Name> name) {
|
||||
// ----------- S t a t e -------------
|
||||
@ -2963,7 +2963,7 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
||||
|
||||
Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
Handle<GlobalObject> object,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name) {
|
||||
Label miss;
|
||||
|
||||
@ -2975,7 +2975,7 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
// Compute the cell operand to use.
|
||||
__ mov(scratch1(), Immediate(cell));
|
||||
Operand cell_operand =
|
||||
FieldOperand(scratch1(), JSGlobalPropertyCell::kValueOffset);
|
||||
FieldOperand(scratch1(), PropertyCell::kValueOffset);
|
||||
|
||||
// Check that the value in the cell is not the hole. If it is, this
|
||||
// cell could have been deleted and reintroducing the global needs
|
||||
@ -3136,7 +3136,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
|
||||
Handle<Code> LoadStubCompiler::CompileLoadGlobal(
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> global,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name,
|
||||
bool is_dont_delete) {
|
||||
Label success, miss;
|
||||
@ -3147,7 +3147,7 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal(
|
||||
// Get the value from the cell.
|
||||
if (Serializer::enabled()) {
|
||||
__ mov(eax, Immediate(cell));
|
||||
__ mov(eax, FieldOperand(eax, JSGlobalPropertyCell::kValueOffset));
|
||||
__ mov(eax, FieldOperand(eax, PropertyCell::kValueOffset));
|
||||
} else {
|
||||
__ mov(eax, Operand::ForCell(cell));
|
||||
}
|
||||
|
@ -686,7 +686,7 @@ Handle<Code> CallICBase::ComputeMonomorphicStub(LookupResult* lookup,
|
||||
|
||||
if (holder->IsGlobalObject()) {
|
||||
Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
|
||||
Handle<JSGlobalPropertyCell> cell(
|
||||
Handle<PropertyCell> cell(
|
||||
global->GetPropertyCell(lookup), isolate());
|
||||
if (!cell->value()->IsJSFunction()) return Handle<Code>::null();
|
||||
Handle<JSFunction> function(JSFunction::cast(cell->value()));
|
||||
@ -1258,7 +1258,7 @@ Handle<Code> LoadIC::ComputeLoadHandler(LookupResult* lookup,
|
||||
case NORMAL:
|
||||
if (holder->IsGlobalObject()) {
|
||||
Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
|
||||
Handle<JSGlobalPropertyCell> cell(
|
||||
Handle<PropertyCell> cell(
|
||||
global->GetPropertyCell(lookup), isolate());
|
||||
return isolate()->stub_cache()->ComputeLoadGlobal(
|
||||
name, receiver, global, cell, lookup->IsDontDelete());
|
||||
@ -1696,7 +1696,7 @@ Handle<Code> StoreIC::ComputeStoreMonomorphic(LookupResult* lookup,
|
||||
// from the property cell. So the property must be directly on the
|
||||
// global object.
|
||||
Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
|
||||
Handle<JSGlobalPropertyCell> cell(
|
||||
Handle<PropertyCell> cell(
|
||||
global->GetPropertyCell(lookup), isolate());
|
||||
return isolate()->stub_cache()->ComputeStoreGlobal(
|
||||
name, global, cell, strict_mode);
|
||||
|
@ -2267,13 +2267,13 @@ void MarkCompactCollector::MarkLiveObjects() {
|
||||
heap()->property_cell_space());
|
||||
HeapObject* cell;
|
||||
while ((cell = js_global_property_cell_iterator.Next()) != NULL) {
|
||||
ASSERT(cell->IsJSGlobalPropertyCell());
|
||||
ASSERT(cell->IsPropertyCell());
|
||||
if (IsMarked(cell)) {
|
||||
int offset = JSGlobalPropertyCell::kValueOffset;
|
||||
int offset = PropertyCell::kValueOffset;
|
||||
MarkCompactMarkingVisitor::VisitPointer(
|
||||
heap(),
|
||||
reinterpret_cast<Object**>(cell->address() + offset));
|
||||
offset = JSGlobalPropertyCell::kTypeOffset;
|
||||
offset = PropertyCell::kTypeOffset;
|
||||
MarkCompactMarkingVisitor::VisitPointer(
|
||||
heap(),
|
||||
reinterpret_cast<Object**>(cell->address() + offset));
|
||||
@ -3429,14 +3429,14 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
|
||||
for (HeapObject* cell = js_global_property_cell_iterator.Next();
|
||||
cell != NULL;
|
||||
cell = js_global_property_cell_iterator.Next()) {
|
||||
if (cell->IsJSGlobalPropertyCell()) {
|
||||
if (cell->IsPropertyCell()) {
|
||||
Address value_address =
|
||||
reinterpret_cast<Address>(cell) +
|
||||
(JSGlobalPropertyCell::kValueOffset - kHeapObjectTag);
|
||||
(PropertyCell::kValueOffset - kHeapObjectTag);
|
||||
updating_visitor.VisitPointer(reinterpret_cast<Object**>(value_address));
|
||||
Address type_address =
|
||||
reinterpret_cast<Address>(cell) +
|
||||
(JSGlobalPropertyCell::kTypeOffset - kHeapObjectTag);
|
||||
(PropertyCell::kTypeOffset - kHeapObjectTag);
|
||||
updating_visitor.VisitPointer(reinterpret_cast<Object**>(type_address));
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ void HeapObject::HeapObjectVerify() {
|
||||
Cell::cast(this)->CellVerify();
|
||||
break;
|
||||
case PROPERTY_CELL_TYPE:
|
||||
JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellVerify();
|
||||
PropertyCell::cast(this)->PropertyCellVerify();
|
||||
break;
|
||||
case JS_ARRAY_TYPE:
|
||||
JSArray::cast(this)->JSArrayVerify();
|
||||
@ -624,8 +624,8 @@ void Cell::CellVerify() {
|
||||
}
|
||||
|
||||
|
||||
void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() {
|
||||
CHECK(IsJSGlobalPropertyCell());
|
||||
void PropertyCell::PropertyCellVerify() {
|
||||
CHECK(IsPropertyCell());
|
||||
VerifyObjectField(kValueOffset);
|
||||
VerifyObjectField(kTypeOffset);
|
||||
}
|
||||
|
@ -669,7 +669,7 @@ template <> inline bool Is<JSFunction>(Object* obj) {
|
||||
TYPE_CHECKER(Code, CODE_TYPE)
|
||||
TYPE_CHECKER(Oddball, ODDBALL_TYPE)
|
||||
TYPE_CHECKER(Cell, CELL_TYPE)
|
||||
TYPE_CHECKER(JSGlobalPropertyCell, PROPERTY_CELL_TYPE)
|
||||
TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE)
|
||||
TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE)
|
||||
TYPE_CHECKER(JSGeneratorObject, JS_GENERATOR_OBJECT_TYPE)
|
||||
TYPE_CHECKER(JSModule, JS_MODULE_TYPE)
|
||||
@ -1629,17 +1629,17 @@ Object* Cell::value() {
|
||||
|
||||
void Cell::set_value(Object* val, WriteBarrierMode ignored) {
|
||||
// The write barrier is not used for global property cells.
|
||||
ASSERT(!val->IsJSGlobalPropertyCell() && !val->IsCell());
|
||||
ASSERT(!val->IsPropertyCell() && !val->IsCell());
|
||||
WRITE_FIELD(this, kValueOffset, val);
|
||||
}
|
||||
|
||||
|
||||
Object* JSGlobalPropertyCell::type_raw() {
|
||||
Object* PropertyCell::type_raw() {
|
||||
return READ_FIELD(this, kTypeOffset);
|
||||
}
|
||||
|
||||
|
||||
void JSGlobalPropertyCell::set_type_raw(Object* val, WriteBarrierMode ignored) {
|
||||
void PropertyCell::set_type_raw(Object* val, WriteBarrierMode ignored) {
|
||||
WRITE_FIELD(this, kTypeOffset, val);
|
||||
}
|
||||
|
||||
@ -2540,7 +2540,7 @@ CAST_ACCESSOR(HeapObject)
|
||||
CAST_ACCESSOR(HeapNumber)
|
||||
CAST_ACCESSOR(Oddball)
|
||||
CAST_ACCESSOR(Cell)
|
||||
CAST_ACCESSOR(JSGlobalPropertyCell)
|
||||
CAST_ACCESSOR(PropertyCell)
|
||||
CAST_ACCESSOR(SharedFunctionInfo)
|
||||
CAST_ACCESSOR(Map)
|
||||
CAST_ACCESSOR(JSFunction)
|
||||
|
@ -186,7 +186,7 @@ void HeapObject::HeapObjectPrint(FILE* out) {
|
||||
Cell::cast(this)->CellPrint(out);
|
||||
break;
|
||||
case PROPERTY_CELL_TYPE:
|
||||
JSGlobalPropertyCell::cast(this)->JSGlobalPropertyCellPrint(out);
|
||||
PropertyCell::cast(this)->PropertyCellPrint(out);
|
||||
break;
|
||||
case JS_ARRAY_BUFFER_TYPE:
|
||||
JSArrayBuffer::cast(this)->JSArrayBufferPrint(out);
|
||||
@ -926,8 +926,8 @@ void Cell::CellPrint(FILE* out) {
|
||||
}
|
||||
|
||||
|
||||
void JSGlobalPropertyCell::JSGlobalPropertyCellPrint(FILE* out) {
|
||||
HeapObject::PrintHeader(out, "JSGlobalPropertyCell");
|
||||
void PropertyCell::PropertyCellPrint(FILE* out) {
|
||||
HeapObject::PrintHeader(out, "PropertyCell");
|
||||
}
|
||||
|
||||
|
||||
|
@ -203,7 +203,7 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() {
|
||||
|
||||
table_.Register(kVisitPropertyCell,
|
||||
&FixedBodyVisitor<StaticVisitor,
|
||||
JSGlobalPropertyCell::BodyDescriptor,
|
||||
PropertyCell::BodyDescriptor,
|
||||
void>::Visit);
|
||||
|
||||
table_.template RegisterSpecializations<DataObjectVisitor,
|
||||
|
@ -629,9 +629,9 @@ Object* JSObject::GetNormalizedProperty(LookupResult* result) {
|
||||
ASSERT(!HasFastProperties());
|
||||
Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry());
|
||||
if (IsGlobalObject()) {
|
||||
value = JSGlobalPropertyCell::cast(value)->value();
|
||||
value = PropertyCell::cast(value)->value();
|
||||
}
|
||||
ASSERT(!value->IsJSGlobalPropertyCell() && !value->IsCell());
|
||||
ASSERT(!value->IsPropertyCell() && !value->IsCell());
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -639,7 +639,7 @@ Object* JSObject::GetNormalizedProperty(LookupResult* result) {
|
||||
Object* JSObject::SetNormalizedProperty(LookupResult* result, Object* value) {
|
||||
ASSERT(!HasFastProperties());
|
||||
if (IsGlobalObject()) {
|
||||
JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(
|
||||
PropertyCell* cell = PropertyCell::cast(
|
||||
property_dictionary()->ValueAt(result->GetDictionaryEntry()));
|
||||
cell->set_value(value);
|
||||
} else {
|
||||
@ -669,7 +669,7 @@ MaybeObject* JSObject::SetNormalizedProperty(Name* name,
|
||||
if (IsGlobalObject()) {
|
||||
Heap* heap = name->GetHeap();
|
||||
MaybeObject* maybe_store_value =
|
||||
heap->AllocateJSGlobalPropertyCell(value);
|
||||
heap->AllocatePropertyCell(value);
|
||||
if (!maybe_store_value->ToObject(&store_value)) return maybe_store_value;
|
||||
}
|
||||
Object* dict;
|
||||
@ -696,8 +696,8 @@ MaybeObject* JSObject::SetNormalizedProperty(Name* name,
|
||||
details.attributes(), details.type(), enumeration_index);
|
||||
|
||||
if (IsGlobalObject()) {
|
||||
JSGlobalPropertyCell* cell =
|
||||
JSGlobalPropertyCell::cast(property_dictionary()->ValueAt(entry));
|
||||
PropertyCell* cell =
|
||||
PropertyCell::cast(property_dictionary()->ValueAt(entry));
|
||||
cell->set_value(value);
|
||||
// Please note we have to update the property details.
|
||||
property_dictionary()->DetailsAtPut(entry, details);
|
||||
@ -729,8 +729,7 @@ MaybeObject* JSObject::DeleteNormalizedProperty(Name* name, DeleteMode mode) {
|
||||
ASSERT(new_map->is_dictionary_map());
|
||||
set_map(new_map);
|
||||
}
|
||||
JSGlobalPropertyCell* cell =
|
||||
JSGlobalPropertyCell::cast(dictionary->ValueAt(entry));
|
||||
PropertyCell* cell = PropertyCell::cast(dictionary->ValueAt(entry));
|
||||
cell->set_value(cell->GetHeap()->the_hole_value());
|
||||
dictionary->DetailsAtPut(entry, details.AsDeleted());
|
||||
} else {
|
||||
@ -1572,7 +1571,7 @@ void HeapObject::HeapObjectShortPrint(StringStream* accumulator) {
|
||||
break;
|
||||
case PROPERTY_CELL_TYPE:
|
||||
accumulator->Add("PropertyCell for ");
|
||||
JSGlobalPropertyCell::cast(this)->value()->ShortPrint(accumulator);
|
||||
PropertyCell::cast(this)->value()->ShortPrint(accumulator);
|
||||
break;
|
||||
default:
|
||||
accumulator->Add("<Other heap object (%d)>", map()->instance_type());
|
||||
@ -1668,7 +1667,7 @@ void HeapObject::IterateBody(InstanceType type, int object_size,
|
||||
Cell::BodyDescriptor::IterateBody(this, v);
|
||||
break;
|
||||
case PROPERTY_CELL_TYPE:
|
||||
JSGlobalPropertyCell::BodyDescriptor::IterateBody(this, v);
|
||||
PropertyCell::BodyDescriptor::IterateBody(this, v);
|
||||
break;
|
||||
case SYMBOL_TYPE:
|
||||
Symbol::BodyDescriptor::IterateBody(this, v);
|
||||
@ -1937,7 +1936,7 @@ MaybeObject* JSObject::AddSlowProperty(Name* name,
|
||||
int entry = dict->FindEntry(name);
|
||||
if (entry != NameDictionary::kNotFound) {
|
||||
store_value = dict->ValueAt(entry);
|
||||
JSGlobalPropertyCell::cast(store_value)->set_value(value);
|
||||
PropertyCell::cast(store_value)->set_value(value);
|
||||
// Assign an enumeration index to the property and update
|
||||
// SetNextEnumerationIndex.
|
||||
int index = dict->NextEnumerationIndex();
|
||||
@ -1948,10 +1947,10 @@ MaybeObject* JSObject::AddSlowProperty(Name* name,
|
||||
}
|
||||
Heap* heap = GetHeap();
|
||||
{ MaybeObject* maybe_store_value =
|
||||
heap->AllocateJSGlobalPropertyCell(value);
|
||||
heap->AllocatePropertyCell(value);
|
||||
if (!maybe_store_value->ToObject(&store_value)) return maybe_store_value;
|
||||
}
|
||||
JSGlobalPropertyCell::cast(store_value)->set_value(value);
|
||||
PropertyCell::cast(store_value)->set_value(value);
|
||||
}
|
||||
PropertyDetails details = PropertyDetails(attributes, NORMAL, 0);
|
||||
Object* result;
|
||||
@ -3273,7 +3272,7 @@ void JSObject::LocalLookupRealNamedProperty(Name* name, LookupResult* result) {
|
||||
result->NotFound();
|
||||
return;
|
||||
}
|
||||
value = JSGlobalPropertyCell::cast(value)->value();
|
||||
value = PropertyCell::cast(value)->value();
|
||||
}
|
||||
// Make sure to disallow caching for uninitialized constants
|
||||
// found in the dictionary-mode objects.
|
||||
@ -14259,20 +14258,20 @@ MaybeObject* ExternalDoubleArray::SetValue(uint32_t index, Object* value) {
|
||||
}
|
||||
|
||||
|
||||
JSGlobalPropertyCell* GlobalObject::GetPropertyCell(LookupResult* result) {
|
||||
PropertyCell* GlobalObject::GetPropertyCell(LookupResult* result) {
|
||||
ASSERT(!HasFastProperties());
|
||||
Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry());
|
||||
return JSGlobalPropertyCell::cast(value);
|
||||
return PropertyCell::cast(value);
|
||||
}
|
||||
|
||||
|
||||
Handle<JSGlobalPropertyCell> GlobalObject::EnsurePropertyCell(
|
||||
Handle<PropertyCell> GlobalObject::EnsurePropertyCell(
|
||||
Handle<GlobalObject> global,
|
||||
Handle<Name> name) {
|
||||
Isolate* isolate = global->GetIsolate();
|
||||
CALL_HEAP_FUNCTION(isolate,
|
||||
global->EnsurePropertyCell(*name),
|
||||
JSGlobalPropertyCell);
|
||||
PropertyCell);
|
||||
}
|
||||
|
||||
|
||||
@ -14283,7 +14282,7 @@ MaybeObject* GlobalObject::EnsurePropertyCell(Name* name) {
|
||||
Heap* heap = GetHeap();
|
||||
Object* cell;
|
||||
{ MaybeObject* maybe_cell =
|
||||
heap->AllocateJSGlobalPropertyCell(heap->the_hole_value());
|
||||
heap->AllocatePropertyCell(heap->the_hole_value());
|
||||
if (!maybe_cell->ToObject(&cell)) return maybe_cell;
|
||||
}
|
||||
PropertyDetails details(NONE, NORMAL, 0);
|
||||
@ -14297,7 +14296,7 @@ MaybeObject* GlobalObject::EnsurePropertyCell(Name* name) {
|
||||
return cell;
|
||||
} else {
|
||||
Object* value = property_dictionary()->ValueAt(entry);
|
||||
ASSERT(value->IsJSGlobalPropertyCell());
|
||||
ASSERT(value->IsPropertyCell());
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@ -15080,8 +15079,8 @@ Object* Dictionary<Shape, Key>::SlowReverseLookup(Object* value) {
|
||||
Object* k = HashTable<Shape, Key>::KeyAt(i);
|
||||
if (Dictionary<Shape, Key>::IsKey(k)) {
|
||||
Object* e = ValueAt(i);
|
||||
if (e->IsJSGlobalPropertyCell()) {
|
||||
e = JSGlobalPropertyCell::cast(e)->value();
|
||||
if (e->IsPropertyCell()) {
|
||||
e = PropertyCell::cast(e)->value();
|
||||
}
|
||||
if (e == value) return k;
|
||||
}
|
||||
@ -15811,12 +15810,12 @@ void JSTypedArray::Neuter() {
|
||||
}
|
||||
|
||||
|
||||
Type* JSGlobalPropertyCell::type() {
|
||||
Type* PropertyCell::type() {
|
||||
return static_cast<Type*>(type_raw());
|
||||
}
|
||||
|
||||
|
||||
void JSGlobalPropertyCell::set_type(Type* type, WriteBarrierMode ignored) {
|
||||
void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) {
|
||||
set_type_raw(type, ignored);
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
||||
// - Symbol
|
||||
// - HeapNumber
|
||||
// - Cell
|
||||
// - JSGlobalPropertyCell
|
||||
// - PropertyCell
|
||||
// - Code
|
||||
// - Map
|
||||
// - Oddball
|
||||
@ -1017,7 +1017,7 @@ class MaybeObject BASE_EMBEDDED {
|
||||
V(UndetectableObject) \
|
||||
V(AccessCheckNeeded) \
|
||||
V(Cell) \
|
||||
V(JSGlobalPropertyCell) \
|
||||
V(PropertyCell) \
|
||||
V(ObjectHashTable) \
|
||||
|
||||
|
||||
@ -4379,7 +4379,7 @@ class DeoptimizationOutputData: public FixedArray {
|
||||
|
||||
// Forward declaration.
|
||||
class Cell;
|
||||
class JSGlobalPropertyCell;
|
||||
class PropertyCell;
|
||||
|
||||
// TypeFeedbackCells is a fixed array used to hold the association between
|
||||
// cache cells and AST ids for code generated by the full compiler.
|
||||
@ -6809,7 +6809,7 @@ class GlobalObject: public JSObject {
|
||||
DECL_ACCESSORS(global_receiver, JSObject)
|
||||
|
||||
// Retrieve the property cell used to store a property.
|
||||
JSGlobalPropertyCell* GetPropertyCell(LookupResult* result);
|
||||
PropertyCell* GetPropertyCell(LookupResult* result);
|
||||
|
||||
// This is like GetProperty, but is used when you know the lookup won't fail
|
||||
// by throwing an exception. This is for the debug and builtins global
|
||||
@ -6821,7 +6821,7 @@ class GlobalObject: public JSObject {
|
||||
}
|
||||
|
||||
// Ensure that the global object has a cell for the given property name.
|
||||
static Handle<JSGlobalPropertyCell> EnsurePropertyCell(
|
||||
static Handle<PropertyCell> EnsurePropertyCell(
|
||||
Handle<GlobalObject> global,
|
||||
Handle<Name> name);
|
||||
// TODO(kmillikin): This function can be eliminated once the stub cache is
|
||||
@ -8553,7 +8553,7 @@ class Cell: public HeapObject {
|
||||
|
||||
static inline Cell* FromValueAddress(Address value) {
|
||||
Object* result = FromAddress(value - kValueOffset);
|
||||
ASSERT(result->IsCell() || result->IsJSGlobalPropertyCell());
|
||||
ASSERT(result->IsCell() || result->IsPropertyCell());
|
||||
return static_cast<Cell*>(result);
|
||||
}
|
||||
|
||||
@ -8578,21 +8578,21 @@ class Cell: public HeapObject {
|
||||
};
|
||||
|
||||
|
||||
class JSGlobalPropertyCell: public Cell {
|
||||
class PropertyCell: public Cell {
|
||||
public:
|
||||
Type* type();
|
||||
void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
|
||||
|
||||
// Casting.
|
||||
static inline JSGlobalPropertyCell* cast(Object* obj);
|
||||
static inline PropertyCell* cast(Object* obj);
|
||||
|
||||
inline Address TypeAddress() {
|
||||
return address() + kTypeOffset;
|
||||
}
|
||||
|
||||
// Dispatched behavior.
|
||||
DECLARE_PRINTER(JSGlobalPropertyCell)
|
||||
DECLARE_VERIFIER(JSGlobalPropertyCell)
|
||||
DECLARE_PRINTER(PropertyCell)
|
||||
DECLARE_VERIFIER(PropertyCell)
|
||||
|
||||
// Layout description.
|
||||
static const int kTypeOffset = kValueOffset + kPointerSize;
|
||||
@ -8601,11 +8601,11 @@ class JSGlobalPropertyCell: public Cell {
|
||||
typedef FixedBodyDescriptor<
|
||||
kValueOffset,
|
||||
kTypeOffset + kPointerSize,
|
||||
JSGlobalPropertyCell::kSize> BodyDescriptor;
|
||||
PropertyCell::kSize> BodyDescriptor;
|
||||
|
||||
private:
|
||||
DECL_ACCESSORS(type_raw, Object)
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalPropertyCell);
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell);
|
||||
};
|
||||
|
||||
|
||||
|
@ -351,7 +351,7 @@ class LookupResult BASE_EMBEDDED {
|
||||
Object* value;
|
||||
value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry());
|
||||
if (holder()->IsGlobalObject()) {
|
||||
value = JSGlobalPropertyCell::cast(value)->value();
|
||||
value = PropertyCell::cast(value)->value();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@ -4513,7 +4513,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_KeyedGetProperty) {
|
||||
(dictionary->DetailsAt(entry).type() == NORMAL)) {
|
||||
Object* value = dictionary->ValueAt(entry);
|
||||
if (!receiver->IsGlobalObject()) return value;
|
||||
value = JSGlobalPropertyCell::cast(value)->value();
|
||||
value = PropertyCell::cast(value)->value();
|
||||
if (!value->IsTheHole()) return value;
|
||||
// If value is the hole do the general lookup.
|
||||
}
|
||||
|
@ -2897,7 +2897,7 @@ void CellSpace::VerifyObject(HeapObject* object) {
|
||||
|
||||
void PropertyCellSpace::VerifyObject(HeapObject* object) {
|
||||
// The object should be a global object property cell or a free-list node.
|
||||
CHECK(object->IsJSGlobalPropertyCell() ||
|
||||
CHECK(object->IsPropertyCell() ||
|
||||
object->map() == heap()->two_pointer_filler_map());
|
||||
}
|
||||
|
||||
|
@ -2660,14 +2660,14 @@ class PropertyCellSpace : public FixedSpace {
|
||||
// Creates a property cell space object with a maximum capacity.
|
||||
PropertyCellSpace(Heap* heap, intptr_t max_capacity,
|
||||
AllocationSpace id)
|
||||
: FixedSpace(heap, max_capacity, id, JSGlobalPropertyCell::kSize)
|
||||
: FixedSpace(heap, max_capacity, id, PropertyCell::kSize)
|
||||
{}
|
||||
|
||||
virtual int RoundSizeDownToObjectAlignment(int size) {
|
||||
if (IsPowerOf2(JSGlobalPropertyCell::kSize)) {
|
||||
return RoundDown(size, JSGlobalPropertyCell::kSize);
|
||||
if (IsPowerOf2(PropertyCell::kSize)) {
|
||||
return RoundDown(size, PropertyCell::kSize);
|
||||
} else {
|
||||
return (size / JSGlobalPropertyCell::kSize) * JSGlobalPropertyCell::kSize;
|
||||
return (size / PropertyCell::kSize) * PropertyCell::kSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ Handle<Code> StubCache::ComputeLoadNormal(Handle<Name> name,
|
||||
Handle<Code> StubCache::ComputeLoadGlobal(Handle<Name> name,
|
||||
Handle<JSObject> receiver,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
bool is_dont_delete) {
|
||||
Handle<JSObject> stub_holder = StubHolder(receiver, holder);
|
||||
Handle<Code> stub = FindIC(name, stub_holder, Code::LOAD_IC, Code::NORMAL);
|
||||
@ -497,7 +497,7 @@ Handle<Code> StubCache::ComputeStoreNormal(StrictModeFlag strict_mode) {
|
||||
|
||||
Handle<Code> StubCache::ComputeStoreGlobal(Handle<Name> name,
|
||||
Handle<GlobalObject> receiver,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
StrictModeFlag strict_mode) {
|
||||
Handle<Code> stub = FindIC(
|
||||
name, Handle<JSObject>::cast(receiver),
|
||||
@ -734,7 +734,7 @@ Handle<Code> StubCache::ComputeCallGlobal(int argc,
|
||||
Handle<Name> name,
|
||||
Handle<JSObject> receiver,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<JSFunction> function) {
|
||||
InlineCacheHolderFlag cache_holder =
|
||||
IC::GetCodeCacheForObject(*receiver, *holder);
|
||||
|
@ -140,7 +140,7 @@ class StubCache {
|
||||
Handle<Code> ComputeLoadGlobal(Handle<Name> name,
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
bool is_dont_delete);
|
||||
|
||||
// ---
|
||||
@ -183,7 +183,7 @@ class StubCache {
|
||||
|
||||
Handle<Code> ComputeStoreGlobal(Handle<Name> name,
|
||||
Handle<GlobalObject> object,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
StrictModeFlag strict_mode);
|
||||
|
||||
Handle<Code> ComputeStoreCallback(Handle<Name> name,
|
||||
@ -251,7 +251,7 @@ class StubCache {
|
||||
Handle<Name> name,
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<JSFunction> function);
|
||||
|
||||
// ---
|
||||
@ -765,7 +765,7 @@ class LoadStubCompiler: public BaseLoadStubCompiler {
|
||||
|
||||
Handle<Code> CompileLoadGlobal(Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name,
|
||||
bool is_dont_delete);
|
||||
|
||||
@ -890,7 +890,7 @@ class StoreStubCompiler: public BaseStoreStubCompiler {
|
||||
Handle<Name> name);
|
||||
|
||||
Handle<Code> CompileStoreGlobal(Handle<GlobalObject> object,
|
||||
Handle<JSGlobalPropertyCell> holder,
|
||||
Handle<PropertyCell> holder,
|
||||
Handle<Name> name);
|
||||
|
||||
private:
|
||||
@ -1007,7 +1007,7 @@ class CallStubCompiler: public StubCompiler {
|
||||
|
||||
Handle<Code> CompileCallGlobal(Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<JSFunction> function,
|
||||
Handle<Name> name);
|
||||
|
||||
|
@ -746,7 +746,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm,
|
||||
Handle<Name> name,
|
||||
Register scratch,
|
||||
Label* miss) {
|
||||
Handle<JSGlobalPropertyCell> cell =
|
||||
Handle<PropertyCell> cell =
|
||||
GlobalObject::EnsurePropertyCell(global, name);
|
||||
ASSERT(cell->value()->IsTheHole());
|
||||
__ Move(scratch, cell);
|
||||
@ -2472,7 +2472,7 @@ Handle<Code> CallStubCompiler::CompileCallConstant(
|
||||
Handle<JSFunction> function) {
|
||||
if (HasCustomCallGenerator(function)) {
|
||||
Handle<Code> code = CompileCustomCall(object, holder,
|
||||
Handle<JSGlobalPropertyCell>::null(),
|
||||
Handle<PropertyCell>::null(),
|
||||
function, Handle<String>::cast(name));
|
||||
// A null handle means bail out to the regular compiler code below.
|
||||
if (!code.is_null()) return code;
|
||||
@ -2552,7 +2552,7 @@ Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object,
|
||||
Handle<Code> CallStubCompiler::CompileCallGlobal(
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> holder,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<JSFunction> function,
|
||||
Handle<Name> name) {
|
||||
// ----------- S t a t e -------------
|
||||
@ -2735,7 +2735,7 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
||||
|
||||
Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
Handle<GlobalObject> object,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name) {
|
||||
Label miss;
|
||||
|
||||
@ -2747,7 +2747,7 @@ Handle<Code> StoreStubCompiler::CompileStoreGlobal(
|
||||
// Compute the cell operand to use.
|
||||
__ Move(scratch1(), cell);
|
||||
Operand cell_operand =
|
||||
FieldOperand(scratch1(), JSGlobalPropertyCell::kValueOffset);
|
||||
FieldOperand(scratch1(), PropertyCell::kValueOffset);
|
||||
|
||||
// Check that the value in the cell is not the hole. If it is, this
|
||||
// cell could have been deleted and reintroducing the global needs
|
||||
@ -2915,7 +2915,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
|
||||
Handle<Code> LoadStubCompiler::CompileLoadGlobal(
|
||||
Handle<JSObject> object,
|
||||
Handle<GlobalObject> global,
|
||||
Handle<JSGlobalPropertyCell> cell,
|
||||
Handle<PropertyCell> cell,
|
||||
Handle<Name> name,
|
||||
bool is_dont_delete) {
|
||||
Label success, miss;
|
||||
@ -2929,7 +2929,7 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal(
|
||||
|
||||
// Get the value from the cell.
|
||||
__ Move(rbx, cell);
|
||||
__ movq(rbx, FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset));
|
||||
__ movq(rbx, FieldOperand(rbx, PropertyCell::kValueOffset));
|
||||
|
||||
// Check for deleted property if property can actually be deleted.
|
||||
if (!is_dont_delete) {
|
||||
|
Loading…
Reference in New Issue
Block a user