Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-libraries
Commits
a06ae71e
Commit
a06ae71e
authored
Jun 27, 2002
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix inline code
parent
dbdb6680
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
38 deletions
+14
-38
StdEnv/StdString.icl
StdEnv/StdString.icl
+14
-38
No files found.
StdEnv/StdString.icl
View file @
a06ae71e
...
...
@@ -11,130 +11,106 @@ instance == {#Char}
where
(==)
::
!{#
Char
}
!{#
Char
}
->
Bool
(==)
a
b
=
code {
.inline
==;#
=
code inline {
.d
2
0
jsr
eqAC
.o
0
1
b
.end
}
instance
<
{#
Char
}
where
(<)
::
!{#
Char
}
!{#
Char
}
->
Bool
(<)
a
b
=
code {
.inline
<;#
=
code inline {
.d
2
0
jsr
cmpAC
.o
0
1
i
pushI
0
gtI
.end
}
instance
toString
Int
where
toString
a
=
code {
.inline
toString;i
=
code inline {
.d
0
1
i
jsr
ItoAC
.o
1
0
.end
}
instance
toString
Char
where
toString
a
=
code {
.inline
toString;c
=
code inline {
CtoAC
.end
}
instance
toString
Real
where
toString
a
=
code {
.inline
toString;r
=
code inline {
.d
0
2
r
jsr
RtoAC
.o
1
0
.end
}
instance
toString
Bool
where
toString
::
!
Bool
->
{#
Char
}
toString
a
=
code {
.inline
toString;b
=
code inline {
.d
0
1
b
jsr
BtoAC
.o
1
0
.end
}
instance
toString
{#
Char
}
where
toString
::
!{#
Char
}
->
{#
Char
}
// dummy
toString
a
=
code {
.inline
toString;#
no_op
.end
=
code inline {
no_op
}
instance
fromString
{#
Char
}
where
fromString
::
!{#
Char
}
->
{#
Char
}
// dummy
fromString
a
=
code {
.inline
fromString;#
no_op
.end
=
code inline {
no_op
}
instance
%
{#
Char
}
where
(%)
::!{#
Char
}
!(!
Int
,!
Int
)
->
{#
Char
}
(%)
str
(
a
,
b
)
=
code {
.inline
%;#
=
code inline {
.d
1
2
ii
jsr
sliceAC
.o
1
0
.end
}
instance
+++
{#
Char
}
where
(+++)
::
!{#
Char
}
!{#
Char
}
->
{#
Char
}
(+++)
a
b
=
code {
.inline
+++;#
=
code inline {
.d
2
0
jsr
catAC
.o
1
0
.end
}
(+++.)
infixr
5
::
!{#
Char
}
!{#
Char
}
->
.{#
Char
}
(+++.)
a
b
=
code {
.inline
+++.
=
code inline {
.d
2
0
jsr
catAC
.o
1
0
.end
}
(:=)
infixl
9
::
!{#
Char
}
!(!
Int
,!
Char
)
->
{#
Char
}
// update i-th element
(:=)
s
(
i
,
c
)
=
code {
.inline
:=
=
code inline {
.d
1
2
ic
jsr
updateAC
.o
1
0
.end
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment