Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,272 changes: 1,264 additions & 8 deletions src/interpreter/ByteCode.cpp

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions src/interpreter/ByteCode.h

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/interpreter/Interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2226,6 +2226,7 @@ ByteCodeStackOffset* Interpreter::interpret(ExecutionState& state,
auto& param = tag->functionType()->param().types();
for (size_t i = 0; i < param.size(); i++) {
auto sz = valueStackAllocatedSize(param[i]);
// auto sz = valueSize(param[i]);
memcpy(ptr, bp + code->dataOffsets()[i], sz);
ptr += sz;
}
Expand Down
2 changes: 1 addition & 1 deletion src/jit/Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void JITArg::set(Operand* operand)
Instruction* instr = VARIABLE_GET_IMM(*operand);

#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
ASSERT(instr->opcode() == ByteCode::Const32Opcode);
// ASSERT(instr->opcode() == ByteCode::Const32Opcode);

this->argw = static_cast<sljit_s32>(reinterpret_cast<Const32*>(instr->byteCode())->value());
#else /* !SLJIT_32BIT_ARCHITECTURE */
Expand Down
5 changes: 4 additions & 1 deletion src/jit/ByteCodeParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static void compileFunction(JITCompiler* compiler)
paramType = ParamTypes::ParamSrc2Dst;
info = Instruction::kIs32Bit;
if (opcode == ByteCode::I32AndOpcode) {
info |= Instruction::kIsMergeCompare;
// info |= Instruction::kIsMergeCompare;
}
requiredInit = OTOp2I32;
break;
Expand Down Expand Up @@ -2905,6 +2905,8 @@ const uint8_t* VariableList::getOperandDescriptor(Instruction* instr)
return instr->getOperandDescriptor();
}

size_t counter = 0;

void Module::jitCompile(ModuleFunction** functions, size_t functionsLength, uint32_t JITFlags)
{
JITCompiler compiler(this, JITFlags);
Expand All @@ -2913,6 +2915,7 @@ void Module::jitCompile(ModuleFunction** functions, size_t functionsLength, uint
size_t functionCount = m_functions.size();

for (size_t i = 0; i < functionCount; i++) {
counter++;
if (m_functions[i]->jitFunction() == nullptr) {
if (JITFlags & JITFlagValue::JITVerbose) {
printf("[[[[[[[ Function %3d ]]]]]]]\n", static_cast<int>(i));
Expand Down
Loading