HGraph* graph = instr->block()->graph();
HCheckMaps* new_check_maps =
HCheckMaps::New(graph->zone(), NULL, instr->value(),
- intersection, instr->typecheck());
+ intersection, instr->typecheck(),
+ instr->has_migration_target());
if (entry->check_ != NULL &&
entry->check_->block() == instr->block()) {
// There is a check in the same block so replace it with a more
public:
static HCheckMaps* New(Zone* zone, HValue* context, HValue* value,
Handle<Map> map, CompilationInfo* info,
- HValue *typecheck = NULL);
+ HValue* typecheck = NULL);
static HCheckMaps* New(Zone* zone, HValue* context,
HValue* value, SmallMapList* maps,
- HValue *typecheck = NULL) {
+ HValue* typecheck = NULL) {
HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
for (int i = 0; i < maps->length(); i++) {
check_map->Add(maps->at(i), zone);
}
return check_map;
}
+ // HCheckMaps creation method safe for using during concurrent compilation
+ // (does not dereference maps handles).
static HCheckMaps* New(Zone* zone, HValue* context,
HValue* value, UniqueSet<Map>* maps,
- HValue *typecheck = NULL) {
+ HValue* typecheck,
+ bool has_migration_target) {
HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
for (int i = 0; i < maps->size(); i++) {
- check_map->Add(maps->at(i).handle(), zone);
+ check_map->map_set_.Add(maps->at(i), zone);
+ }
+ if (has_migration_target) {
+ check_map->has_migration_target_ = true;
+ check_map->SetGVNFlag(kChangesNewSpacePromotion);
}
return check_map;
}