Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum viable fix for enums from vm namespaces clashing with identifiers from includes #568

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
16 changes: 8 additions & 8 deletions src/compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3976,16 +3976,16 @@ lir::TernaryOperation toCompilerBinaryOp(MyThread* t, unsigned instruction)
case iushr:
case lushr:
return lir::UnsignedShiftRight;
case fadd:
case ::vm::fadd:
case dadd:
return lir::FloatAdd;
case fsub:
case ::vm::fsub:
case dsub:
return lir::FloatSubtract;
case fmul:
case ::vm::fmul:
case dmul:
return lir::FloatMultiply;
case fdiv:
case ::vm::fdiv:
case ddiv:
return lir::FloatDivide;
case frem:
Expand Down Expand Up @@ -4573,10 +4573,10 @@ void compile(MyThread* t,
c->f2i(ir::Type::i8(), frame->pop(ir::Type::f4())));
} break;

case fadd:
case fsub:
case fmul:
case fdiv:
case ::vm::fadd:
case ::vm::fsub:
case ::vm::fmul:
case ::vm::fdiv:
case frem: {
ir::Value* a = frame->pop(ir::Type::f4());
ir::Value* b = frame->pop(ir::Type::f4());
Expand Down
8 changes: 4 additions & 4 deletions src/debug-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int printInstruction(uint8_t* code, unsigned& ip, const char* prefix)
return fprintf(stderr, "f2i");
case f2l:
return fprintf(stderr, "f2l");
case fadd:
case ::vm::fadd:
return fprintf(stderr, "fadd");
case faload:
return fprintf(stderr, "faload");
Expand All @@ -156,15 +156,15 @@ int printInstruction(uint8_t* code, unsigned& ip, const char* prefix)
return fprintf(stderr, "fconst_1");
case fconst_2:
return fprintf(stderr, "fconst_2");
case fdiv:
case ::vm::fdiv:
return fprintf(stderr, "fdiv");
case fmul:
case ::vm::fmul:
return fprintf(stderr, "fmul");
case fneg:
return fprintf(stderr, "fneg");
case frem:
return fprintf(stderr, "frem");
case fsub:
case ::vm::fsub:
return fprintf(stderr, "fsub");

case getfield:
Expand Down
8 changes: 4 additions & 4 deletions src/machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ void disassembleCode(const char* prefix, uint8_t* code, unsigned length)
case f2l:
fprintf(stderr, "f2l\n");
break;
case fadd:
case ::vm::fadd:
fprintf(stderr, "fadd\n");
break;
case faload:
Expand All @@ -1717,10 +1717,10 @@ void disassembleCode(const char* prefix, uint8_t* code, unsigned length)
case fconst_2:
fprintf(stderr, "fconst_2\n");
break;
case fdiv:
case ::vm::fdiv:
fprintf(stderr, "fdiv\n");
break;
case fmul:
case ::vm::fmul:
fprintf(stderr, "fmul\n");
break;
case fneg:
Expand All @@ -1729,7 +1729,7 @@ void disassembleCode(const char* prefix, uint8_t* code, unsigned length)
case frem:
fprintf(stderr, "frem\n");
break;
case fsub:
case ::vm::fsub:
fprintf(stderr, "fsub\n");
break;

Expand Down