Commit 884d234f authored by Erick Gallesio's avatar Erick Gallesio

.

parent e7a5095f
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 14-Mar-2001 13:49 (eg)
;;;; Last file update: 15-Sep-2006 16:28 (eg)
;;;; Last file update: 18-Sep-2006 11:25 (eg)
;;;;
;;;
......@@ -183,10 +183,10 @@
(PUSH-GLOBAL-REF 1) ;; peephole: PUSH + GLOBAL-REF
(PUSH-UGLOBAL-REF 1) ;; Never produced by the compiler
(PUSH-GREF-INVOKE 2) ;; PUSH + GLOBAL-REF +INVOKE
(PUSH-UGREF-INVOKE 2) ;; PUSH + GLOBAL-REF +INVOKE
(PUSH-UGREF-INVOKE 2) ;; Never produced by the compiler
(PUSH-GREF-TAIL-INV 2) ;; PUSH + GLOBAL-REF + TAIL-INVOKE
(PUSH-UGREF-TAIL-INV 2) ;; Never produced by the compiler
(UNUSED-16 0)
(UNUSED-15 0)
(UNUSED-14 0)
(UNUSED-13 0)
(UNUSED-12 0)
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 17-Mar-2001 20:32 (eg)
;;;; Last file update: 15-Sep-2006 16:32 (eg)
;;;; Last file update: 18-Sep-2006 11:29 (eg)
;;;;
; ======================================================================
......@@ -174,6 +174,12 @@
(this-arg1 code)
(next-arg1 code))))
;; [PUSH-GLOBAL-REF, TAIL-INVOKE] => PUSH-GREF-TAIL-INV
((and (eq? i1 'PUSH-GLOBAL-REF) (eq? i2 'TAIL-INVOKE))
(replace-2-instr code (list 'PUSH-GREF-TAIL-INV
(this-arg1 code)
(next-arg1 code))))
;; [PUSH, PREPARE-CALL] => PUSH-PREPARE-CALL
((and (eq? i1 'PUSH) (eq? i2 'PREPARE-CALL))
......
......@@ -16,7 +16,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 20-Jul-1998 12:19
* Last file update: 5-Sep-2006 13:25 (eg)
* Last file update: 21-Sep-2006 16:45 (eg)
*/
#include <stklos.h>
......@@ -104,9 +104,9 @@ static void decode(SCM f, SCM g)
j -= 6;
if (j < 0) {
c = (group&0xff0000) >> 16; if (c) STk_putc(c, g);
c = (group&0x00ff00) >> 8; if (c) STk_putc(c, g);
c = (group&0x0000ff); if (c) STk_putc(c, g);
c = (group&0xff0000) >> 16; STk_putc(c, g);
c = (group&0x00ff00) >> 8; STk_putc(c, g);
c = (group&0x0000ff); STk_putc(c, g);
group = 0;
j = 18;
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -117,8 +117,8 @@
# define PUSH_UGLOBAL_REF 112
# define PUSH_GREF_INVOKE 113
# define PUSH_UGREF_INVOKE 114
# define UNUSED_16 115
# define UNUSED_15 116
# define PUSH_GREF_TAIL_INV 115
# define PUSH_UGREF_TAIL_INV 116
# define UNUSED_14 117
# define UNUSED_13 118
# define UNUSED_12 119
......@@ -258,8 +258,8 @@ static void *jump_table[] = {
&&lab_PUSH_UGLOBAL_REF ,
&&lab_PUSH_GREF_INVOKE ,
&&lab_PUSH_UGREF_INVOKE ,
&&lab_UNUSED_16 ,
&&lab_UNUSED_15 ,
&&lab_PUSH_GREF_TAIL_INV ,
&&lab_PUSH_UGREF_TAIL_INV ,
&&lab_UNUSED_14 ,
&&lab_UNUSED_13 ,
&&lab_UNUSED_12 ,
......@@ -399,8 +399,8 @@ static char *name_table[] = {
"PUSH_UGLOBAL_REF ",
"PUSH_GREF_INVOKE ",
"PUSH_UGREF_INVOKE ",
"UNUSED_16 ",
"UNUSED_15 ",
"PUSH_GREF_TAIL_INV ",
"PUSH_UGREF_TAIL_INV ",
"UNUSED_14 ",
"UNUSED_13 ",
"UNUSED_12 ",
......
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 1-Mar-2000 19:51 (eg)
* Last file update: 15-Sep-2006 16:31 (eg)
* Last file update: 18-Sep-2006 11:27 (eg)
*/
// INLINER values
......@@ -865,7 +865,6 @@ CASE(GREF_INVOKE) {
tailp=FALSE; goto FUNCALL;
}
CASE(PUSH_UGREF_INVOKE)
push(vm->val); /* Fall through */
CASE(UGREF_INVOKE) { /* Never produced by compiler */
......@@ -876,19 +875,24 @@ CASE(UGREF_INVOKE) { /* Never produced by compiler */
tailp = FALSE; goto FUNCALL;
}
CASE(PUSH_GREF_TAIL_INV)
push(vm->val); /* Fall through */
CASE(GREF_TAIL_INVOKE) {
SCM ref;
vm->val = STk_lookup(fetch_const(), vm->env, &ref, TRUE);
nargs = fetch_next();
/* patch the code for optimize next accesses (pc[-1] is already equal to nargs)*/
vm->pc[-3] = UGREF_TAIL_INVOKE;
vm->pc[-3] = (vm->pc[-3] == GREF_TAIL_INVOKE) ?
UGREF_TAIL_INVOKE: PUSH_UGREF_TAIL_INV;
vm->pc[-2] = add_global(&CDR(ref));
/* and now invoke */
tailp=TRUE; goto FUNCALL;
}
CASE(PUSH_UGREF_TAIL_INV)
push(vm->val); /* Fall through */
CASE(UGREF_TAIL_INVOKE) { /* Never produced by compiler */
vm->val = fetch_global();
nargs = fetch_next();
......
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