diff --git a/racket/src/cs/rumble/equal.ss b/racket/src/cs/rumble/equal.ss index 4ce80ae8b3..3fcb212714 100644 --- a/racket/src/cs/rumble/equal.ss +++ b/racket/src/cs/rumble/equal.ss @@ -99,6 +99,17 @@ (let ([ctx (deeper-context ctx)]) (lambda (a b) (equal? a b ctx)))))))] + [(mpair? a) + (and (mpair? b) + (or (check-union-find ctx a b) + (if eql? + (and (eql? (mcar a) (mcar b)) + (eql? (mcdr a) (mcdr b)) + #t) + (let ([ctx (deeper-context ctx)]) + (and + (equal? (mcar a) (mcar b) ctx) + (equal? (mcdr a) (mcdr b) ctx))))))] [(record? a) (and (record? b) ;; Check for `prop:impersonator-of` diff --git a/racket/src/cs/rumble/hash-code.ss b/racket/src/cs/rumble/hash-code.ss index 653499d5a6..799cd1a837 100644 --- a/racket/src/cs/rumble/hash-code.ss +++ b/racket/src/cs/rumble/hash-code.ss @@ -1,4 +1,4 @@ -;;; Parts from "newhash.ss" in Chez Scheme's implementation +;;; Parts from "newhash.ss" in Chez Scheme's imp (lambda (rec-hash) (let ([burn (fx+ burn 2)]) @@ -213,6 +217,10 @@ (let-values ([(hc0 burn0) (equal-secondary-hash-loop x burn 0)]) hc0)))))]) (values hc burn)))] + [(mpair? x) + (let-values ([(hc0 burn) (equal-secondary-hash-loop (mcar x) (fx+ burn 2) 0)]) + (let ([hc (fx+/wraparound (mix-hash-code hc) hc0)]) + (equal-secondary-hash-loop (mcdr x) burn hc)))] [(and (#%$record? x) (or (struct-property-ref 'secondary-hash (#%$record-type-descriptor x) #f) ;; to use default hash proc as default secondary hash proc: diff --git a/racket/src/cs/rumble/inline.ss b/racket/src/cs/rumble/inline.ss index 4a4d2c821f..b042a0b590 100644 --- a/racket/src/cs/rumble/inline.ss +++ b/racket/src/cs/rumble/inline.ss @@ -3,7 +3,9 @@ (define-syntax (define-inline stx) (syntax-case stx () - [(_ (orig-id arg ...) guard op) + [(_ proto guard op) + #'(define-inline proto guard op #3%$app/no-inline)] + [(_ (orig-id arg ...) guard op orig-app) (with-syntax ([(tmp ...) (generate-temporaries #'(arg ...))] [id (datum->syntax #'orig-id (#%string->symbol @@ -15,7 +17,7 @@ #'(let ([arg tmp] ...) (if guard op - (#3%$app/no-inline orig-id arg ...)))] + (orig-app orig-id arg ...)))] [(_ . args) #'(orig-id . args)] [_ #'orig-id])))])) @@ -62,19 +64,23 @@ (define-inline (mcar p) (mpair? p) - (unsafe-mcar p)) + (unsafe-mcar p) + |#%app/no-return|) (define-inline (mcdr p) (mpair? p) - (unsafe-mcdr p)) + (unsafe-mcdr p) + |#%app/no-return|) (define-inline (set-mcar! p v) (mpair? p) - (unsafe-set-mcar! p v)) + (unsafe-set-mcar! p v) + |#%app/no-return|) (define-inline (set-mcdr! p v) (mpair? p) - (unsafe-set-mcdr! p v)) + (unsafe-set-mcdr! p v) + |#%app/no-return|) (define-inline (unsafe-struct-ref s i) (not (impersonator? s)) diff --git a/racket/src/schemify/left-to-right.rkt b/racket/src/schemify/left-to-right.rkt index bde0663679..4b462cbaea 100644 --- a/racket/src/schemify/left-to-right.rkt +++ b/racket/src/schemify/left-to-right.rkt @@ -129,4 +129,4 @@ `(call-with-values (lambda () ,rhs) (case-lambda [,ids ,body] - [args (raise-binding-result-arity-error ,(length ids) args)]))])])])) + [args (#%app/no-return raise-binding-result-arity-error ,(length ids) args)]))])])]))