Commit dc36b6ca authored by Arjan Oortgiese's avatar Arjan Oortgiese

Moved dynamic_string to common folder because they are equal for all the platforms.

parent 3e344a2d
definition module dynamic_string
import StdDynamic
dynamic_to_string :: !Dynamic -> *{#Char}
string_to_dynamic :: *{#Char} -> .Dynamic
copy_to_string :: !.a -> *{#Char}
copy_from_string :: !*{#Char} -> (.a,!Int)
implementation module dynamic_string
import StdDynamic
import StdEnv
import code from "copy_graph_to_string_interface."
import code from "copy_graph_to_string."
import code from "copy_string_to_graph_interface."
import code from "copy_string_to_graph."
copy_to_string :: !.a -> *{#Char}
copy_to_string g = code {
.d 1 0
jsr _copy_graph_to_string
.o 1 0
}
copy_from_string :: !*{#Char} -> (.a,!Int)
copy_from_string g = code {
.d 1 0
jsr _copy_string_to_graph
.o 1 0
pushI 0
}
dynamic_to_string :: !Dynamic -> *{#Char}
dynamic_to_string d
= copy_to_string d
string_to_dynamic :: *{#Char} -> .Dynamic
string_to_dynamic s
# (d,_) = copy_from_string s
= d
mk_unique :: !{#Char} -> *{#Char}
mk_unique s = {s` \\ s` <-: s}
definition module dynamic_string
import StdDynamic
dynamic_to_string :: !Dynamic -> *{#Char}
string_to_dynamic :: *{#Char} -> .Dynamic
copy_to_string :: !.a -> *{#Char}
copy_from_string :: !*{#Char} -> (.a,!Int)
implementation module dynamic_string
import StdDynamic
import StdEnv
import code from "copy_graph_to_string_interface."
import code from "copy_graph_to_string."
import code from "copy_string_to_graph_interface."
import code from "copy_string_to_graph."
copy_to_string :: !.a -> *{#Char}
copy_to_string g = code {
.d 1 0
jsr _copy_graph_to_string
.o 1 0
}
copy_from_string :: !*{#Char} -> (.a,!Int)
copy_from_string g = code {
.d 1 0
jsr _copy_string_to_graph
.o 1 0
pushI 0
}
dynamic_to_string :: !Dynamic -> *{#Char}
dynamic_to_string d
= copy_to_string d
string_to_dynamic :: *{#Char} -> .Dynamic
string_to_dynamic s
# (d,_) = copy_from_string s
= d
mk_unique :: !{#Char} -> *{#Char}
mk_unique s = {s` \\ s` <-: s}
definition module dynamic_string
import StdDynamic
dynamic_to_string :: !Dynamic -> *{#Char}
string_to_dynamic :: *{#Char} -> .Dynamic
copy_to_string :: !.a -> *{#Char}
copy_from_string :: !*{#Char} -> (.a,!Int)
implementation module dynamic_string
import StdDynamic
import StdEnv
import code from "copy_graph_to_string_interface."
import code from "copy_graph_to_string."
import code from "copy_string_to_graph_interface."
import code from "copy_string_to_graph."
copy_to_string :: !.a -> *{#Char}
copy_to_string g = code {
.d 1 0
jsr _copy_graph_to_string
.o 1 0
}
copy_from_string :: !*{#Char} -> (.a,!Int)
copy_from_string g = code {
.d 1 0
jsr _copy_string_to_graph
.o 1 0
pushI 0
}
dynamic_to_string :: !Dynamic -> *{#Char}
dynamic_to_string d
= copy_to_string d
string_to_dynamic :: *{#Char} -> .Dynamic
string_to_dynamic s
# (d,_) = copy_from_string s
= d
mk_unique :: !{#Char} -> *{#Char}
mk_unique s = {s` \\ s` <-: s}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment