Register storage_reg = name_reg;
- if (FLAG_track_fields && representation.IsSmi()) {
+ if (details.type() == CONSTANT_FUNCTION) {
+ Handle<HeapObject> constant(
+ HeapObject::cast(descriptors->GetValue(descriptor)));
+ __ LoadHeapObject(scratch1, constant);
+ __ cmp(value_reg, scratch1);
+ __ b(ne, miss_restore_name);
+ } else if (FLAG_track_fields && representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_restore_name);
} else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
__ JumpIfSmi(value_reg, miss_restore_name);
OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK);
+ if (details.type() == CONSTANT_FUNCTION) return;
+
int index = transition->instance_descriptors()->GetFieldIndex(
transition->LastAdded());
Register storage_reg = name_reg;
- if (FLAG_track_fields && representation.IsSmi()) {
- __ JumpIfNotSmi(value_reg, miss_restore_name);
+ if (details.type() == CONSTANT_FUNCTION) {
+ Handle<HeapObject> constant(
+ HeapObject::cast(descriptors->GetValue(descriptor)));
+ __ LoadHeapObject(scratch1, constant);
+ __ cmp(value_reg, scratch1);
+ __ j(not_equal, miss_restore_name);
+ } else if (FLAG_track_fields && representation.IsSmi()) {
+ __ JumpIfNotSmi(value_reg, miss_restore_name);
} else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
__ JumpIfSmi(value_reg, miss_restore_name);
} else if (FLAG_track_double_fields && representation.IsDouble()) {
OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK);
+ if (details.type() == CONSTANT_FUNCTION) return;
+
int index = transition->instance_descriptors()->GetFieldIndex(
transition->LastAdded());
DescriptorArray* target_descriptors = transition->instance_descriptors();
PropertyDetails details = target_descriptors->GetDetails(descriptor);
- if (details.type() != FIELD || details.attributes() != NONE) break;
+ if (details.type() == CALLBACKS || details.attributes() != NONE) break;
return isolate()->stub_cache()->ComputeStoreTransition(
name, receiver, lookup, transition, strict_mode);
DescriptorArray* target_descriptors = transition->instance_descriptors();
PropertyDetails details = target_descriptors->GetDetails(descriptor);
- if (details.type() == FIELD && details.attributes() == NONE) {
+ if (details.type() != CALLBACKS && details.attributes() == NONE) {
return isolate()->stub_cache()->ComputeKeyedStoreTransition(
name, receiver, lookup, transition, strict_mode);
}
return IsTransition() && GetTransitionDetails(map).type() == FIELD;
}
+ bool IsTransitionToConstantFunction(Map* map) {
+ return IsTransition() &&
+ GetTransitionDetails(map).type() == CONSTANT_FUNCTION;
+ }
+
Map* GetTransitionMap() {
ASSERT(IsTransition());
return Map::cast(GetValue());
Register storage_reg = name_reg;
- if (FLAG_track_fields && representation.IsSmi()) {
+ if (details.type() == CONSTANT_FUNCTION) {
+ Handle<HeapObject> constant(
+ HeapObject::cast(descriptors->GetValue(descriptor)));
+ __ LoadHeapObject(scratch1, constant);
+ __ cmpq(value_reg, scratch1);
+ __ j(not_equal, miss_restore_name);
+ } else if (FLAG_track_fields && representation.IsSmi()) {
__ JumpIfNotSmi(value_reg, miss_restore_name);
} else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
__ JumpIfSmi(value_reg, miss_restore_name);
OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK);
+ if (details.type() == CONSTANT_FUNCTION) return;
+
int index = transition->instance_descriptors()->GetFieldIndex(
transition->LastAdded());