source: project/chicken/branches/release/tweaks.scm @ 13178

Last change on this file since 13178 was 10108, checked in by Ivan Raikov, 12 years ago

Merged prerelease branch with release.

File size: 2.1 KB
Line 
1;;;; tweaks.scm - Some inline-routines and declarations
2;
3; Copyright (c) 2000-2007, Felix L. Winkelmann
4; Copyright (c) 2008, The Chicken Team
5; All rights reserved.
6;
7; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
8; conditions are met:
9;
10;   Redistributions of source code must retain the above copyright notice, this list of conditions and the following
11;     disclaimer.
12;   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
13;     disclaimer in the documentation and/or other materials provided with the distribution.
14;   Neither the name of the author nor the names of its contributors may be used to endorse or promote
15;     products derived from this software without specific prior written permission.
16;
17; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
18; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
19; AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
20; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25; POSSIBILITY OF SUCH DAMAGE.
26
27
28;; This file contains some stuff to speed up basic node accessors, and also
29;; contains common declarations.
30
31(cond-expand
32 [compiler-unsafe
33  (declare
34    (fixnum)
35    (disable-interrupts)
36    (no-bound-checks)
37    (no-procedure-checks)
38    (no-argc-checks) ) ]
39 [else
40  (declare
41    (fixnum)
42    (disable-interrupts) ) ] )
43
44
45(define-inline (make-node c p s) (##sys#make-structure 'node c p s))
46(define-inline (node-class n) (##sys#slot n 1))
47(define-inline (node-parameters n) (##sys#slot n 2))
48(define-inline (node-subexpressions n) (##sys#slot n 3))
Note: See TracBrowser for help on using the repository browser.