Commit e36a3882 authored by Paul Eggert's avatar Paul Eggert

Simplify exec_byte_code via moving decls etc.

* src/bytecode.c (exec_byte_code): Simplify, mostly by moving
initializers into decls, and by omitting some unnecessary changes
to ‘top’.
parent a815e5f1
...@@ -508,9 +508,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, ...@@ -508,9 +508,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
CASE (Bgotoifnil): CASE (Bgotoifnil):
{ {
Lisp_Object v1; Lisp_Object v1 = POP;
op = FETCH2; op = FETCH2;
v1 = POP;
if (NILP (v1)) if (NILP (v1))
goto op_branch; goto op_branch;
NEXT; NEXT;
...@@ -686,13 +685,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, ...@@ -686,13 +685,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT; NEXT;
CASE (Bgotoifnonnil): CASE (Bgotoifnonnil):
{ op = FETCH2;
op = FETCH2; if (!NILP (POP))
Lisp_Object v1 = POP; goto op_branch;
if (!NILP (v1)) NEXT;
goto op_branch;
NEXT;
}
CASE (Bgotoifnilelsepop): CASE (Bgotoifnilelsepop):
op = FETCH2; op = FETCH2;
...@@ -713,22 +709,16 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, ...@@ -713,22 +709,16 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
goto op_relative_branch; goto op_relative_branch;
CASE (BRgotoifnil): CASE (BRgotoifnil):
{ op = FETCH - 128;
Lisp_Object v1 = POP; if (NILP (POP))
op = FETCH - 128; goto op_relative_branch;
if (NILP (v1)) NEXT;
goto op_relative_branch;
NEXT;
}
CASE (BRgotoifnonnil): CASE (BRgotoifnonnil):
{ op = FETCH - 128;
Lisp_Object v1 = POP; if (!NILP (POP))
op = FETCH - 128; goto op_relative_branch;
if (!NILP (v1)) NEXT;
goto op_relative_branch;
NEXT;
}
CASE (BRgotoifnilelsepop): CASE (BRgotoifnilelsepop):
op = FETCH - 128; op = FETCH - 128;
...@@ -1248,9 +1238,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, ...@@ -1248,9 +1238,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
CASE (Bdowncase): CASE (Bdowncase):
TOP = Fdowncase (TOP); TOP = Fdowncase (TOP);
NEXT; NEXT;
CASE (Bstringeqlsign): CASE (Bstringeqlsign):
{ {
Lisp_Object v1 = POP; Lisp_Object v1 = POP;
TOP = Fstring_equal (TOP, v1); TOP = Fstring_equal (TOP, v1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment