use of com.github.anba.es6draft.runtime.ExecutionContext 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);
}
use of com.github.anba.es6draft.runtime.ExecutionContext 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);
}
use of com.github.anba.es6draft.runtime.ExecutionContext in project es6draft by anba.
the class CodeGenerator method compile.
MethodName compile(SwitchStatement node, BlockDeclarationInstantiationGenerator generator) {
if (!isCompiled(node)) {
MethodCode method = newMethod(node);
BlockDeclInitVisitor body = new BlockDeclInitVisitor(method);
body.lineInfo(node);
body.begin();
Variable<ExecutionContext> cx = body.getExecutionContext();
Variable<LexicalEnvironment<DeclarativeEnvironmentRecord>> env = body.getLexicalEnvironment();
generator.generateMethod(node, cx, env, body);
body._return();
body.end();
}
return methodDesc(node);
}
use of com.github.anba.es6draft.runtime.ExecutionContext in project es6draft by anba.
the class CodeGenerator method compile.
MethodName compile(SwitchStatement node, List<Declaration> declarations, BlockDeclarationInstantiationGenerator generator) {
MethodCode method = newMethod2(node);
BlockDeclInitVisitor body = new BlockDeclInitVisitor(method);
body.lineInfo(node);
body.begin();
Variable<ExecutionContext> cx = body.getExecutionContext();
Variable<LexicalEnvironment<DeclarativeEnvironmentRecord>> env = body.getLexicalEnvironment();
generator.generateMethod(declarations, cx, env, body);
body._return();
body.end();
return methodDesc(node, method.methodName);
}
use of com.github.anba.es6draft.runtime.ExecutionContext in project es6draft by anba.
the class CodeGenerator method compile.
MethodName compile(BlockStatement node, BlockDeclarationInstantiationGenerator generator) {
if (!isCompiled(node)) {
MethodCode method = newMethod(node);
BlockDeclInitVisitor body = new BlockDeclInitVisitor(method);
body.lineInfo(node);
body.begin();
Variable<ExecutionContext> cx = body.getExecutionContext();
Variable<LexicalEnvironment<DeclarativeEnvironmentRecord>> env = body.getLexicalEnvironment();
generator.generateMethod(node, cx, env, body);
body._return();
body.end();
}
return methodDesc(node);
}
Aggregations