Changeset 6042


Ignore:
Timestamp:
02/28/04 18:41:12 (17 years ago)
Author:
piso
Message:

Added compiler macro for LDB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/precompiler.lisp

    r6031 r6042  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.29 2004-02-28 15:32:07 piso Exp $
     4;;; $Id: precompiler.lisp,v 1.30 2004-02-28 18:41:12 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    112112(define-compiler-macro byte-position (bytespec)
    113113  `(cdr ,bytespec))
     114
     115(define-compiler-macro ldb (&whole form bytespec integer)
     116  (if (and (consp bytespec)
     117           (eq (car bytespec) 'byte)
     118           (= (length bytespec) 3))
     119      (let ((size (second bytespec))
     120            (position (third bytespec)))
     121        `(sys::%ldb ,size ,position ,integer))
     122      form))
    114123
    115124(in-package "EXTENSIONS")
Note: See TracChangeset for help on using the changeset viewer.