PropertyAccessInfo(HOptimizedGraphBuilder* builder,
PropertyAccessType access_type,
Type* type,
- Handle<String> name)
+ Handle<String> name,
+ InstanceType instance_type)
: lookup_(builder->isolate()),
builder_(builder),
access_type_(access_type),
type_(type),
name_(name),
field_type_(HType::Tagged()),
- access_(HObjectAccess::ForMap()) { }
+ access_(HObjectAccess::ForMap()),
+ instance_type_(instance_type) { }
// Checkes whether this PropertyAccessInfo can be handled as a monomorphic
// load named. It additionally fills in the fields necessary to generate the
Context* context = current_info()->closure()->context();
context = context->native_context();
return handle(context->number_function()->initial_map());
+ } else if (instance_type_ == Float32x4::kInstanceType) {
+ Context* context = current_info()->closure()->context();
+ context = context->native_context();
+ return handle(context->float32x4_function()->initial_map());
+ } else if (instance_type_ == Float64x2::kInstanceType) {
+ Context* context = current_info()->closure()->context();
+ context = context->native_context();
+ return handle(context->float64x2_function()->initial_map());
+ } else if (instance_type_ == Int32x4::kInstanceType) {
+ Context* context = current_info()->closure()->context();
+ context = context->native_context();
+ return handle(context->int32x4_function()->initial_map());
} else if (type_->Is(Type::Boolean())) {
Context* context = current_info()->closure()->context();
context = context->native_context();
bool IsLoad() const { return access_type_ == LOAD; }
LookupResult* lookup() { return &lookup_; }
+ Handle<String> name() { return name_; }
Handle<JSObject> holder() { return holder_; }
Handle<JSFunction> accessor() { return accessor_; }
Handle<Object> constant() { return constant_; }
HType field_type() const { return field_type_; }
HObjectAccess access() { return access_; }
+ bool IsSIMD128PropertyCallback() {
+ return (((instance_type_ == Float32x4::kInstanceType ||
+ instance_type_ == Int32x4::kInstanceType) &&
+ (name_->Equals(isolate()->heap()->signMask()) ||
+ name_->Equals(isolate()->heap()->x()) ||
+ name_->Equals(isolate()->heap()->y()) ||
+ name_->Equals(isolate()->heap()->z()) ||
+ name_->Equals(isolate()->heap()->w()))) ||
+ (instance_type_ == Int32x4::kInstanceType &&
+ (name_->Equals(isolate()->heap()->flagX()) ||
+ name_->Equals(isolate()->heap()->flagY()) ||
+ name_->Equals(isolate()->heap()->flagZ()) ||
+ name_->Equals(isolate()->heap()->flagW()))) ||
+ (instance_type_ == Float64x2::kInstanceType &&
+ (name_->Equals(isolate()->heap()->signMask()) ||
+ name_->Equals(isolate()->heap()->x()) ||
+ name_->Equals(isolate()->heap()->y()))));
+ }
+
private:
Type* ToType(Handle<Map> map) { return builder_->ToType(map); }
Zone* zone() { return builder_->zone(); }
SmallMapList field_maps_;
HType field_type_;
HObjectAccess access_;
+ InstanceType instance_type_;
};
HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info,