MOTH_END_INSTR(CallBuiltinDeleteName)
MOTH_BEGIN_INSTR(CallBuiltinTypeofMember)
- VALUE(instr.result) = __qmljs_builtin_typeof_member(VALUE(instr.base), instr.member, context);
+ __qmljs_builtin_typeof_member(context, VALUEPTR(instr.result), VALUE(instr.base), instr.member);
MOTH_END_INSTR(CallBuiltinTypeofMember)
MOTH_BEGIN_INSTR(CallBuiltinTypeofSubscript)
return __qmljs_builtin_typeof(context->getPropertyNoThrow(name), context);
}
-Value __qmljs_builtin_typeof_member(Value base, String *name, ExecutionContext *context)
+void __qmljs_builtin_typeof_member(ExecutionContext *context, Value *result, const Value &base, String *name)
{
Value obj = base.toObject(context);
- return __qmljs_builtin_typeof(obj.objectValue()->__get__(context, name), context);
+ if (result)
+ *result = __qmljs_builtin_typeof(obj.objectValue()->__get__(context, name), context);
}
Value __qmljs_builtin_typeof_element(Value base, Value index, ExecutionContext *context)
Value __qmljs_builtin_typeof(Value val, ExecutionContext *ctx);
Value __qmljs_builtin_typeof_name(String *name, ExecutionContext *context);
-Value __qmljs_builtin_typeof_member(Value base, String *name, ExecutionContext *context);
+void __qmljs_builtin_typeof_member(ExecutionContext* context, Value* result, const Value &base, String *name);
Value __qmljs_builtin_typeof_element(Value base, Value index, ExecutionContext *context);
void __qmljs_builtin_post_increment(ExecutionContext *ctx, Value *result, Value *val);
void InstructionSelection::callBuiltinTypeofMember(IR::Temp *base, const QString &name, IR::Temp *result)
{
- generateFunctionCall(result, __qmljs_builtin_typeof_member, base, identifier(name), Assembler::ContextRegister);
+ generateFunctionCall(Assembler::Void, __qmljs_builtin_typeof_member, Assembler::ContextRegister, Assembler::PointerToValue(result), Assembler::PointerToValue(base), identifier(name));
}
void InstructionSelection::callBuiltinTypeofSubscript(IR::Temp *base, IR::Temp *index, IR::Temp *result)