X87: Use weak cells to embed maps in store handler.

port 3fc9c9b665

original commit message:

  Use weak cells to embed maps in store handler.
  BUG=v8:3629
R=weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#25649}
This commit is contained in:
cdai2 2014-12-04 12:32:42 +08:00
parent 3881b64532
commit ed95aaaba4
3 changed files with 16 additions and 19 deletions

View File

@ -329,10 +329,23 @@ void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
}
void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap(
Handle<Name> name, Handle<Map> transition) {
void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) {
__ mov(this->name(), Immediate(name));
__ mov(StoreTransitionDescriptor::MapRegister(), Immediate(transition));
}
void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition,
Register scratch,
Label* miss) {
Handle<WeakCell> cell = Map::WeakCellForMap(transition);
Register map_reg = StoreTransitionDescriptor::MapRegister();
DCHECK(!map_reg.is(scratch));
__ LoadWeakValue(map_reg, cell, miss);
if (transition->CanBeDeprecated()) {
__ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset));
__ and_(scratch, Immediate(Map::Deprecated::kMask));
__ j(not_zero, miss);
}
}

View File

@ -3087,18 +3087,6 @@ void MacroAssembler::CheckPageFlagForMap(
}
void MacroAssembler::CheckMapDeprecated(Handle<Map> map,
Register scratch,
Label* if_deprecated) {
if (map->CanBeDeprecated()) {
mov(scratch, map);
mov(scratch, FieldOperand(scratch, Map::kBitField3Offset));
and_(scratch, Immediate(Map::Deprecated::kMask));
j(not_zero, if_deprecated);
}
}
void MacroAssembler::JumpIfBlack(Register object,
Register scratch0,
Register scratch1,

View File

@ -93,10 +93,6 @@ class MacroAssembler: public Assembler {
Label* condition_met,
Label::Distance condition_met_distance = Label::kFar);
void CheckMapDeprecated(Handle<Map> map,
Register scratch,
Label* if_deprecated);
// Check if object is in new space. Jumps if the object is not in new space.
// The register scratch can be object itself, but scratch will be clobbered.
void JumpIfNotInNewSpace(Register object,