annotate slide/CbCXv6.md @ 31:69ac4230c3f2

fix slide
author tobaru
date Sun, 09 Feb 2020 22:52:56 +0900
parents 49d691a92b41
children e68c3bd31098
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
1 # CbCインターフェースによる CbCXv6 の書き換え
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
2 - 並列信頼研
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
3 - 桃原 優
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
4
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
5 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
6
21
tobaru
parents: 19
diff changeset
7 # 概要
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
8 - OS の信頼性を上げたい
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
9 - CbCを使って xv6 という OS を書き換える
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
10 - Paging の書き換えを行った
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
11 - まだ実装中
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
12 - 将来はコンテナやVMをメタ計算として実装できるはず
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
13
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
14 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
15
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
16 # OS の信頼性を上げたい
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
17 - 仕様を満たすことを証明する
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
18 - 証明しやすい形の記述を作る
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
19 - CbCの goto で書く
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
20 - 状態遷移系に近い形で記述できる(証明しやすい)
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
21 - 関数型の記述
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
22 - CbCのinterface で書く
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
23 - 記述のモジュール化
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
24
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
25 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
26
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
27 # メタレベルとノーマルレベル
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
28 - ノーマルレベル
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
29 - CbCで記述される普通のアルゴリズム
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
30 - メタレベル
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
31 - Paging などのメモリやCPU自体の操作
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
32 - プログラムの正しさの証明
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
33 - Context
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
34 - メタレベルで使用される Meta Data を置く場所
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
35
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
36 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
37
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
38 # Continuation based C
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
39 - ノーマルレベルとメタレベルの処理を同じ言語で行えるようにした言語(以下CbC)
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
40 - Code Gear
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
41 - 基本的な処理の単位
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
42 - goto 文で遷移する
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
43 - Data Gear
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
44 - データの単位
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
45 - Meta Code Gear
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
46 - goto meta
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
47 - Code Gear の間に挟める計算
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
48 - Meta Data Gear
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
49 - Context
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
50 - Code Gearの間の接続など
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
51
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
52 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
53
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
54 # goto による継続
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
55
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
56 - Code Gear の処理の間を goto によって遷移していく
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
57
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
58 ![](https://i.imgur.com/etfQund.png)
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
59
19
tobaru
parents: 18
diff changeset
60
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
61 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
62
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
63 # Data Gear の継続
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
64 - Code Gear で定義されたデータ
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
65 - goto の際に Data Gear も継続される
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
66
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
67 ![](https://i.imgur.com/3E0DGWA.png)
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
68
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
69 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
70
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
71 # Meta Code Gear
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
72 - 実際にはノーマルレベルの間にメタレベルの処理がある
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
73
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
74 ![](https://i.imgur.com/vy0NxrG.png)
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
75
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
76 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
77
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
78 # Meta Data Gear
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
79 - CbC では接続可能な Code Gear, Data Gear のリスト
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
80 - Data Gear を確保するメモリ空間
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
81 - ノーマルレベルでの書き換えやアクセスを防ぐために存在
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
82
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
83 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
84
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
85 # Xv6
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
86 - MIT の講義用教材として作られたOS
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
87 - 規格化される前のCで書かれたUNIX V6 を書き換えた
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
88 - 1万行程の軽量なOS
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
89 - Linuxだと数千万行
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
90 - Xv6 をCbCで書き換える
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
91
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
92 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
93
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
94
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
95 # Xv6の構成
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
96 - systemcall
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
97 - Scheduler
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
98 - Virtual Memory
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
99 - file system
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
100 - tty
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
101
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
102
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
103
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
104 ---
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
105 # カーネル空間
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
106 - OS の中核となるプログラムで Meta Level に相当する
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
107 - Xv6 ではカーネルとユーザープログラムは分離されている
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
108 - ユーザープログラムはカーネルに直接アクセスできない。
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
109 - ユーザープログラムによる書き換えやアクセスを防ぐため
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
110 - 呼び出す場合は system call
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
111
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
112 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
113
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
114 # system call
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
115 - system call 呼び出し
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
116 - トラップ の発生
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
117 - ユーザープログラムの中断
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
118 - 処理がカーネルに切り替わる
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
119
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
120 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
121
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
122 # Paging
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
123 - Page と呼ばれる固定長のブロックに分割して、メモリとスワップ領域で Page を入れ替えて管理
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
124 - 仮想メモリとして扱うことでフラグメンテーションの解消と空き番地を探す必要がなくなる
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
125
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
126 ---
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
127
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
128 # Xv6の書き換え方針
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
129 - メタレベルとノーマルレベルを記述できるOSを実装したい
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
130 - 段階的に書き換えていきたい
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
131 - Paging を書き換える理由
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
132 - OS の信頼性を保証する上で重要なメモリ管理部分
21
tobaru
parents: 19
diff changeset
133
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
134 - __code で書き直していく
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
135
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
136 ---
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
137
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
138 # CbCインターフェース
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
139 - ノーマルレベルからメタレベルの記述が記述が煩雑になるためインターフェースを導入
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
140 - インターフェースによる他のメリット
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
141 - 煩雑な記述の解消
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
142 - 実装の入れ替え
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
143
19
tobaru
parents: 18
diff changeset
144 - 実装は別で定義し、呼び出す
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
145 - インターフェースによって実装を置き換えることができる
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
146
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
147 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
148
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
149 # CbCインターフェース
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
150 - Data Gear と Data Gear に対して操作を行う Code Gear の集合を表現する **Meta Data Gear**
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
151
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
152 - インターフェース実装と定義の図入れる
19
tobaru
parents: 18
diff changeset
153
tobaru
parents: 18
diff changeset
154 ---
tobaru
parents: 18
diff changeset
155
tobaru
parents: 18
diff changeset
156 # インターフェースの定義
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
157 - Xv6 の Virtual Memory の API 部分のインターフェース
19
tobaru
parents: 18
diff changeset
158
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
159 ``` c
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
160 typedef struct vm<Type,Impl> {
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
161 __code init_vmm(Impl* vm, __code next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
162 __code kpt_freerange(Impl* vm, uint low, uint hi, __code next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
163 __code kpt_alloc(Impl* vm ,__code next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
164 __code switchuvm(Impl* vm ,struct proc* p, __code next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
165 __code init_inituvm(Impl* vm, pde_t* pgdir, char* init, uint sz, __code next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
166 __code loaduvm(Impl* vm,pde_t* pgdir, char* addr, struct inode* ip, uint offset, uint sz, __code next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
167 __code allocuvm(Impl* vm, pde_t* pgdir, uint oldsz, uint newsz, __code next(...));
19
tobaru
parents: 18
diff changeset
168
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
169 ```
19
tobaru
parents: 18
diff changeset
170
tobaru
parents: 18
diff changeset
171 ---
tobaru
parents: 18
diff changeset
172
tobaru
parents: 18
diff changeset
173
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
174 # インターフェースの命名
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
175 - typedef struct の直後にインターフェース名(vm)を書く
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
176 - Data Gear にマッピングされる
19
tobaru
parents: 18
diff changeset
177
tobaru
parents: 18
diff changeset
178 ``` c
tobaru
parents: 18
diff changeset
179 typedef struct vm<Type,Impl> {
tobaru
parents: 18
diff changeset
180 ```
tobaru
parents: 18
diff changeset
181
tobaru
parents: 18
diff changeset
182 ---
tobaru
parents: 18
diff changeset
183
23
49d691a92b41 fix slide
tobaru
parents: 21
diff changeset
184
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
185 # インターフェースの Code Gear
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
186 - Code Gear は __code CodeGear名(引数); で記述する
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
187 - 引数が Data Gear に相当する
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
188 - 第1引数の Impl* vm がインターフェースの実装の型になる
19
tobaru
parents: 18
diff changeset
189
tobaru
parents: 18
diff changeset
190
tobaru
parents: 18
diff changeset
191 ``` c
21
tobaru
parents: 19
diff changeset
192 typedef struct vm<Type,Impl> {
19
tobaru
parents: 18
diff changeset
193 __code init_vmm(Impl* vm, __code next(...));
tobaru
parents: 18
diff changeset
194 __code kpt_freerange(Impl* vm, uint low, uint hi, __code next(...));
tobaru
parents: 18
diff changeset
195 __code kpt_alloc(Impl* vm ,__code next(...));
tobaru
parents: 18
diff changeset
196 __code switchuvm(Impl* vm ,struct proc* p, __code next(...));
tobaru
parents: 18
diff changeset
197 __code init_inituvm(Impl* vm, pde_t* pgdir, char* init, uint sz, __code next(...));
tobaru
parents: 18
diff changeset
198 __code loaduvm(Impl* vm,pde_t* pgdir, char* addr, struct inode* ip, uint offset, uint sz, __code next(...));
tobaru
parents: 18
diff changeset
199 __code allocuvm(Impl* vm, pde_t* pgdir, uint oldsz, uint newsz, __code next(...));
tobaru
parents: 18
diff changeset
200
tobaru
parents: 18
diff changeset
201 ```
tobaru
parents: 18
diff changeset
202
tobaru
parents: 18
diff changeset
203 ---
tobaru
parents: 18
diff changeset
204
tobaru
parents: 18
diff changeset
205 # next(...)
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
206 - __code next(...) は次の Code Gear の継続先
19
tobaru
parents: 18
diff changeset
207 - それぞれの Code Gear の引数の1つに設定する
tobaru
parents: 18
diff changeset
208 ``` c
tobaru
parents: 18
diff changeset
209 __code kpt_freerange(Impl* vm, uint low, uint hi, __code next(...));
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
210 //....
19
tobaru
parents: 18
diff changeset
211 __code next(...);
tobaru
parents: 18
diff changeset
212 } vm;
tobaru
parents: 18
diff changeset
213 ```
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
214 ``` c
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
215 __code exit(){
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
216 //....
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
217 }
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
218
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
219 goto vm->kpt_freerange(vm, low, hi, exit);
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
220 ```
19
tobaru
parents: 18
diff changeset
221
tobaru
parents: 18
diff changeset
222 ---
tobaru
parents: 18
diff changeset
223
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
224 # Interface の実装の型
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
225 - 実装側のヘッダーファイルも vm_impl と同じように用意する
19
tobaru
parents: 18
diff changeset
226
tobaru
parents: 18
diff changeset
227 ``` c
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
228 typedef struct vm_impl<Impl, Isa> impl vm{
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
229 ...
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
230 __code loaduvm_ptesize_check(Type* vm_impl, uint i, pte_t* pte, uint sz,
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
231 __code next(...));
19
tobaru
parents: 18
diff changeset
232 ```
tobaru
parents: 18
diff changeset
233
tobaru
parents: 18
diff changeset
234
tobaru
parents: 18
diff changeset
235 ---
tobaru
parents: 18
diff changeset
236
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
237 # インターフェースの実装
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
238 - 実装は型と実装をそれぞれ別ファイルで定義する(vm_impl.h と vm_impl.cbc)
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
239 - 実装するインターフェースは #interface で宣言する
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
240
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
241 ``` c
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
242 #interface "vm.h"
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
243 ```
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
244
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
245 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
246
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
247 # vm_impl のコンストラクタ
19
tobaru
parents: 18
diff changeset
248 - create_imple の関数内で vm の型を定義し、vm->CodeGear名 で対応させていく
tobaru
parents: 18
diff changeset
249 - 実装を Code Gear で記述していく。
tobaru
parents: 18
diff changeset
250
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
251 - struct vm* vm = new vm();
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
252 - インターフェースのメモリ空間を確保
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
253 - vm->void_ret = C_vm_void_ret;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
254 - Code Gear の enum の設定
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
255 - インターフェースのAPIと enum の番号を紐付けている
19
tobaru
parents: 18
diff changeset
256
tobaru
parents: 18
diff changeset
257 ``` c
tobaru
parents: 18
diff changeset
258 vm* createvm_impl(struct Context* cbc_context) {
tobaru
parents: 18
diff changeset
259 struct vm* vm = new vm();
tobaru
parents: 18
diff changeset
260 ....
tobaru
parents: 18
diff changeset
261 vm->void_ret = C_vm_void_ret;
tobaru
parents: 18
diff changeset
262 vm->init_vmm = C_init_vmmvm_impl;
tobaru
parents: 18
diff changeset
263 vm->kpt_freerange = C_kpt_freerangevm_impl;
tobaru
parents: 18
diff changeset
264 vm->kpt_alloc = C_kpt_allocvm_impl;
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
265 ```
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
266
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
267
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
268 - APIの実装の例(init_vmm)
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
269 - C_init_vmmvm_impl が メタレベルでinit_vmmvm_impl と対応する
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
270 ``` c
19
tobaru
parents: 18
diff changeset
271 __code init_vmmvm_impl(struct vm_impl* vm,__code next(...)) {
tobaru
parents: 18
diff changeset
272 initlock(&kpt_mem.lock, "vm");
tobaru
parents: 18
diff changeset
273 kpt_mem.freelist = NULL;
tobaru
parents: 18
diff changeset
274
tobaru
parents: 18
diff changeset
275 goto next(...);
tobaru
parents: 18
diff changeset
276 }
tobaru
parents: 18
diff changeset
277 ```
tobaru
parents: 18
diff changeset
278
tobaru
parents: 18
diff changeset
279 ---
tobaru
parents: 18
diff changeset
280
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
281 # インターフェース実装内の CbC
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
282 - for文やif文がある場合はさらに実装を分ける
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
283 - 状態遷移ベースで記述したい
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
284 - インターフェースは外から呼び出されるAPI
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
285 - それに対してインターフェースの実装の Code Gearから明示的に呼び出される Code Gearは、Java の private メソッドのように扱われる。
19
tobaru
parents: 18
diff changeset
286 - 実際に vm.c の loaduvm の実装を分けた記述を説明する
tobaru
parents: 18
diff changeset
287
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
288 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
289
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
290 # 実装内の明示的な遷移の処理
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
291 - vm と同じ create_impl 内で vm_impl を定義し、private で実装する Code Gear を定義する
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
292 - loaduvmvm_impl で goto によって private に遷移する
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
293
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
294 ``` c
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
295 __code loaduvmvm_impl(struct vm_impl* vm, pde_t* pgdir, char* addr, struct inode* ip, uint offset, uint sz, __code next(...)) {
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
296 Gearef(cbc_context, vm_impl)->pgdir = pgdir;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
297 Gearef(cbc_context, vm_impl)->addr = addr;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
298 Gearef(cbc_context, vm_impl)->ip = ip;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
299 Gearef(cbc_context, vm_impl)->offset = offset;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
300 Gearef(cbc_context, vm_impl)->sz = sz;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
301 Gearef(cbc_context, vm_impl)->next = next;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
302
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
303 goto loaduvm_ptesize_checkvm_impl(vm, next(...));
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
304 }
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
305 ```
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
306
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
307 ``` c
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
308 vm* createvm_impl(struct Context* cbc_context) {
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
309 ...
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
310 struct vm_impl* vm_impl = new vm_impl();
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
311 ...
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
312 vm_impl->loaduvm_ptesize_check = C_loaduvm_ptesize_checkvm_impl;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
313 ....
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
314 vm->loaduvm = C_loaduvmvm_impl;
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
315 ....
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
316 }
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
317 ```
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
318 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
319
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
320 # loaduvmの CbCによる書き換え
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
321 - loaduvmは何でなぜ書き換えてるのか
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
322 - vm.cのloaduvmの処理をCbC で書き換える
19
tobaru
parents: 18
diff changeset
323
tobaru
parents: 18
diff changeset
324 ``` c
tobaru
parents: 18
diff changeset
325 int loaduvm (pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)
tobaru
parents: 18
diff changeset
326 {
tobaru
parents: 18
diff changeset
327 uint i, pa, n;
tobaru
parents: 18
diff changeset
328 pte_t *pte;
tobaru
parents: 18
diff changeset
329
tobaru
parents: 18
diff changeset
330 if ((uint) addr % PTE_SZ != 0) {
tobaru
parents: 18
diff changeset
331 panic("loaduvm: addr must be page aligned");
tobaru
parents: 18
diff changeset
332 }
tobaru
parents: 18
diff changeset
333
tobaru
parents: 18
diff changeset
334 for (i = 0; i < sz; i += PTE_SZ) {
tobaru
parents: 18
diff changeset
335 if ((pte = walkpgdir(pgdir, addr + i, 0)) == 0) {
tobaru
parents: 18
diff changeset
336 panic("loaduvm: address should exist");
tobaru
parents: 18
diff changeset
337 }
tobaru
parents: 18
diff changeset
338
tobaru
parents: 18
diff changeset
339 pa = PTE_ADDR(*pte);
tobaru
parents: 18
diff changeset
340
tobaru
parents: 18
diff changeset
341 if (sz - i < PTE_SZ) {
tobaru
parents: 18
diff changeset
342 n = sz - i;
tobaru
parents: 18
diff changeset
343 } else {
tobaru
parents: 18
diff changeset
344 n = PTE_SZ;
tobaru
parents: 18
diff changeset
345 }
tobaru
parents: 18
diff changeset
346
tobaru
parents: 18
diff changeset
347 if (readi(ip, p2v(pa), offset + i, n) != n) {
tobaru
parents: 18
diff changeset
348 return -1;
tobaru
parents: 18
diff changeset
349 }
tobaru
parents: 18
diff changeset
350 }
tobaru
parents: 18
diff changeset
351
tobaru
parents: 18
diff changeset
352 return 0;
tobaru
parents: 18
diff changeset
353 }
tobaru
parents: 18
diff changeset
354 ```
tobaru
parents: 18
diff changeset
355
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
356 - loaduvm_impl がインターフェースから呼ばれる実装
19
tobaru
parents: 18
diff changeset
357
tobaru
parents: 18
diff changeset
358
tobaru
parents: 18
diff changeset
359 ``` c
tobaru
parents: 18
diff changeset
360 __code loaduvmvm_impl(struct vm_impl* vm, pde_t* pgdir, char* addr, struct inode* ip, uint offset, uint sz, __code next(...)) {
tobaru
parents: 18
diff changeset
361 Gearef(cbc_context, vm_impl)->pgdir = pgdir;
tobaru
parents: 18
diff changeset
362 Gearef(cbc_context, vm_impl)->addr = addr;
tobaru
parents: 18
diff changeset
363 Gearef(cbc_context, vm_impl)->ip = ip;
tobaru
parents: 18
diff changeset
364 Gearef(cbc_context, vm_impl)->offset = offset;
tobaru
parents: 18
diff changeset
365 Gearef(cbc_context, vm_impl)->sz = sz;
tobaru
parents: 18
diff changeset
366 Gearef(cbc_context, vm_impl)->next = next;
tobaru
parents: 18
diff changeset
367
tobaru
parents: 18
diff changeset
368 goto loaduvm_ptesize_checkvm_impl(vm, next(...));
tobaru
parents: 18
diff changeset
369 }
tobaru
parents: 18
diff changeset
370 ```
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
371 - loaduvm_impl から private な Code Gear が呼ばれる
19
tobaru
parents: 18
diff changeset
372
tobaru
parents: 18
diff changeset
373 ``` c
tobaru
parents: 18
diff changeset
374 #interface "vm_impl.h"
tobaru
parents: 18
diff changeset
375
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
376 __code loaduvm_ptesize_checkvm_impl(struct vm_impl* vm_impl, __code next(...)) {
19
tobaru
parents: 18
diff changeset
377 char* addr = vm_impl->addr;
tobaru
parents: 18
diff changeset
378
tobaru
parents: 18
diff changeset
379 if ((uint) addr %PTE_SZ != 0) {
tobaru
parents: 18
diff changeset
380 // goto panic
tobaru
parents: 18
diff changeset
381 }
tobaru
parents: 18
diff changeset
382
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
383 goto loaduvm_loopvm_impl(vm_impl, next(...));
19
tobaru
parents: 18
diff changeset
384 }
tobaru
parents: 18
diff changeset
385 ```
tobaru
parents: 18
diff changeset
386
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
387
19
tobaru
parents: 18
diff changeset
388 - vm.cではここから for だが CbC は if文の中と外にgoto を用意して実装する
tobaru
parents: 18
diff changeset
389
tobaru
parents: 18
diff changeset
390 ![](https://i.imgur.com/ByA7GVJ.png)
tobaru
parents: 18
diff changeset
391
tobaru
parents: 18
diff changeset
392 ```c
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
393 __code loaduvm_loopvm_impl(struct vm_impl* vm_impl, __code next(...)) {
19
tobaru
parents: 18
diff changeset
394 uint i = vm_impl->i;
tobaru
parents: 18
diff changeset
395 uint sz = vm_impl->sz;
tobaru
parents: 18
diff changeset
396
tobaru
parents: 18
diff changeset
397 if (i < sz) {
tobaru
parents: 18
diff changeset
398 goto loaduvm_check_pgdir(vm_impl, next(ret, ...));
tobaru
parents: 18
diff changeset
399 }
tobaru
parents: 18
diff changeset
400
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
401 goto loaduvm_exit(vm_impl, next(...));
19
tobaru
parents: 18
diff changeset
402 }
tobaru
parents: 18
diff changeset
403
tobaru
parents: 18
diff changeset
404
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
405 __code loaduvm_check_pgdir(struct vm_impl* vm_impl, __code next(...)) {
19
tobaru
parents: 18
diff changeset
406 pte_t* pte = vm_impl->pte;
tobaru
parents: 18
diff changeset
407 pde_t* pgdir = vm_impl->pgdir;
tobaru
parents: 18
diff changeset
408 uint i = vm_impl->i;
tobaru
parents: 18
diff changeset
409 char* addr = vm_impl->addr;
tobaru
parents: 18
diff changeset
410 uint pa = vm_impl->pa;
tobaru
parents: 18
diff changeset
411
tobaru
parents: 18
diff changeset
412 if ((pte = walkpgdir(pgdir, addr + i, 0)) == 0) {
tobaru
parents: 18
diff changeset
413 // goto panic
tobaru
parents: 18
diff changeset
414 }
tobaru
parents: 18
diff changeset
415 pa = PTE_ADDR(*pte);
tobaru
parents: 18
diff changeset
416
tobaru
parents: 18
diff changeset
417 vm_impl->pte = pte;
tobaru
parents: 18
diff changeset
418 vm_impl->pgdir = pgdir;
tobaru
parents: 18
diff changeset
419 vm_impl->addr = addr;
tobaru
parents: 18
diff changeset
420 vm_impl->pa = pa;
tobaru
parents: 18
diff changeset
421
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
422 goto loaduvm_check_PTE_SZ(vm_impl, next(...));
19
tobaru
parents: 18
diff changeset
423 }
tobaru
parents: 18
diff changeset
424
tobaru
parents: 18
diff changeset
425 __code loaduvm_check_PTE_SZ(struct vm_impl* vm_impl, __code next(int ret, ...)) {
tobaru
parents: 18
diff changeset
426 if (sz - i < PTE_SZ) {
tobaru
parents: 18
diff changeset
427 n = sz - i;
tobaru
parents: 18
diff changeset
428 } else {
tobaru
parents: 18
diff changeset
429 n = PTE_SZ;
tobaru
parents: 18
diff changeset
430 }
tobaru
parents: 18
diff changeset
431
tobaru
parents: 18
diff changeset
432 if (readi(ip, p2v(pa), offset + i, n) != n) {
tobaru
parents: 18
diff changeset
433 ret = -1;
tobaru
parents: 18
diff changeset
434 goto next(ret, ...);
tobaru
parents: 18
diff changeset
435 }
tobaru
parents: 18
diff changeset
436
tobaru
parents: 18
diff changeset
437 vm_impl->n = n;
tobaru
parents: 18
diff changeset
438
tobaru
parents: 18
diff changeset
439 goto loaduvm_loopvm_impl(vm_impl, next(ret, ...));
tobaru
parents: 18
diff changeset
440 }
tobaru
parents: 18
diff changeset
441
tobaru
parents: 18
diff changeset
442 __code loaduvm_exit(struct vm_impl* vm_impl, __code next(int ret, ...)) {
tobaru
parents: 18
diff changeset
443 ret = 0;
tobaru
parents: 18
diff changeset
444 goto next(ret, ...);
tobaru
parents: 18
diff changeset
445 }
tobaru
parents: 18
diff changeset
446 ```
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
447
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
448 ---
18
afc36230cf4f slide chapter3,4
tobaru
parents:
diff changeset
449
19
tobaru
parents: 18
diff changeset
450 ``` c
tobaru
parents: 18
diff changeset
451
tobaru
parents: 18
diff changeset
452 int loaduvm (pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)
tobaru
parents: 18
diff changeset
453 {
tobaru
parents: 18
diff changeset
454 uint i, pa, n;
tobaru
parents: 18
diff changeset
455 pte_t *pte;
tobaru
parents: 18
diff changeset
456
tobaru
parents: 18
diff changeset
457 if ((uint) addr % PTE_SZ != 0) {
tobaru
parents: 18
diff changeset
458 panic("loaduvm: addr must be page aligned");
tobaru
parents: 18
diff changeset
459 }
tobaru
parents: 18
diff changeset
460
tobaru
parents: 18
diff changeset
461 for (i = 0; i < sz; i += PTE_SZ) {
tobaru
parents: 18
diff changeset
462 if ((pte = walkpgdir(pgdir, addr + i, 0)) == 0) {
tobaru
parents: 18
diff changeset
463 panic("loaduvm: address should exist");
tobaru
parents: 18
diff changeset
464 }
tobaru
parents: 18
diff changeset
465
tobaru
parents: 18
diff changeset
466 pa = PTE_ADDR(*pte);
tobaru
parents: 18
diff changeset
467
tobaru
parents: 18
diff changeset
468 if (sz - i < PTE_SZ) {
tobaru
parents: 18
diff changeset
469 n = sz - i;
tobaru
parents: 18
diff changeset
470 } else {
tobaru
parents: 18
diff changeset
471 n = PTE_SZ;
tobaru
parents: 18
diff changeset
472 }
tobaru
parents: 18
diff changeset
473
tobaru
parents: 18
diff changeset
474 if (readi(ip, p2v(pa), offset + i, n) != n) {
tobaru
parents: 18
diff changeset
475 return -1;
tobaru
parents: 18
diff changeset
476 }
tobaru
parents: 18
diff changeset
477 }
tobaru
parents: 18
diff changeset
478
tobaru
parents: 18
diff changeset
479 return 0;
tobaru
parents: 18
diff changeset
480 }
tobaru
parents: 18
diff changeset
481 ```
tobaru
parents: 18
diff changeset
482
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
483 ---
19
tobaru
parents: 18
diff changeset
484
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
485 # stub
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
486 - goto meta はstub を呼び込んでいる
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
487 - 説明
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
488
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
489 ---
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
490
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
491 # C を CbC に部分的に書き直す手法
19
tobaru
parents: 18
diff changeset
492 - CbC の場合 goto による 遷移を行うので、関数呼び出しのように goto 以降のコードを実行できない
tobaru
parents: 18
diff changeset
493 - 例) goto すると戻ってこれないため それ以降が実行されなくなる。
tobaru
parents: 18
diff changeset
494
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
495 ---
19
tobaru
parents: 18
diff changeset
496
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
497 # CbC から C への遷移
19
tobaru
parents: 18
diff changeset
498 - 最初の命令は next で戻ってこれるので、dummy の関数を用意してそこで実行する
tobaru
parents: 18
diff changeset
499
tobaru
parents: 18
diff changeset
500 ``` c
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
501 void cbc_init_vmm_dummy(struct Context* cbc_context, struct proc* p, pde_t* pgdir, char* init, uint sz)
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
502 {
19
tobaru
parents: 18
diff changeset
503 // inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
tobaru
parents: 18
diff changeset
504
tobaru
parents: 18
diff changeset
505 struct vm* vm = createvm_impl(cbc_context);
tobaru
parents: 18
diff changeset
506 // goto vm->init_vmm(vm, pgdir, init, sz , vm->void_ret);
tobaru
parents: 18
diff changeset
507 Gearef(cbc_context, vm)->vm = (union Data*) vm;
tobaru
parents: 18
diff changeset
508 Gearef(cbc_context, vm)->pgdir = pgdir;
tobaru
parents: 18
diff changeset
509 Gearef(cbc_context, vm)->init = init;
tobaru
parents: 18
diff changeset
510 Gearef(cbc_context, vm)->sz = sz ;
tobaru
parents: 18
diff changeset
511 Gearef(cbc_context, vm)->next = C_vm_void_ret ;
tobaru
parents: 18
diff changeset
512 goto meta(cbc_context, vm->init_inituvm);
tobaru
parents: 18
diff changeset
513 }
tobaru
parents: 18
diff changeset
514
tobaru
parents: 18
diff changeset
515 void userinit(void)
tobaru
parents: 18
diff changeset
516 {
tobaru
parents: 18
diff changeset
517 struct proc* p;
tobaru
parents: 18
diff changeset
518 extern char _binary_initcode_start[], _binary_initcode_size[];
tobaru
parents: 18
diff changeset
519
tobaru
parents: 18
diff changeset
520 p = allocproc();
tobaru
parents: 18
diff changeset
521 initContext(&p->cbc_context);
tobaru
parents: 18
diff changeset
522
tobaru
parents: 18
diff changeset
523 initproc = p;
tobaru
parents: 18
diff changeset
524
tobaru
parents: 18
diff changeset
525 if((p->pgdir = kpt_alloc()) == NULL) {
tobaru
parents: 18
diff changeset
526 panic("userinit: out of memory?");
tobaru
parents: 18
diff changeset
527 }
tobaru
parents: 18
diff changeset
528
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
529 cbc_init_vmm_dummy(&p->cbc_context, p, p->pgdir, _binary_initcode_start, (int)_binary_initcode_size);
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
530
21
tobaru
parents: 19
diff changeset
531 ```
19
tobaru
parents: 18
diff changeset
532
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
533 ---
21
tobaru
parents: 19
diff changeset
534
31
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
535 # まとめ
69ac4230c3f2 fix slide
tobaru
parents: 23
diff changeset
536