[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev-en:225

From: SASADA Koichi <ko1 atdot.net>
Date: Thu, 26 Oct 2006 18:02:27 +0900
Subject: [yarv-dev-en:225] Re: Questions about instruction set

Hi,

Charles Oliver Nutter wrote:
>>> 4. What is the declp operand to setclassvariable?
>>
>> Ah, it is obsolete variable.  rb_cvar_set C API need it, but not affect
>> any behavior.
> 
> How does the new getclassvariable/setclassvariable determine the class
> in which to look? Does it only look in the "current" class or the class
> of "self"?

I think so.

>>> 9. Shouldn't duparray take an array from the top of the stack and push
>>> it and a copy back down? Online it looks like it takes an array operand,
>>> which seems odd.
>>
>> Ah, I see.  This instruction means "putarray" (like "putstring").  This
>> instruction works like putstring.
> 
> Maybe name should change? I understand now.

Maybe yes.

>>> 11. I assume concatarray and checkincludearray are for internal use and
>>> not used directly as the implementation of Array#include? and Array#<<
>>> or concat, correct?
>>
>> Almost same.  But Array#include? can be replaced.
> 
> So these are used for manipulating internal arrays, such as those used
> for passing arguments, etc. They can also provide the base
> implementation of Array methods, though at least include? can be
> replaced. I think I understand.

This insn is used only in "when *args" syntax.


>>> 14. Is there a specification for the format of a compiled YARV script? I
>>> would like to start generating some test scripts and building a machine
>>> to execute them.
>>
>> What format?  YARVCore::InstructionSequence.compile or compile_file
>> methods help you?
> 
> Yes, they will help me...I will look at them. If there is a wiki
> somewhere, I can also write entries on compiled file format. Do you have
> a binary specification written down anywhere yet?

YARV doesn't decide binary format.  But you can get ruby literal
representation with ISeq serialize interface.


-- 
// SASADA Koichi at atdot dot net


--
ML: yarv-dev-en quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

       213 2006-10-25 20:35 [charles.nutter sun.c] Questions about instruction set         
       214 2006-10-25 21:35 ┗[ko1 atdot.net       ]                                       
       221 2006-10-26 12:05  ┗[charles.nutter sun.c]                                     
->     225 2006-10-26 18:02   ┗[ko1 atdot.net       ]