diff --git a/basis/alien/prettyprint/prettyprint.factor b/basis/alien/prettyprint/prettyprint.factor index 0794ab7789..0ffd5023a7 100644 --- a/basis/alien/prettyprint/prettyprint.factor +++ b/basis/alien/prettyprint/prettyprint.factor @@ -1,14 +1,15 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: kernel combinators alien alien.strings alien.syntax -prettyprint.backend prettyprint.custom prettyprint.sections ; +math.parser prettyprint.backend prettyprint.custom +prettyprint.sections ; IN: alien.prettyprint M: alien pprint* { { [ dup expired? ] [ drop \ BAD-ALIEN pprint-word ] } { [ dup pinned-c-ptr? not ] [ drop "( displaced alien )" text ] } - [ \ ALIEN: [ alien-address pprint* ] pprint-prefix ] + [ \ ALIEN: [ alien-address >hex text ] pprint-prefix ] } cond ; M: dll pprint* dll-path dup "DLL\" " "\"" pprint-string ; diff --git a/basis/alien/syntax/syntax-docs.factor b/basis/alien/syntax/syntax-docs.factor index c9e03724f5..c9190f68c0 100644 --- a/basis/alien/syntax/syntax-docs.factor +++ b/basis/alien/syntax/syntax-docs.factor @@ -9,7 +9,7 @@ HELP: DLL" HELP: ALIEN: { $syntax "ALIEN: address" } -{ $values { "address" "a non-negative integer" } } +{ $values { "address" "a non-negative hexadecimal integer" } } { $description "Creates an alien object at parse time." } { $notes "Alien objects are invalidated between image saves and loads, and hence source files should not contain alien literals; this word is for interactive use only. See " { $link "alien-expiry" } " for details." } ; diff --git a/basis/alien/syntax/syntax.factor b/basis/alien/syntax/syntax.factor index 2b0270d5f5..e8206c6968 100644 --- a/basis/alien/syntax/syntax.factor +++ b/basis/alien/syntax/syntax.factor @@ -9,7 +9,7 @@ IN: alien.syntax SYNTAX: DLL" lexer get skip-blank parse-string dlopen parsed ; -SYNTAX: ALIEN: scan string>number parsed ; +SYNTAX: ALIEN: 16 scan-base parsed ; SYNTAX: BAD-ALIEN parsed ; diff --git a/basis/compiler/tests/intrinsics.factor b/basis/compiler/tests/intrinsics.factor index 988164143f..ad2d2c8be5 100644 --- a/basis/compiler/tests/intrinsics.factor +++ b/basis/compiler/tests/intrinsics.factor @@ -472,15 +472,15 @@ cell 8 = [ ] unit-test [ ALIEN: 123 ] [ - 123 [ ] compile-call + HEX: 123 [ ] compile-call ] unit-test [ ALIEN: 123 ] [ - 123 [ { fixnum } declare ] compile-call + HEX: 123 [ { fixnum } declare ] compile-call ] unit-test [ ALIEN: 123 ] [ - [ 123 ] compile-call + [ HEX: 123 ] compile-call ] unit-test [ f ] [ @@ -522,8 +522,8 @@ cell 8 = [ [ ALIEN: 1234 ALIEN: 2234 ] [ ALIEN: 234 [ { c-ptr } declare - [ 1000 swap ] - [ 2000 swap ] bi + [ HEX: 1000 swap ] + [ HEX: 2000 swap ] bi ] compile-call ] unit-test diff --git a/core/alien/alien-tests.factor b/core/alien/alien-tests.factor index 2d2cec168f..7eaa5cc50b 100644 --- a/core/alien/alien-tests.factor +++ b/core/alien/alien-tests.factor @@ -55,7 +55,7 @@ cell 8 = [ ] unit-test ] when -[ "ALIEN: 1234" ] [ 1234 unparse ] unit-test +[ "ALIEN: 1234" ] [ HEX: 1234 unparse ] unit-test [ ] [ 0 B{ 1 2 3 } drop ] unit-test