Author: leo
Date: Sun Oct 9 04:38:34 2005
New Revision: 9416
Modified:
trunk/DEPRECATED
trunk/ops/ops.num
trunk/ops/string.ops
Log:
Deprecated 8 - invalidate the pack opcode
* prepare for deletion of pack opcode
* no tests break, because there was none
Modified: trunk/DEPRECATED
==============================================================================
--- trunk/DEPRECATED (original)
+++ trunk/DEPRECATED Sun Oct 9 04:38:34 2005
@@ -21,11 +21,6 @@ savetop, restoretop,
use saveall/restoreall (whole register frame) or
user stack opcodes save/restore instead.
-C<pack> opcodes
-
- I've no clue what these are doing - for sure not a perl-ish pack.
-
-
FUTURE changes
Not yet deprecated, but it's recommended to use the new syxtax and
Modified: trunk/ops/ops.num
==============================================================================
--- trunk/ops/ops.num (original)
+++ trunk/ops/ops.num Sun Oct 9 04:38:34 2005
@@ -705,26 +705,26 @@ ord_i_s_ic 674
ord_i_sc 675
ord_i_sc_i 676
ord_i_sc_ic 677
-pack_s_i_i 678
-pack_s_i_i_i 679
-pack_s_i_i_ic 680
-pack_s_i_ic 681
-pack_s_i_ic_i 682
-pack_s_i_ic_ic 683
-pack_s_i_n 684
-pack_s_i_nc 685
-pack_s_i_s 686
-pack_s_i_sc 687
-pack_s_ic_i 688
-pack_s_ic_i_i 689
-pack_s_ic_i_ic 690
-pack_s_ic_ic 691
-pack_s_ic_ic_i 692
-pack_s_ic_ic_ic 693
-pack_s_ic_n 694
-pack_s_ic_nc 695
-pack_s_ic_s 696
-pack_s_ic_sc 697
+DELETED_pack_s_i_i 678
+DELETED_pack_s_i_i_i 679
+DELETED_pack_s_i_i_ic 680
+DELETED_pack_s_i_ic 681
+DELETED_pack_s_i_ic_i 682
+DELETED_pack_s_i_ic_ic 683
+DELETED_pack_s_i_n 684
+DELETED_pack_s_i_nc 685
+DELETED_pack_s_i_s 686
+DELETED_pack_s_i_sc 687
+DELETED_pack_s_ic_i 688
+DELETED_pack_s_ic_i_i 689
+DELETED_pack_s_ic_i_ic 690
+DELETED_pack_s_ic_ic 691
+DELETED_pack_s_ic_ic_i 692
+DELETED_pack_s_ic_ic_ic 693
+DELETED_pack_s_ic_n 694
+DELETED_pack_s_ic_nc 695
+DELETED_pack_s_ic_s 696
+DELETED_pack_s_ic_sc 697
peek_pad_p 698
peek_s 699
peek_s_p 700
Modified: trunk/ops/string.ops
==============================================================================
--- trunk/ops/string.ops (original)
+++ trunk/ops/string.ops Sun Oct 9 04:38:34 2005
@@ -280,90 +280,22 @@ inline op index(out INT, in STR, in STR,
########################################
-=item B<pack>(inout STR, in INT, in INT)
-
-=item B<pack>(inout STR, in INT, in NUM)
-
-=item B<pack>(inout STR, in INT, in STR)
-
-=item B<pack>(inout STR, in INT, in INT, in INT)
-
-#=item B<pack>(inout STR, in INT, in NUM, in INT) (B<unimplemented>)
-
-#=item B<pack>(inout STR, in INT, in STR, in INT) (B<unimplemented>)
-
-Concat $2 bytes from $3 at the end of $1 or replace them at $4 if provided.
-
-BE AFRAID, THIS IS A QUICK HACK, USE IT AT YOUR OWN RISK.
-
=cut
-inline op pack(inout STR, in INT, in INT) :base_core {
- char *c = (char *)&$3;
- STRING *s;
-
- s = string_make(interpreter, c, (UINTVAL)$2, "binary", 0);
- $1 = string_concat(interpreter, $1, s, 1);
-
+op DELETED_pack(inout STR, in INT, in INT) :base_core {
goto NEXT();
}
-inline op pack(inout STR, in INT, in NUM) :base_core {
- char *c = (char *)&$3;
- STRING *s;
-
- s = string_make(interpreter, c, (UINTVAL)$2, "binary", 0);
- $1 = string_concat(interpreter, $1, s, 1);
-
+op DELETED_pack(inout STR, in INT, in NUM) :base_core {
goto NEXT();
}
-inline op pack(inout STR, in INT, in STR) :base_core {
- STRING *t,*s = $3;
- UINTVAL len = (UINTVAL)$2;
-
- if (s->strlen < len) { /* XXXX: what is this supposed to do? */
- STRING *temp;
- temp = string_repeat(interpreter,
-
string_from_cstring(interpreter, " ", 1),
- (UINTVAL)(len -
s->strlen),
- NULL);
- /* $1 = string_concat(interpreter, $1, s, 1); */
- t = string_concat(interpreter, s, temp, 1);
- } else {
- t = string_substr(interpreter, s, 0, len, NULL, 0);
- }
-
- $1 = string_concat(interpreter, $1, t, 1);
-
+op DELETED_pack(inout STR, in INT, in STR) :base_core {
goto NEXT();
}
-inline op pack(inout STR, in INT, in INT, in INT) :base_core {
- char *c = (char *)&$3, *n;
- STRING *s;
- INTVAL ln;
- char *t;
- int i;
-
- s = string_make(interpreter, c, (UINTVAL)$2, "binary", 0);
- ln = string_length(interpreter, $1);
- if (ln < $4 + $2)
- {
- PObj_buflen($1) = $1->strlen;
- string_grow(interpreter, $1, $4 + $2 - ln);
- $1->bufused = $1->strlen = PObj_buflen($1);
- }
-
- /* XXX this is EVIL, use string_replace */
- n = $1->strstart;
- t = string_to_cstring(interpreter, s);
- for (i = $4; i < $4 + $2; i++)
- n[i] = t[i - $4];
- string_cstring_free(t);
-
-
+op DELETED_pack(inout STR, in INT, in INT, in INT) :base_core {
goto NEXT();
}