opcode sequence.

2005-08-19 Thread rajarshi das
Hi,
Here's a test on perl-5.8.6 run on z/OS :
 
$a = '0178';
$b = '00FF';
 
$a1 = pack(U0U*, hex $a);
$b1 = pack(U0U*, map { hex } split  , $b);
 
if (:$b1: =~ /:[$a1]:/i)
print ok;
 
The test runs through the opcodes OP_REGCOMP, OP_MATCH and then gets into the 
opcode OP_COND_EXPR. 
 
Now, if I change $a = '212B' and $b = '00E5'
the test runs through the opcodes OP_REGCOMP, OP_MATCH and then gets into 
OP_AND (and not OP_COND_EXPR). 
why is this so ? 
 
Thanks,
Rajarshi.


-
 Start your day with Yahoo! - make it your home page 

Re: opcode sequence.

2005-08-19 Thread Dave Mitchell
On Thu, Aug 18, 2005 at 11:19:16PM -0700, rajarshi das wrote:
 Hi,
 Here's a test on perl-5.8.6 run on z/OS :
  
 $a = '0178';
 $b = '00FF';
  
 $a1 = pack(U0U*, hex $a);
 $b1 = pack(U0U*, map { hex } split  , $b);
  
 if (:$b1: =~ /:[$a1]:/i)
 print ok;
  
 The test runs through the opcodes OP_REGCOMP, OP_MATCH and then gets
 into the opcode OP_COND_EXPR. 

Well, the test above should in fact give a syntax error, since that's not
a valid if syntax.

-- 
Britain, Britain, Britain! Discovered by Sir Henry Britain in
sixteen-oh-ten. Sold to Germany a year later for a pfennig and the promise
of a kiss. Destroyed in eighteen thirty-fourty two, and rebuilt a week
later by a man. This we know. Hello. But what of the people of Britain?
Who they? What do? And why?   -- Little Britain


Re: opcode sequence.

2005-08-19 Thread rajarshi das


Dave Mitchell [EMAIL PROTECTED] wrote:
On Thu, Aug 18, 2005 at 11:19:16PM -0700, rajarshi das wrote:
 Hi,
 Here's a test on perl-5.8.6 run on z/OS :
 
 $a = '0178';
 $b = '00FF';
 
 $a1 = pack(U0U*, hex $a);
 $b1 = pack(U0U*, map { hex } split  , $b);
 
 if (:$b1: =~ /:[$a1]:/i) {
 print ok;

}
 
 The test runs through the opcodes OP_REGCOMP, OP_MATCH and then gets
 into the opcode OP_COND_EXPR. 

Well, the test above should in fact give a syntax error, since that's not
a valid if syntax.
I have included the braces if that is what you meant.

Rajarshi. 

-- 
Britain, Britain, Britain! Discovered by Sir Henry Britain in
sixteen-oh-ten. Sold to Germany a year later for a pfennig and the promise
of a kiss. Destroyed in eighteen thirty-fourty two, and rebuilt a week
later by a man. This we know. Hello. But what of the people of Britain?
Who they? What do? And why? -- Little Britain




-
 Start your day with Yahoo! - make it your home page 

Re: opcode sequence.

2005-08-19 Thread Yitzchak Scott-Thoennes
On Fri, Aug 19, 2005 at 12:51:09AM -0700, rajarshi das wrote:
 
 
 Dave Mitchell [EMAIL PROTECTED] wrote:
 On Thu, Aug 18, 2005 at 11:19:16PM -0700, rajarshi das wrote:
  Hi,
  Here's a test on perl-5.8.6 run on z/OS :
  
  $a = '0178';
  $b = '00FF';
  
  $a1 = pack(U0U*, hex $a);
  $b1 = pack(U0U*, map { hex } split  , $b);
  
  if (:$b1: =~ /:[$a1]:/i) {
  print ok;
 
 }
  
  The test runs through the opcodes OP_REGCOMP, OP_MATCH and then gets
  into the opcode OP_COND_EXPR. 
 
 Well, the test above should in fact give a syntax error, since that's not
 a valid if syntax.
 I have included the braces if that is what you meant.

cond_expr would be there if there were an else clause.


Re: opcode sequence.

2005-08-19 Thread rajarshi das


Yitzchak Scott-Thoennes [EMAIL PROTECTED] wrote:
On Fri, Aug 19, 2005 at 12:51:09AM -0700, rajarshi das wrote:
 
 
 Dave Mitchell wrote:
 On Thu, Aug 18, 2005 at 11:19:16PM -0700, rajarshi das wrote:
  Hi,
  Here's a test on perl-5.8.6 run on z/OS :
  
  $a = '0178';
  $b = '00FF';
  
  $a1 = pack(U0U*, hex $a);
  $b1 = pack(U0U*, map { hex } split  , $b);
  
  if (:$b1: =~ /:[$a1]:/i) {
  print ok;
 
 }
  
  The test runs through the opcodes OP_REGCOMP, OP_MATCH and then gets
  into the opcode OP_COND_EXPR. 
 
 Well, the test above should in fact give a syntax error, since that's not
 a valid if syntax.
 I have included the braces if that is what you meant.

cond_expr would be there if there were an else clause.
But the test doesnot contain an else clause. What I have indicated above is 
exactly what I run.

Rajarshi.



-
Yahoo! Mail for Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.

Re: opcode sequence.

2005-08-19 Thread Dave Mitchell
On Fri, Aug 19, 2005 at 01:15:07AM -0700, rajarshi das wrote:
 cond_expr would be there if there were an else clause.
 But the test doesnot contain an else clause. What I have indicated above is 
 exactly what I run.

I have run it with both sets of values for $a and $b, and both times I see
the next op executed *by the main body of code* to be OP_AND.
Note however, that when the match is exdcuted, match itself calls into
code in utf8_heavy.pl, so the next op executed after the OP_MATCH isn't
the condiition on the next line.

-- 
The Enterprise's efficient long-range scanners detect a temporal vortex
distortion in good time, allowing it to be safely avoided via a minor
course correction.
-- Things That Never Happen in Star Trek #21