Skip to content

Commit

Permalink
Fix minor defects
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 authored and ksh8281 committed Sep 10, 2024
1 parent 01f5ac2 commit 52716d7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/jit/Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class SlowCase {

CompileContext::CompileContext(Module* module, JITCompiler* compiler)
: compiler(compiler)
, branchTableOffset(0)
#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
, shuffleOffset(0)
#endif /* SLJIT_CONFIG_X86 */
Expand Down Expand Up @@ -1013,6 +1014,8 @@ JITCompiler::JITCompiler(Module* module, uint32_t JITFlags)
, m_tryBlockOffset(0)
, m_JITFlags(JITFlags)
, m_options(0)
, m_savedIntegerRegCount(0)
, m_savedFloatRegCount(0)
{
if (module->m_jitModule != nullptr) {
ASSERT(module->m_jitModule->m_instanceConstData != nullptr);
Expand Down
2 changes: 2 additions & 0 deletions src/jit/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ class ExtendedInstruction : public Instruction {
: Instruction(byteCode, group, opcode, paramCount, operands)
{
ASSERT(group == Instruction::DirectBranch || group == Instruction::Call || group == Instruction::StackInit);
m_value.targetLabel = nullptr;
}

private:
Expand Down Expand Up @@ -489,6 +490,7 @@ struct TryBlock {
TryBlock(Label* start, size_t size)
: start(start)
, parent(0)
, findHandlerLabel(nullptr)
, returnToLabel(nullptr)
{
catchBlocks.reserve(size);
Expand Down
2 changes: 1 addition & 1 deletion src/jit/FloatMathInl.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static void emitFloatUnary(sljit_compiler* compiler, Instruction* instr)
f32Func = floatNearest;
break;
case ByteCode::F32SqrtOpcode:
f32Func = sqrt;
f32Func = sqrtf;
break;
case ByteCode::F32NegOpcode:
opcode = SLJIT_NEG_F32;
Expand Down
7 changes: 7 additions & 0 deletions src/runtime/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ class Memory : public Extern {

// Caching memory target for fast access.
struct TargetBuffer {
TargetBuffer()
: prev(nullptr)
, sizeInByte(0)
, buffer(nullptr)
{
}

TargetBuffer* prev;
uint64_t sizeInByte;
uint8_t* buffer;
Expand Down

0 comments on commit 52716d7

Please sign in to comment.