« 小数点以下の拡大 | メイン | アルファ付き減色ツール »

2012年10月23日

吉里吉里Java:: TJS2 バイトコードファイルフォーマット

    

基本構造

 0123備考
0'T''J''S''2'シグネチャ
1'1''0''0'\0バージョン
2file size 
3'D''A''T''A' 
4data area sizeForuCC含む
5data... 
6'O''B''J''S' 
7objects area sizeForuCC含む
8top level object index-1の時はnull
9number of objects 
10objects... 


data area - 最初に個数があり、その後配列がある形

countbyte...4バイトアライメント
countshort...4バイトアライメント
countint... 
countlong...8バイト
countdouble...IEEE 754 浮動小数点の「ダブルフォーマット (double format)」ビットレイアウト
countstring...length + char array 4バイトアライメント
countoctet...length + byte array 4バイトアライメント

object area

 0123備考
0'T''J''S''2'  
1object area size整数直値 
2parent indexobject index 
3name文字列(data index) 
4context type整数直値クラスや関数等の種類
5max variable count整数直値固定変数の数
6variable reserve count整数直値固定変数予備 - context type によって決まるので不要だが
7max frame count整数直値レジスタ数
8func decl arg count整数直値定義時の関数の引数の数
9func decl unnamed arg array base整数直値無名配列引数より前に定義されている引数の数
10func decl collapse base整数直値名前付き配列引数より前定義されている引数の数
11prop setterobject indexプロパティセッターオブジェクト、context type が property の時に持つ
12prop getterobject indexプロパティゲッターオブジェクト、context type が property の時に持つ
13super class getterobject indexスーパークラスを取得するためのオブジェクト
15source pos arrayコード位置配列とソース位置配列デバッグ用、現状省略される
16code arrayshort の配列バイトコード実体
17data arraytype と index のペアの配列定数配列 ( Variant 型 )
18super class getter pointer arrayint の配列スーパークラスゲッターのバイトコードオフセット配列
19property object array名前とオブジェクトのペアの配列関数等のメンバー登録するオブジェクト配列

この説明だけではわからないと思うが、一応ここに記しておく。



投稿者 Takenori : 2012年10月23日 03:44




comments powered by Disqus
Total : Today : Yesterday : なかのひと