Changeset 8317
 Timestamp:
 12/31/04 16:49:17 (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/j/src/org/armedbear/lisp/jvm.lisp
r8316 r8317 2 2 ;;; 3 3 ;;; Copyright (C) 20032004 Peter Graves 4 ;;; $Id: jvm.lisp,v 1.33 1 20041231 02:22:31piso Exp $4 ;;; $Id: jvm.lisp,v 1.332 20041231 16:49:17 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 125 125 (%format t " ~S specialp = ~S register = ~S level = ~S index = ~S declaredtype = ~S~%" 126 126 (variablename variable) 127 ;; (variablekind variable)128 127 (variablespecialp variable) 129 128 (variableregister variable) … … 153 152 index 154 153 (reads 0) 155 (writes 0)) 154 (writes 0) 155 usednonlocallyp 156 (compiland *currentcompiland*)) 156 157 157 158 ;; obj can be a symbol or variable … … 395 396 396 397 (defun p1flet/labels (form) 398 (dformat t "p1flet/labels~%") 397 399 (when *currentcompiland* 398 400 (incf (compilandchildren *currentcompiland*) (length (cadr form)))) … … 433 435 (if variable 434 436 (progn 435 (dformat t "p1setq: write to ~S~%" arg1) 436 (incf (variablewrites variable))) 437 (incf (variablewrites variable)) 438 (cond 439 ((eq (variablecompiland variable) *currentcompiland*) 440 (dformat t "p1setq: write ~S~%" arg1)) 441 (t 442 (dformat t "p1setq: nonlocal write ~S~%" arg1) 443 (setf (variableusednonlocallyp variable) t)))) 437 444 (dformat t "p1setq: unknown variable ~S~%" arg1))) 438 445 (list 'SETQ arg1 (p1 arg2)))) … … 492 499 value 493 500 form))) 501 ((keywordp form) 502 form) 494 503 (t 504 (let ((variable (findvisiblevariable form))) 505 (if variable 506 (progn 507 (incf (variablereads variable)) 508 (cond 509 ((eq (variablecompiland variable) *currentcompiland*) 510 (dformat t "p1: read ~S~%" form)) 511 (t 512 (dformat t "p1: nonlocal read ~S~%" form) 513 (setf (variableusednonlocallyp variable) t)))) 514 (dformat t "p1: unknown variable ~S~%" form))) 495 515 form))) 496 516 ((atom form) … … 4992 5012 4993 5013 (defun compile1 (compiland) 5014 (dformat t "compile1 ~S~%" (compilandname compiland)) 4994 5015 (let ((*currentcompiland* compiland) 4995 5016 (precompiledform (compilandlambdaexpression compiland)) … … 5001 5022 (processoptimizationdeclarations (cddr precompiledform)) 5002 5023 ;; Pass 1. 5003 (let ((*visiblevariables* ()))5024 (let ((*visiblevariables* *visiblevariables*)) 5004 5025 (setf precompiledform (p1 precompiledform))) 5005 5026 ;; Pass 2. … … 5023 5044 (*arity* nil) 5024 5045 5025 (*childp* ( if *context* t nil))5046 (*childp* (not (null (compilandparent compiland)))) 5026 5047 5027 5048 (*uselocalsvector* (or (> (compilandchildren *currentcompiland*) 0)
Note: See TracChangeset
for help on using the changeset viewer.