Upstream version 8.37.186.0
[platform/framework/web/crosswalk.git] / src / v8 / src / hydrogen.h
index 5df1d65..39ce0fb 100644 (file)
@@ -2431,14 +2431,16 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
     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
@@ -2458,6 +2460,18 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
         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();
@@ -2499,6 +2513,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
     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_; }
@@ -2507,6 +2522,25 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
     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(); }
@@ -2537,6 +2571,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
     SmallMapList field_maps_;
     HType field_type_;
     HObjectAccess access_;
+    InstanceType instance_type_;
   };
 
   HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info,