aboutsummaryrefslogtreecommitdiff
path: root/src/tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools.h')
-rw-r--r--src/tools.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/tools.h b/src/tools.h
index dce7378..e14ac65 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -31,7 +31,36 @@ enum class InterCopyResult
31 Error 31 Error
32}; 32};
33 33
34[[nodiscard]] bool inter_copy_one(Universe* U, Dest L2, int L2_cache_i, Source L, int i, VT vt_, LookupMode mode_, char const* upName_); 34// ################################################################################################
35
36using CacheIndex = Unique<int>;
37using SourceIndex = Unique<int>;
38struct InterCopyContext
39{
40
41 Universe* const U;
42 Dest const L2;
43 Source const L1;
44 CacheIndex const L2_cache_i;
45 SourceIndex L1_i; // that one can change when we reuse the context
46 VT vt; // that one can change when we reuse the context
47 LookupMode const mode;
48 char const* name; // that one can change when we reuse the context
49
50 [[nodiscard]] bool inter_copy_one() const;
51
52 private:
53
54 [[nodiscard]] bool inter_copy_userdata() const;
55 [[nodiscard]] bool inter_copy_function() const;
56 [[nodiscard]] bool inter_copy_table() const;
57 [[nodiscard]] bool copyclone() const;
58 [[nodiscard]] bool copydeep() const;
59 [[nodiscard]] bool push_cached_metatable() const;
60 void copy_func() const;
61 void copy_cached_func() const;
62 void inter_copy_keyvaluepair() const;
63};
35 64
36// ################################################################################################ 65// ################################################################################################
37 66