Skip to content

Commit

Permalink
Remove throw/catch from iasm.c
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Feb 23, 2014
1 parent 7373fc1 commit 436f275
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/iasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2163,7 +2163,7 @@ STATIC void asmerr(int errnum, ...)
verror(asmstate.loc, format, ap);
va_end(ap);

throw &asmstate;
exit(EXIT_FAILURE);
}

/*******************************
Expand All @@ -2176,7 +2176,7 @@ STATIC void asmerr(const char *format, ...)
verror(asmstate.loc, format, ap);
va_end(ap);

throw &asmstate;
exit(EXIT_FAILURE);
}

/*******************************
Expand Down Expand Up @@ -4735,8 +4735,6 @@ Statement* asmSemantic(AsmStatement *s, Scope *sc)
asmtok = s->tokens;
asm_token_trans(asmtok);

try
{
switch (tok_value)
{
case ASMTKnaked:
Expand Down Expand Up @@ -4857,13 +4855,6 @@ Statement* asmSemantic(AsmStatement *s, Scope *sc)
asmerr(EM_opcode_exp, asmtok->toChars()); // assembler opcode expected
break;
}
}
catch (ASM_STATE *a)
{
asmtok = NULL; // skip rest of line
tok_value = TOKeof;
exit(EXIT_FAILURE);
}

AFTER_EMIT:
opnd_free(o1);
Expand All @@ -4873,16 +4864,7 @@ Statement* asmSemantic(AsmStatement *s, Scope *sc)

if (tok_value != TOKeof)
{
try
{
asmerr(EM_eol, asmtok->toChars()); // end of line expected
}
catch (ASM_STATE *a)
{
asmtok = NULL;
tok_value = TOKeof;
exit(EXIT_FAILURE);
}
asmerr(EM_eol, asmtok->toChars()); // end of line expected
}
//return asmstate.bReturnax;
return s;
Expand Down

0 comments on commit 436f275

Please sign in to comment.