ABCDEFGHIJKLMNOPQRST
1
Q (default semantics)Q.passByCopyJSON.stringifyStructured CloneProposed defaultProposed.passByCopyProposed pass by construction
2
Objectpass-by-promise?shallow copydeep copy (own non-function data props only, non-cyclic)deep copy (own data props only, cyclic)pass-by-referenceshallow copyby construction
3
Functionpass-by-proxy?errorerrorpass-by-referenceshallow copy if closed; else errorby construction
4
Arrayshallow copy?shallow copy?deep copydeep copypass-by-referenceshallow copyby construction
5
NumbercopycopycopycopycopycopyN/A
6
StringcopycopycopycopycopycopyN/A
7
BooleancopycopycopycopycopycopyN/A
8
nullcopycopycopycopycopycopyN/A
9
undefinedcopycopyerrorcopycopycopy
10
11
12
13
Deep copy = recursively copies the parts using the same pass-by-copy semantics (i.e. the copied object is guaranteed not to contain any more references to remote data)
14
Shallow copy = recursively copies the parts using the default semantics (i.e. the copied object may still contain references to remote data)
15
pass-by-promise = the receiving side receives a remote promise object
16
pass-by-proxy = the receiving side receives a function that calls the original and returns a promise for the result
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100