mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: libguile/deprecated.c libguile/ports.c libguile/ports.h libguile/strports.c test-suite/tests/cse.test
This commit is contained in:
commit
0dd7c54075
26 changed files with 343 additions and 158 deletions
|
@ -92,7 +92,7 @@
|
|||
(pdel o (string->symbol p)))
|
||||
|
||||
(define-method (has-property? (o <js-object>) p)
|
||||
(if (hashq-get-handle (js-props o) v)
|
||||
(if (hashq-get-handle (js-props o) p)
|
||||
#t
|
||||
(let ((proto (js-prototype o)))
|
||||
(if proto
|
||||
|
@ -176,9 +176,9 @@
|
|||
((boolean? x) (if x 1 0))
|
||||
((null? x) 0)
|
||||
((eq? x *undefined*) +nan.0)
|
||||
((is-a? x <js-object>) (object->number x))
|
||||
((is-a? x <js-object>) (object->number x #t))
|
||||
((string? x) (string->number x))
|
||||
(else (throw 'TypeError o '->number))))
|
||||
(else (throw 'TypeError x '->number))))
|
||||
|
||||
(define (->integer x)
|
||||
(let ((n (->number x)))
|
||||
|
|
|
@ -270,11 +270,11 @@
|
|||
#f)))
|
||||
(_
|
||||
(cond
|
||||
((find-dominating-expression exp effects #f db)
|
||||
((find-dominating-expression exp effects 'test db)
|
||||
;; We have an EXP fact, so we infer #t.
|
||||
(log 'inferring exp #t)
|
||||
(make-const (tree-il-src exp) #t))
|
||||
((find-dominating-expression (negate exp 'test) effects #f db)
|
||||
((find-dominating-expression (negate exp 'test) effects 'test db)
|
||||
;; We have a (not EXP) fact, so we infer #f.
|
||||
(log 'inferring exp #f)
|
||||
(make-const (tree-il-src exp) #f))
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
|
||||
char<? char<=? char>=? char>?
|
||||
|
||||
integer->char char->integer number->string string->number
|
||||
|
||||
acons cons cons*
|
||||
|
||||
list vector
|
||||
|
@ -155,6 +157,7 @@
|
|||
pair? null? list? symbol? vector? struct? string? number? char? nil
|
||||
complex? real? rational? inf? nan? integer? exact? inexact? even? odd?
|
||||
char<? char<=? char>=? char>?
|
||||
integer->char char->integer number->string string->number
|
||||
struct-vtable
|
||||
string-length vector-length
|
||||
;; These all should get expanded out by expand-primitives!.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue