Skip to content

Commit

Permalink
Mark runtime functions &pure were possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Jan 22, 2024
1 parent 1c99d1c commit 3f7b548
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hilti/lib/hilti.hlt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ declare public void debug(string dbg_stream, any obj) &cxxname="hilti::rt::debug
declare public void debugIndent(string dbg_stream) &cxxname="hilti::rt::debug::indent" &have_prototype;
declare public void debugDedent(string dbg_stream) &cxxname="hilti::rt::debug::dedent" &have_prototype;

declare public time current_time() &cxxname="hilti::rt::time::current_time" &have_prototype;
declare public time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="hilti::rt::time::mktime" &have_prototype;
declare public time current_time() &cxxname="hilti::rt::time::current_time" &have_prototype &pure;
declare public time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="hilti::rt::time::mktime" &have_prototype &pure;

declare public void abort() &cxxname="hilti::rt::abort_with_backtrace" &have_prototype;

Expand All @@ -49,5 +49,5 @@ public type RecoverableFailure = exception &cxxname="hilti::rt::RecoverableFailu
public type MissingData = exception &cxxname="hilti::rt::MissingData";

# Returns the message associated with an exception.
declare public string exception_what(SystemException excpt) &cxxname="hilti::rt::exception::what" &have_prototype;
declare public string exception_what(SystemException excpt) &cxxname="hilti::rt::exception::what" &have_prototype &pure;
}
2 changes: 1 addition & 1 deletion spicy/lib/spicy_rt.hlt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public type Sink = struct {
method void set_auto_trim(bool enable);
method void set_initial_sequence_number(uint<64> seq);
method void set_policy(any policy);
method uint<64> size();
method uint<64> size() &pure;
method void skip(uint<64> seq);
method void trim(uint<64> seq);
method void write(bytes data, optional<uint<64>> seq = Null, optional<uint<64>> len = Null);
Expand Down

0 comments on commit 3f7b548

Please sign in to comment.