void InstructionSelection::loadRegexp(IR::RegExp *sourceRegexp, IR::Temp *targetTemp)
{
+ VM::Value v = VM::Value::fromObject(engine()->newRegExpObject(
+ *sourceRegexp->value,
+ sourceRegexp->flags));
+ _vmFunction->generatedValues.append(v);
+
Instruction::LoadValue load;
- load.value = Instr::Param::createValue(
- VM::Value::fromObject(engine()->newRegExpObject(
- *sourceRegexp->value,
- sourceRegexp->flags)));
+ load.value = Instr::Param::createValue(v);
load.result = getResultParam(targetTemp);
addInstruction(load);
}
MOTH_END_INSTR(CallValue)
MOTH_BEGIN_INSTR(CallProperty)
- TRACE(property name, "%s", qPrintable(instr.name->toQString()));
+ TRACE(property name, "%s, args=%u, argc=%u", qPrintable(instr.name->toQString()), instr.args, instr.argc);
Q_ASSERT(instr.args + instr.argc < stackSize);
VM::Value *args = stack + instr.args;
VALUE(instr.result) = __qmljs_call_property(context, VALUE(instr.base), instr.name, args, instr.argc);