Search in sources :

Example 1 with SIMD

use of com.github.anba.es6draft.runtime.objects.simd.SIMD in project es6draft by anba.

the class Float32x4Constructor method call.

@Override
public Object call(ExecutionContext callerContext, Object thisValue, Object... args) {
    ExecutionContext calleeContext = calleeContext();
    Object[] fields = new Object[VECTOR_LENGTH];
    for (int i = 0; i < VECTOR_LENGTH; ++i) {
        fields[i] = i < args.length ? args[i] : UNDEFINED;
    }
    return SIMDCreateFloat(calleeContext, SIMD_TYPE, fields, SIMD::ToFloat32);
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) ScriptObject(com.github.anba.es6draft.runtime.types.ScriptObject) SIMD(com.github.anba.es6draft.runtime.objects.simd.SIMD)

Aggregations

ExecutionContext (com.github.anba.es6draft.runtime.ExecutionContext)1 SIMD (com.github.anba.es6draft.runtime.objects.simd.SIMD)1 ScriptObject (com.github.anba.es6draft.runtime.types.ScriptObject)1