fix warnings
This commit is contained in:
parent
50aecefd87
commit
969c22291f
@ -1,7 +1,7 @@
|
|||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
skip_tags: true
|
skip_tags: true
|
||||||
image: Visual Studio 2019
|
image: Visual Studio 2019
|
||||||
configuration: release
|
configuration: Release
|
||||||
platform: x64
|
platform: x64
|
||||||
before_build:
|
before_build:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
@ -17,10 +17,10 @@ workspace "gsc-tool"
|
|||||||
objdir "%{wks.location}/obj/%{cfg.buildcfg}/%{prj.name}"
|
objdir "%{wks.location}/obj/%{cfg.buildcfg}/%{prj.name}"
|
||||||
targetdir "%{wks.location}/bin/%{cfg.buildcfg}"
|
targetdir "%{wks.location}/bin/%{cfg.buildcfg}"
|
||||||
targetname "%{prj.name}"
|
targetname "%{prj.name}"
|
||||||
|
staticruntime "On"
|
||||||
language "C++"
|
language "C++"
|
||||||
cppdialect "C++20"
|
cppdialect "C++20"
|
||||||
architecture "x86_64"
|
architecture "x64"
|
||||||
|
|
||||||
filter "action:vs*"
|
filter "action:vs*"
|
||||||
buildoptions "/bigobj"
|
buildoptions "/bigobj"
|
||||||
@ -30,10 +30,12 @@ workspace "gsc-tool"
|
|||||||
configurations { "Debug", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
|
|
||||||
symbols "On"
|
symbols "On"
|
||||||
|
warnings "Extra"
|
||||||
|
|
||||||
filter "configurations:Release"
|
filter "configurations:Release"
|
||||||
optimize "Full"
|
optimize "Full"
|
||||||
defines { "NDEBUG" }
|
defines { "NDEBUG" }
|
||||||
|
flags { "FatalCompileWarnings" }
|
||||||
filter {}
|
filter {}
|
||||||
|
|
||||||
filter "configurations:Debug"
|
filter "configurations:Debug"
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1547,7 +1547,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2542,7 +2542,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2551,7 +2551,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2560,7 +2560,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2873,7 +2873,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2954,7 +2954,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2962,7 +2962,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3279,7 +3279,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1547,7 +1547,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2541,7 +2541,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2550,7 +2550,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2559,7 +2559,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2872,7 +2872,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2954,7 +2954,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2962,7 +2962,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3279,7 +3279,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -850,12 +850,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -896,17 +896,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1539,7 +1539,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2532,7 +2532,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2541,7 +2541,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2550,7 +2550,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3478,7 +3478,7 @@ void compiler::print_debug_info()
|
|||||||
printf("----------------------------------\n");
|
printf("----------------------------------\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::print_opcodes(std::uint32_t index, std::uint32_t size)
|
void compiler::print_opcodes(std::uint32_t, std::uint32_t)
|
||||||
{
|
{
|
||||||
printf(" ");
|
printf(" ");
|
||||||
}
|
}
|
||||||
|
@ -2948,7 +2948,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2956,7 +2956,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3273,7 +3273,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -850,12 +850,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -896,17 +896,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1539,7 +1539,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2532,7 +2532,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2541,7 +2541,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2550,7 +2550,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2863,7 +2863,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2948,7 +2948,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2956,7 +2956,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3273,7 +3273,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -850,12 +850,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -896,17 +896,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1539,7 +1539,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2532,7 +2532,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2541,7 +2541,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2550,7 +2550,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2863,7 +2863,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2948,7 +2948,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2956,7 +2956,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3273,7 +3273,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1598,7 +1598,7 @@ void compiler::emit_expr_istrue(const ast::expr_istrue::ptr& expr, const block::
|
|||||||
emit_opcode(opcode::OP_IsTrue);
|
emit_opcode(opcode::OP_IsTrue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2592,7 +2592,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2601,7 +2601,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2610,7 +2610,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2923,7 +2923,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2985,7 +2985,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2993,7 +2993,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3316,7 +3316,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1547,7 +1547,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2541,7 +2541,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2550,7 +2550,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2559,7 +2559,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2872,7 +2872,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2954,7 +2954,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2962,7 +2962,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3279,7 +3279,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1547,7 +1547,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2541,7 +2541,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2550,7 +2550,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2559,7 +2559,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2872,7 +2872,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2961,7 +2961,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2969,7 +2969,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3286,7 +3286,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto data = utils::string::parse_code(line);
|
auto opdata = utils::string::parse_code(line);
|
||||||
|
|
||||||
if (switchnum)
|
if (switchnum)
|
||||||
{
|
{
|
||||||
if (data[0] == "case" || data[0] == "default")
|
if (opdata[0] == "case" || opdata[0] == "default")
|
||||||
{
|
{
|
||||||
for (auto& entry : data)
|
for (auto& entry : opdata)
|
||||||
{
|
{
|
||||||
func->instructions.back()->data.push_back(entry);
|
func->instructions.back()->data.push_back(entry);
|
||||||
}
|
}
|
||||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
|||||||
{
|
{
|
||||||
auto inst = std::make_unique<instruction>();
|
auto inst = std::make_unique<instruction>();
|
||||||
inst->index = index;
|
inst->index = index;
|
||||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||||
inst->size = opcode_size(inst->opcode);
|
inst->size = opcode_size(inst->opcode);
|
||||||
data.erase(data.begin());
|
opdata.erase(opdata.begin());
|
||||||
inst->data = std::move(data);
|
inst->data = std::move(opdata);
|
||||||
|
|
||||||
switch (opcode(inst->opcode))
|
switch (opcode(inst->opcode))
|
||||||
{
|
{
|
||||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal case statement");
|
throw comp_error(stmt->loc(), "illegal case statement");
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||||
{
|
{
|
||||||
throw comp_error(stmt->loc(), "illegal default statement");
|
throw comp_error(stmt->loc(), "illegal default statement");
|
||||||
}
|
}
|
||||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1598,7 +1598,7 @@ void compiler::emit_expr_istrue(const ast::expr_istrue::ptr& expr, const block::
|
|||||||
emit_opcode(opcode::OP_IsTrue);
|
emit_opcode(opcode::OP_IsTrue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||||
{
|
{
|
||||||
bool method = false;
|
bool method = false;
|
||||||
auto type = resolve_reference_type(expr, method);
|
auto type = resolve_reference_type(expr, method);
|
||||||
@ -2592,7 +2592,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
|||||||
break_blks_ = old_breaks;
|
break_blks_ = old_breaks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2601,7 +2601,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2610,7 +2610,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2923,7 +2923,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2985,7 +2985,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -2993,7 +2993,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||||
{
|
{
|
||||||
if (blk->abort == abort_t::abort_none)
|
if (blk->abort == abort_t::abort_none)
|
||||||
{
|
{
|
||||||
@ -3316,7 +3316,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
|||||||
process_expr(expr->obj, blk);
|
process_expr(expr->obj, blk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ auto assembler::output() -> std::vector<std::uint8_t>
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& data)
|
void assembler::assemble(const std::string&, std::vector<std::uint8_t>&)
|
||||||
{
|
{
|
||||||
throw error("assemble from source unimplemented!");
|
throw error("assemble from source unimplemented!");
|
||||||
}
|
}
|
||||||
@ -429,7 +429,7 @@ void assembler::assemble_localvars(const instruction::ptr& inst)
|
|||||||
script_->write<std::uint8_t>(static_cast<std::uint8_t>(inst->opcode));
|
script_->write<std::uint8_t>(static_cast<std::uint8_t>(inst->opcode));
|
||||||
script_->write<std::uint8_t>(static_cast<std::uint8_t>(inst->data.size()));
|
script_->write<std::uint8_t>(static_cast<std::uint8_t>(inst->data.size()));
|
||||||
|
|
||||||
for (const auto& entry : inst->data)
|
for (auto i = 0u; i < inst->data.size(); i++)
|
||||||
{
|
{
|
||||||
script_->align(2);
|
script_->align(2);
|
||||||
script_->write<std::uint16_t>(0);
|
script_->write<std::uint16_t>(0);
|
||||||
@ -465,8 +465,6 @@ void assembler::assemble_end_switch(const instruction::ptr& inst)
|
|||||||
script_->align(4);
|
script_->align(4);
|
||||||
script_->write<std::uint32_t>(count);
|
script_->write<std::uint32_t>(count);
|
||||||
|
|
||||||
std::uint32_t index = inst->index + 3;
|
|
||||||
|
|
||||||
for (auto i = 0u; i < count; i++)
|
for (auto i = 0u; i < count; i++)
|
||||||
{
|
{
|
||||||
if (inst->data[1 + (3 * i)] == "case")
|
if (inst->data[1 + (3 * i)] == "case")
|
||||||
|
@ -807,17 +807,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt)
|
|||||||
emit_opcode(opcode::OP_End);
|
emit_opcode(opcode::OP_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt)
|
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt)
|
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt)
|
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
@ -1367,7 +1367,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr)
|
void compiler::emit_expr_parameters(const ast::expr_parameters::ptr&)
|
||||||
{
|
{
|
||||||
if (local_stack_.size() == 0)
|
if (local_stack_.size() == 0)
|
||||||
{
|
{
|
||||||
@ -1445,7 +1445,7 @@ void compiler::emit_expr_abs(const ast::expr_abs::ptr& expr)
|
|||||||
emit_opcode(opcode::OP_Abs);
|
emit_opcode(opcode::OP_Abs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void compiler::emit_expr_gettime(const ast::expr_gettime::ptr& expr)
|
void compiler::emit_expr_gettime(const ast::expr_gettime::ptr&)
|
||||||
{
|
{
|
||||||
emit_opcode(opcode::OP_GetTime);
|
emit_opcode(opcode::OP_GetTime);
|
||||||
}
|
}
|
||||||
@ -1795,7 +1795,7 @@ void compiler::emit_expr_vector(const ast::expr_vector::ptr& expr)
|
|||||||
std::vector<std::string> data;
|
std::vector<std::string> data;
|
||||||
|
|
||||||
bool isexpr = false;
|
bool isexpr = false;
|
||||||
bool isconst = true;
|
//bool isconst = true;
|
||||||
|
|
||||||
if (expr->x == ast::kind::expr_integer)
|
if (expr->x == ast::kind::expr_integer)
|
||||||
data.push_back(expr->x.as_integer->value);
|
data.push_back(expr->x.as_integer->value);
|
||||||
@ -2409,7 +2409,7 @@ void compiler::insert_label(const std::string& name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
auto compiler::map_known_includes(const std::string&) -> bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,6 @@ void disassembler::disassemble(const std::string& file, std::vector<std::uint8_t
|
|||||||
for (auto i = 0; i < exports_.size(); i++)
|
for (auto i = 0; i < exports_.size(); i++)
|
||||||
{
|
{
|
||||||
auto& entry = exports_[i];
|
auto& entry = exports_[i];
|
||||||
auto size = 0;
|
|
||||||
|
|
||||||
if (i < exports_.size() - 1)
|
if (i < exports_.size() - 1)
|
||||||
{
|
{
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -7,10 +7,13 @@
|
|||||||
|
|
||||||
// Warnings
|
// Warnings
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#pragma warning(disable:4005)
|
||||||
|
#pragma warning(disable:4018)
|
||||||
|
#pragma warning(disable:4065)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable:4244)
|
||||||
#pragma warning(disable:4267)
|
#pragma warning(disable:4267)
|
||||||
#pragma warning(disable:4005)
|
#pragma warning(disable:4389)
|
||||||
#pragma warning(disable:4065)
|
|
||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user