#1138: Create a 'vivify' opcode
-----------------------------+----------------------------------------------
 Reporter:  Austin_Hastings  |        Type:  todo  
   Status:  new              |    Priority:  normal
Milestone:                   |   Component:  core  
  Version:  1.7.0            |    Severity:  medium
 Keywords:                   |        Lang:        
    Patch:                   |    Platform:        
-----------------------------+----------------------------------------------

Comment(by pmichaud):

 Several related points.

 First, also take a look at TT #787, which deals with the issue of lvalues
 in Parrot in general, and is very related to the above code pattern that
 NQP/PCT generate.

 Second, please-please-please note that we're generally deprecating the use
 of string constants as class/PMC identifiers -- PCT's use of strings there
 is really a fossil.  If we introduce a vivify opcode, it needs to be {{{
 vivify P, PC }}}.

 Third, based on an improved understanding of the Perl 6 specification, NQP
 and Rakudo will be able to eliminate the above pattern altogether for
 lexical variables -- i.e., we can guarantee that lexicals will be
 initialized to Undef at declaration time, and thus all lexical lookups
 will be able to avoid the "vivify if null" sequence altogether.  We'll
 still need the vivify sequence for aggregate lookups (hashes/arrays), but
 there we should also deal with the issue of lvalue vivification and value
 assignment.

 Hope this can spark some useful discussion.

 Pm

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1138#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to