# New Ticket Created by  Cory Spencer 
# Please include the string:  [perl #24572]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=24572 >



Adds an 'eq_addr' opcode with syntax:

  eq_addr(in PMC, in PMC, inconst INT)

eq_addr compares the memory address $1 is stored at to the memory address
$2 is stored at, and branches to $3 if the two are equal.  (ie. They are
the same, identical PMC objects.)
--- cmp.ops.old 2003-11-28 14:15:09.000000000 -0800
+++ cmp.ops.new 2003-11-28 14:15:20.000000000 -0800
@@ -43,6 +43,10 @@
 
 Branch if $1 is equal to $2.
 
+=item B<eq_addr>(in PMC, in PMC, inconst INT)
+
+Branch if the memory address $1 is stored at is equal to the memory address $2 is 
stored at (ie. They are the same PMC.)
+
 =cut
 
 inline op eq(in INT, in INT, inconst INT) {
@@ -80,6 +84,13 @@
   goto NEXT();
 }
 
+op eq_addr (in PMC, in PMC, inconst INT) {
+  if($1->vtable->is_same(interpreter, $1, $2)) {
+    goto OFFSET($3);
+  }
+  goto NEXT();
+}
+
 ########################################
 
 =item B<ne>(in INT, in INT, inconst INT)

Reply via email to