Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e12ea64e
Commit
e12ea64e
authored
Mar 28, 2001
by
Gerd Moellmann
Browse files
(BYTE_CODE_QUIT): New macro.
(Fbyte_code): Use BYTE_CODE_QUIT instead of QUIT.
parent
719349f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
src/bytecode.c
src/bytecode.c
+25
-11
No files found.
src/bytecode.c
View file @
e12ea64e
/* Execution of byte code produced by bytecomp.el.
Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU Emacs.
...
...
@@ -396,6 +397,19 @@ unmark_byte_stack ()
#endif
/* not BYTE_CODE_SAFE */
/* A version of the QUIT macro which makes sure that the stack top is
set before signaling `quit'. */
#define BYTE_CODE_QUIT \
do { \
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
{ \
Vquit_flag = Qnil; \
BEFORE_POTENTIAL_GC (); \
Fsignal (Qquit, Qnil); \
} \
} while (0)
DEFUN
(
"byte-code"
,
Fbyte_code
,
Sbyte_code
,
3
,
3
,
0
,
"Function used internally in byte-compiled code.
\n
\
...
...
@@ -529,7 +543,7 @@ If the third argument is incorrect, Emacs may crash.")
op
=
FETCH2
;
if
(
NILP
(
POP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
CHECK_RANGE
(
op
);
stack
.
pc
=
stack
.
byte_string_start
+
op
;
}
...
...
@@ -735,7 +749,7 @@ If the third argument is incorrect, Emacs may crash.")
case
Bgoto
:
MAYBE_GC
();
QUIT
;
BYTE_CODE_
QUIT
;
op
=
FETCH2
;
/* pc = FETCH2 loses since FETCH2 contains pc++ */
CHECK_RANGE
(
op
);
stack
.
pc
=
stack
.
byte_string_start
+
op
;
...
...
@@ -746,7 +760,7 @@ If the third argument is incorrect, Emacs may crash.")
op
=
FETCH2
;
if
(
!
NILP
(
POP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
CHECK_RANGE
(
op
);
stack
.
pc
=
stack
.
byte_string_start
+
op
;
}
...
...
@@ -757,7 +771,7 @@ If the third argument is incorrect, Emacs may crash.")
op
=
FETCH2
;
if
(
NILP
(
TOP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
CHECK_RANGE
(
op
);
stack
.
pc
=
stack
.
byte_string_start
+
op
;
}
...
...
@@ -769,7 +783,7 @@ If the third argument is incorrect, Emacs may crash.")
op
=
FETCH2
;
if
(
!
NILP
(
TOP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
CHECK_RANGE
(
op
);
stack
.
pc
=
stack
.
byte_string_start
+
op
;
}
...
...
@@ -778,7 +792,7 @@ If the third argument is incorrect, Emacs may crash.")
case
BRgoto
:
MAYBE_GC
();
QUIT
;
BYTE_CODE_
QUIT
;
stack
.
pc
+=
(
int
)
*
stack
.
pc
-
127
;
break
;
...
...
@@ -786,7 +800,7 @@ If the third argument is incorrect, Emacs may crash.")
MAYBE_GC
();
if
(
NILP
(
POP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
stack
.
pc
+=
(
int
)
*
stack
.
pc
-
128
;
}
stack
.
pc
++
;
...
...
@@ -796,7 +810,7 @@ If the third argument is incorrect, Emacs may crash.")
MAYBE_GC
();
if
(
!
NILP
(
POP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
stack
.
pc
+=
(
int
)
*
stack
.
pc
-
128
;
}
stack
.
pc
++
;
...
...
@@ -807,7 +821,7 @@ If the third argument is incorrect, Emacs may crash.")
op
=
*
stack
.
pc
++
;
if
(
NILP
(
TOP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
stack
.
pc
+=
op
-
128
;
}
else
DISCARD
(
1
);
...
...
@@ -818,7 +832,7 @@ If the third argument is incorrect, Emacs may crash.")
op
=
*
stack
.
pc
++
;
if
(
!
NILP
(
TOP
))
{
QUIT
;
BYTE_CODE_
QUIT
;
stack
.
pc
+=
op
-
128
;
}
else
DISCARD
(
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment