Search in sources :

Example 1 with AbstractOperations

use of com.github.anba.es6draft.runtime.AbstractOperations in project es6draft by anba.

the class Int8x16Constructor 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 SIMDCreateInt(calleeContext, SIMD_TYPE, fields, AbstractOperations::ToInt8);
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) ScriptObject(com.github.anba.es6draft.runtime.types.ScriptObject) AbstractOperations(com.github.anba.es6draft.runtime.AbstractOperations)

Example 2 with AbstractOperations

use of com.github.anba.es6draft.runtime.AbstractOperations in project es6draft by anba.

the class Bool16x8Constructor 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 SIMDCreateBool(calleeContext, SIMD_TYPE, fields, AbstractOperations::ToBoolean);
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) ScriptObject(com.github.anba.es6draft.runtime.types.ScriptObject) AbstractOperations(com.github.anba.es6draft.runtime.AbstractOperations)

Example 3 with AbstractOperations

use of com.github.anba.es6draft.runtime.AbstractOperations in project es6draft by anba.

the class Bool64x2Constructor 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 SIMDCreateBool(calleeContext, SIMD_TYPE, fields, AbstractOperations::ToBoolean);
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) ScriptObject(com.github.anba.es6draft.runtime.types.ScriptObject) AbstractOperations(com.github.anba.es6draft.runtime.AbstractOperations)

Example 4 with AbstractOperations

use of com.github.anba.es6draft.runtime.AbstractOperations in project es6draft by anba.

the class Int32x4Constructor 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 SIMDCreateInt(calleeContext, SIMD_TYPE, fields, AbstractOperations::ToInt32);
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) ScriptObject(com.github.anba.es6draft.runtime.types.ScriptObject) AbstractOperations(com.github.anba.es6draft.runtime.AbstractOperations)

Example 5 with AbstractOperations

use of com.github.anba.es6draft.runtime.AbstractOperations in project es6draft by anba.

the class Uint8x16Constructor 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 SIMDCreateInt(calleeContext, SIMD_TYPE, fields, AbstractOperations::ToUint8);
}
Also used : ExecutionContext(com.github.anba.es6draft.runtime.ExecutionContext) ScriptObject(com.github.anba.es6draft.runtime.types.ScriptObject) AbstractOperations(com.github.anba.es6draft.runtime.AbstractOperations)

Aggregations

AbstractOperations (com.github.anba.es6draft.runtime.AbstractOperations)10 ExecutionContext (com.github.anba.es6draft.runtime.ExecutionContext)10 ScriptObject (com.github.anba.es6draft.runtime.types.ScriptObject)10