compiler waittill fix
This commit is contained in:
parent
39ac8bd592
commit
ec1513100e
@ -288,8 +288,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1760,14 +1758,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
@ -288,8 +288,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1760,14 +1758,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
@ -261,7 +261,7 @@ void assembler::assemble_instruction(const gsc::instruction_ptr& inst)
|
||||
break;
|
||||
case opcode::OP_waittillmatch:
|
||||
script_->write<std::uint8_t>(static_cast<std::uint8_t>(inst->opcode));
|
||||
script_->write<std::uint16_t>(static_cast<std::uint16_t>(std::stoi(inst->data[0])));
|
||||
script_->write<std::uint16_t>(0);
|
||||
break;
|
||||
case opcode::OP_CreateLocalVariable:
|
||||
case opcode::OP_RemoveLocalVariables:
|
||||
|
@ -287,8 +287,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1754,14 +1752,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
@ -287,8 +287,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1754,14 +1752,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
@ -287,8 +287,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1754,14 +1752,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
@ -288,8 +288,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1760,14 +1758,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
@ -288,8 +288,6 @@ void compiler::emit_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_w
|
||||
emit_expr(ctx, stmt->obj);
|
||||
emit_opcode(ctx, opcode::OP_waittill);
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
create_variable(ctx, arg.as_name);
|
||||
@ -1760,14 +1758,10 @@ void compiler::process_expr(const gsc::context_ptr& ctx, const gsc::expr_ptr& ex
|
||||
|
||||
void compiler::process_stmt_waittill(const gsc::context_ptr& ctx, const gsc::stmt_waittill_ptr& stmt)
|
||||
{
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
|
||||
for(const auto& arg : stmt->args->list)
|
||||
{
|
||||
register_variable(ctx, arg.as_name->value);
|
||||
}
|
||||
|
||||
std::reverse(stmt->args->list.begin(), stmt->args->list.end());
|
||||
}
|
||||
|
||||
void compiler::process_stmt_if(const gsc::context_ptr& ctx, const gsc::stmt_if_ptr& stmt)
|
||||
|
Loading…
Reference in New Issue
Block a user