Author: jonathan
Date: Sun Apr 15 12:01:28 2007
New Revision: 18228
Modified:
trunk/PBC_COMPAT
trunk/src/ops/ops.num
trunk/src/ops/set.ops
trunk/vtable.tbl
Log:
[PDD15]: Add clone_pmc vtable method to vtable.tbl and implement a
three-argument clone opcode for PMCs.
Modified: trunk/PBC_COMPAT
==============================================================================
--- trunk/PBC_COMPAT (original)
+++ trunk/PBC_COMPAT Sun Apr 15 12:01:28 2007
@@ -28,6 +28,7 @@
# please insert tab separated entries at the top of the list
+2007.04.15 jonathan added get_class opcodes and clone_p_p_p opcode
2007.04.07 jonathan added addrole opcode
2007.03.20 coke released 0.4.10
2007.02.22 pmichaud released 0.4.9
Modified: trunk/src/ops/ops.num
==============================================================================
--- trunk/src/ops/ops.num (original)
+++ trunk/src/ops/ops.num Sun Apr 15 12:01:28 2007
@@ -1235,3 +1235,5 @@
get_class_p_sc 1205
get_class_p_p 1206
get_class_p_pc 1207
+clone_p_p_p 1208
+clone_p_p_pc 1209
\ No newline at end of file
Modified: trunk/src/ops/set.ops
==============================================================================
--- trunk/src/ops/set.ops (original)
+++ trunk/src/ops/set.ops Sun Apr 15 12:01:28 2007
@@ -525,6 +525,18 @@
goto NEXT();
}
+
+=item B<clone>(out PMC, invar PMC, in PMC)
+
+Makes a copy of the PMC in $2 and puts it in $1, using the arguments in $3.
+
+=cut
+
+inline op clone(out PMC, invar PMC, in PMC) :base_mem {
+ $1 = VTABLE_clone_pmc(interp, $2, $3);
+ goto NEXT();
+}
+
=back
=cut
Modified: trunk/vtable.tbl
==============================================================================
--- trunk/vtable.tbl (original)
+++ trunk/vtable.tbl Sun Apr 15 12:01:28 2007
@@ -32,6 +32,7 @@
STRING* name()
PMC* clone()
+PMC* clone_pmc(PMC* args)
PMC* find_method(STRING* method_name)