aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/copy.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-11-18 17:58:14 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-11-18 18:00:24 +0100
commit5d764f988ab09326d24e39a172083b09ab364c6c (patch)
treebf899001ecf0427769b193d6c1a61054353629ce /erts/emulator/beam/copy.c
parent3f29cf1f72f50d20ce1864f76e1a298602429ca4 (diff)
downloadotp-5d764f988ab09326d24e39a172083b09ab364c6c.tar.gz
otp-5d764f988ab09326d24e39a172083b09ab364c6c.tar.bz2
otp-5d764f988ab09326d24e39a172083b09ab364c6c.zip
Refactor sharing preserved copy flags
The TMPBUF option is no longer needed due to is_literal test and NONE was only used for initial debugging. So we remove the entire option.
Diffstat (limited to 'erts/emulator/beam/copy.c')
-rw-r--r--erts/emulator/beam/copy.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/erts/emulator/beam/copy.c b/erts/emulator/beam/copy.c
index 83ca527334..67a96f6442 100644
--- a/erts/emulator/beam/copy.c
+++ b/erts/emulator/beam/copy.c
@@ -923,10 +923,6 @@ Eterm copy_struct_x(Eterm obj, Uint sz, Eterm** hpp, ErlOffHeap* off_heap, Uint
* Using an ESTACK but not very transparently; consider refactoring
*/
-#ifdef SHCOPY_DISABLE
-int disable_copy_shared = ERTS_SHCOPY_FLG_NONE;
-#endif
-
#define DECLARE_SHTABLE(s) \
DECLARE_ESTACK(s); \
Uint ESTK_CONCAT(s,_offset) = 0
@@ -1034,7 +1030,7 @@ do { \
* Copy object "obj" preserving sharing.
* First half: count size and calculate sharing.
*/
-Uint copy_shared_calculate(Eterm obj, erts_shcopy_t *info, Uint32 flags)
+Uint copy_shared_calculate(Eterm obj, erts_shcopy_t *info)
{
Uint sum;
Uint e;
@@ -1058,13 +1054,6 @@ Uint copy_shared_calculate(Eterm obj, erts_shcopy_t *info, Uint32 flags)
if (IS_CONST(obj))
return 0;
-#ifdef SHCOPY_DISABLE
- flags |= disable_copy_shared;
-#endif
-
- if (flags & ERTS_SHCOPY_FLG_NONE)
- return size_object(obj);
-
VERBOSE(DEBUG_SHCOPY, ("[pid=%T] copy_shared_calculate %p\n", mypid, obj));
VERBOSE(DEBUG_SHCOPY, ("[pid=%T] message is %T\n", mypid, obj));
@@ -1299,7 +1288,7 @@ Uint copy_shared_calculate(Eterm obj, erts_shcopy_t *info, Uint32 flags)
* Second half: copy and restore the object.
*/
Uint copy_shared_perform(Eterm obj, Uint size, erts_shcopy_t *info,
- Eterm** hpp, ErlOffHeap* off_heap, Uint32 flags) {
+ Eterm** hpp, ErlOffHeap* off_heap) {
Uint e;
unsigned sz;
Eterm* ptr;
@@ -1328,13 +1317,6 @@ Uint copy_shared_perform(Eterm obj, Uint size, erts_shcopy_t *info,
if (IS_CONST(obj))
return obj;
-#ifdef SHCOPY_DISABLE
- flags |= disable_copy_shared;
-#endif
-
- if (flags & ERTS_SHCOPY_FLG_NONE)
- return copy_struct(obj, size, hpp, off_heap);
-
VERBOSE(DEBUG_SHCOPY, ("[pid=%T] copy_shared_perform %p\n", mypid, obj));
/* step #2: was performed before this function was called