Commit 62c54651 authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: Remove PropertyCell space

port 16c8485a (r27269).

original commit message:

  Replaces StoreGlobalCell / LoadGlobalCell with NamedField variants that use write barriers.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27395}
parent 40de9c3f
...@@ -3139,16 +3139,6 @@ void LCodeGen::DoReturn(LReturn* instr) { ...@@ -3139,16 +3139,6 @@ void LCodeGen::DoReturn(LReturn* instr) {
} }
void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
Register result = ToRegister(instr->result());
__ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle()));
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(result, factory()->the_hole_value());
DeoptimizeIf(equal, instr, Deoptimizer::kHole);
}
}
template <class T> template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) { void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics); DCHECK(FLAG_vector_ics);
...@@ -3184,25 +3174,6 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { ...@@ -3184,25 +3174,6 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
} }
void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
Register value = ToRegister(instr->value());
Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle();
// If the cell we are storing to contains the hole it could have
// been deleted from the property dictionary. In that case, we need
// to update the property details in the property dictionary to mark
// it as no longer deleted. We deoptimize in that case.
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value());
DeoptimizeIf(equal, instr, Deoptimizer::kHole);
}
// Store the value.
__ mov(Operand::ForCell(cell_handle), value);
// Cells are always rescanned, so no write barrier here.
}
void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
Register context = ToRegister(instr->context()); Register context = ToRegister(instr->context());
Register result = ToRegister(instr->result()); Register result = ToRegister(instr->result());
......
...@@ -2130,14 +2130,6 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { ...@@ -2130,14 +2130,6 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
} }
LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
return instr->RequiresHoleCheck()
? AssignEnvironment(DefineAsRegister(result))
: DefineAsRegister(result);
}
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), esi); LOperand* context = UseFixed(instr->context(), esi);
LOperand* global_object = LOperand* global_object =
...@@ -2153,13 +2145,6 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { ...@@ -2153,13 +2145,6 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
} }
LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
LStoreGlobalCell* result =
new(zone()) LStoreGlobalCell(UseRegister(instr->value()));
return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result;
}
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
LOperand* context = UseRegisterAtStart(instr->value()); LOperand* context = UseRegisterAtStart(instr->value());
LInstruction* result = LInstruction* result =
......
...@@ -104,7 +104,6 @@ class LCodeGen; ...@@ -104,7 +104,6 @@ class LCodeGen;
V(LoadContextSlot) \ V(LoadContextSlot) \
V(LoadFieldByIndex) \ V(LoadFieldByIndex) \
V(LoadFunctionPrototype) \ V(LoadFunctionPrototype) \
V(LoadGlobalCell) \
V(LoadGlobalGeneric) \ V(LoadGlobalGeneric) \
V(LoadKeyed) \ V(LoadKeyed) \
V(LoadKeyedGeneric) \ V(LoadKeyedGeneric) \
...@@ -145,7 +144,6 @@ class LCodeGen; ...@@ -145,7 +144,6 @@ class LCodeGen;
V(StoreCodeEntry) \ V(StoreCodeEntry) \
V(StoreContextSlot) \ V(StoreContextSlot) \
V(StoreFrameContext) \ V(StoreFrameContext) \
V(StoreGlobalCell) \
V(StoreKeyed) \ V(StoreKeyed) \
V(StoreKeyedGeneric) \ V(StoreKeyedGeneric) \
V(StoreNamedField) \ V(StoreNamedField) \
...@@ -1726,13 +1724,6 @@ class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> { ...@@ -1726,13 +1724,6 @@ class LLoadKeyedGeneric FINAL : public LTemplateInstruction<1, 3, 1> {
}; };
class LLoadGlobalCell FINAL : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
};
class LLoadGlobalGeneric FINAL : public LTemplateInstruction<1, 2, 1> { class LLoadGlobalGeneric FINAL : public LTemplateInstruction<1, 2, 1> {
public: public:
LLoadGlobalGeneric(LOperand* context, LOperand* global_object, LLoadGlobalGeneric(LOperand* context, LOperand* global_object,
...@@ -1754,19 +1745,6 @@ class LLoadGlobalGeneric FINAL : public LTemplateInstruction<1, 2, 1> { ...@@ -1754,19 +1745,6 @@ class LLoadGlobalGeneric FINAL : public LTemplateInstruction<1, 2, 1> {
}; };
class LStoreGlobalCell FINAL : public LTemplateInstruction<0, 1, 0> {
public:
explicit LStoreGlobalCell(LOperand* value) {
inputs_[0] = value;
}
LOperand* value() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
};
class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> { class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
public: public:
explicit LLoadContextSlot(LOperand* context) { explicit LLoadContextSlot(LOperand* context) {
......
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