source: dev/BasicCompiler32/Compile_Var.cpp@ 26

Last change on this file since 26 was 20, checked in by dai_9181, 18 years ago

参照型パラメータに関数の戻り値オブジェクトを指定した場合などの、一時オブジェクトの扱いを可能にした。
Dimで指定される初期値を見分けることで、As指定を省略できるようにした。

File size: 31.5 KB
Line 
1#include "../BasicCompiler_Common/common.h"
2#include "Opcode.h"
3
4//変数
5VARIABLE *GlobalVar;
6int MaxGlobalVarNum;
7int AllGlobalVarSize;
8int AllInitGlobalVarSize;
9VARIABLE *LocalVar;
10int MaxLocalVarNum;
11int AllLocalVarSize;
12
13void SetRelativeOffset(int *pType,LONG_PTR lpIndex,RELATIVE_VAR *pRelativeVar,char *lpPtrOffset){
14 int i2;
15
16 PushLongVariable(pRelativeVar);
17
18 i2=NumOpe(lpPtrOffset,0,0,0);
19 ChangeTypeToLong(i2);
20
21 //pop ebx
22 op_pop(REG_EBX);
23
24 if(PTR_LEVEL(*pType)){
25 *pType=MAKE_PTR_TYPE(NATURAL_TYPE(*pType),PTR_LEVEL(*pType)-1);
26 if((*pType)==DEF_OBJECT){
27 //imul ebx,objsize
28 OpBuffer[obp++]=(char)0x69;
29 OpBuffer[obp++]=(char)0xDB;
30 *((long *)(OpBuffer+obp))=GetSizeOfClassMember((CClass *)lpIndex,NULL,NULL);
31 obp+=sizeof(long);
32 }
33 else{
34 i2=GetTypeSize(*pType,-1);
35 if(i2>=2){
36 //imul ebx,i2
37 OpBuffer[obp++]=(char)0x6B;
38 OpBuffer[obp++]=(char)0xDB;
39 OpBuffer[obp++]=(char)i2;
40 }
41 }
42 }
43 else{
44 //エラー
45 SetError(1,NULL,cp);
46 return;
47 }
48
49 //pop ecx
50 op_pop(REG_ECX);
51
52 //add ecx,ebx
53 OpBuffer[obp++]=(char)0x03;
54 OpBuffer[obp++]=(char)0xCB;
55}
56BOOL GetArrayOffset(int *SubScripts,char *array,int type,LONG_PTR lpIndex){
57 extern HANDLE hHeap;
58 int i,i2,i3,i4,TypeSize;
59 char temporary[VN_SIZE],*pParm[MAX_PARMS];
60
61 for(i=0,i2=0,i3=0;;i++,i2++){
62 if(array[i]=='('){
63 i4=GetStringInPare(temporary+i2,array+i);
64 i+=i4-1;
65 i2+=i4-1;
66 continue;
67 }
68 if(array[i]=='['){
69 i4=GetStringInBracket(temporary+i2,array+i);
70 i+=i4-1;
71 i2+=i4-1;
72 continue;
73 }
74 if(array[i]==','||array[i]=='\0'){
75 if(SubScripts[i3]==-1){
76 for(i3--;i3>=0;i3--) HeapDefaultFree(pParm[i3]);
77 return 0;
78 }
79
80 temporary[i2]=0;
81
82 pParm[i3]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
83 lstrcpy(pParm[i3],temporary);
84
85 i3++;
86
87 if(array[i]=='\0'){
88 if(SubScripts[i3]!=-1){
89 for(i3--;i3>=0;i3--) HeapDefaultFree(pParm[i3]);
90 return 0;
91 }
92 break;
93 }
94
95 i2=-1;
96 continue;
97 }
98 temporary[i2]=array[i];
99 }
100
101 //push ecx
102 op_push(REG_ECX);
103
104 //push 0
105 op_push_value(0);
106
107 for(i=i3-1;i>=0;i--){
108 TYPEINFO TypeInfo;
109 BOOL bUseHeap;
110 TypeInfo.type=NumOpe(pParm[i],DEF_LONG,-1,&TypeInfo.u.lpIndex,&bUseHeap);
111 if(TypeInfo.type==DEF_OBJECT){
112 //キャスト演算子のオーバーロードに対応する
113 CallCastOperatorProc(
114 TypeInfo.type,TypeInfo.u.lpIndex,
115 bUseHeap,DEF_LONG,-1);
116 TypeInfo.type=DEF_LONG;
117 }
118 ChangeTypeToLong(TypeInfo.type);
119
120 //pop eax
121 op_pop(REG_EAX);
122
123 for(i2=i+1,i4=1;i2<i3;i2++) i4*=SubScripts[i2]+1;
124
125 //imul eax,i4
126 OpBuffer[obp++]=(char)0x69;
127 OpBuffer[obp++]=(char)0xC0;
128 *((long *)(OpBuffer+obp))=i4;
129 obp+=sizeof(long);
130
131 //add dword ptr[esp],eax
132 OpBuffer[obp++]=(char)0x01;
133 OpBuffer[obp++]=(char)0x04;
134 OpBuffer[obp++]=(char)0x24;
135
136 HeapDefaultFree(pParm[i]);
137 }
138
139 //pop eax
140 op_pop(REG_EAX);
141
142 TypeSize=GetTypeSize(type,lpIndex);
143
144 //imul eax,TypeSize
145 OpBuffer[obp++]=(char)0x69;
146 OpBuffer[obp++]=(char)0xC0;
147 *((long *)(OpBuffer+obp))=TypeSize;
148 obp+=sizeof(long);
149
150 //pop ecx
151 op_pop(REG_ECX);
152
153 //add ecx,eax
154 OpBuffer[obp++]=(char)0x03;
155 OpBuffer[obp++]=(char)0xC8;
156
157 return 1;
158}
159BOOL GetMemberOffset(bool isErrorEnabled, bool isWriteAccess, CClass *pobj_c, char *member, int *pType, RELATIVE_VAR *pRelativeVar, LONG_PTR *plpNestIndex, BOOL bPrivateAccess){
160 int i,offset;
161
162 //クラス、配列の構成要素を解析する
163 char VarName[VN_SIZE]; //変数名
164 char array[VN_SIZE]; //第1次配列
165 char lpPtrOffset[VN_SIZE]; //第2次配列
166 char NestMember[VN_SIZE]; //入れ子メンバ
167 int RefType; //"."参照のときは0、"->"参照のときは1
168 lstrcpy(VarName,member);
169 if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember,&RefType)) return 0;
170
171 ////////////////////////////
172 // メンバオフセットを取得
173 ////////////////////////////
174
175 offset=GetSizeOfClassMember(pobj_c,VarName,&i);
176 if(i==pobj_c->iMemberNum){
177 if(isErrorEnabled) SetError(103,VarName,cp);
178 return 0;
179 }
180
181 //アクセシビリティをチェック
182 if(pobj_c==pobj_CompilingClass){
183 //同一クラスオブジェクトの場合はプライベートアクセスを容認する
184 if(pobj_c->ppobj_Member[i]->dwAccess==ACCESS_NON){
185 if(isErrorEnabled) SetError(107,VarName,cp);
186 return 0;
187 }
188 }
189 else{
190 if((bPrivateAccess==0&&pobj_c->ppobj_Member[i]->dwAccess==ACCESS_PRIVATE)||
191 pobj_c->ppobj_Member[i]->dwAccess==ACCESS_NON){
192 if(isErrorEnabled) SetError(107,VarName,cp);
193 return 0;
194 }
195 else if(bPrivateAccess==0&&pobj_c->ppobj_Member[i]->dwAccess==ACCESS_PROTECTED){
196 if(isErrorEnabled) SetError(108,VarName,cp);
197 return 0;
198 }
199 }
200
201 //Const定義の場合は書き込みアクセスを制限する
202 //※コンストラクタをコンパイル中の場合は例外的に許可する
203 if( pobj_c->ppobj_Member[i]->IsConst() && //定数メンバである
204 isWriteAccess && //書き込みアクセスを要求されている
205 pobj_c->IsCompilingConstructor() == false //コンストラクタ コンパイル中を除く
206 ){
207 //Const定義の変数に書き込みアクセスをしようとした場合
208 SetError(61,VarName,cp);
209 }
210
211 *pType=pobj_c->ppobj_Member[i]->TypeInfo.type;
212 *plpNestIndex=pobj_c->ppobj_Member[i]->TypeInfo.u.lpIndex;
213
214 //ポインタ変数の場合
215 if(IsPtrType(*pType)){
216 if(pobj_c->ppobj_Member[i]->SubScripts[0]==-1){
217 lstrcpy(lpPtrOffset,array);
218 array[0]=0;
219 }
220 }
221 else{
222 if(lpPtrOffset[0]){
223 if(isErrorEnabled) SetError(16,member,cp);
224 return 0;
225 }
226 }
227
228 if(offset){
229 //add ecx,offset
230 OpBuffer[obp++]=(char)0x81;
231 OpBuffer[obp++]=(char)0xC1;
232 *((long *)(OpBuffer+obp))=offset;
233 obp+=sizeof(long);
234 }
235
236 if(array[0]){
237 //配列オフセット
238 if(!GetArrayOffset(pobj_c->ppobj_Member[i]->SubScripts,array,*pType,pobj_c->ppobj_Member[i]->TypeInfo.u.lpIndex))
239 if(isErrorEnabled) SetError(14,member,cp);
240 }
241 else if(pobj_c->ppobj_Member[i]->SubScripts[0]!=-1){
242 *pType|=FLAG_PTR;
243 }
244
245 if(NestMember[0]){
246 //入れ子構造の場合
247
248 if(*pType==DEF_OBJECT){
249 if(RefType!=DEF_OBJECT){
250 if(isErrorEnabled) SetError(104,member,cp);
251 return 0;
252 }
253 }
254 else if(*pType==DEF_PTR_OBJECT){
255 //構造体ポインタ型メンバ変数
256
257 if(lpPtrOffset[0]){
258 //pObj[n].member
259 if(RefType!=DEF_OBJECT){
260 if(isErrorEnabled) SetError(104,member,cp);
261 return 0;
262 }
263
264 //直接参照に切り替え
265 SetRelativeOffset(pType,*plpNestIndex,pRelativeVar,lpPtrOffset);
266 pRelativeVar->dwKind=VAR_DIRECTMEM;
267
268 lpPtrOffset[0]=0;
269 }
270 else{
271 //pObj->member
272 if(RefType!=DEF_PTR_OBJECT){
273 if(isErrorEnabled) SetError(104,member,cp);
274 return 0;
275 }
276
277 if(pRelativeVar->dwKind==VAR_DIRECTMEM){
278 //mov ecx,dword ptr[ecx]
279 OpBuffer[obp++]=(char)0x8B;
280 OpBuffer[obp++]=(char)0x09;
281 }
282 else{
283 //直接参照に切り替え
284 SetVarPtrToEax(pRelativeVar);
285 pRelativeVar->dwKind=VAR_DIRECTMEM;
286
287 //mov ecx,dword ptr[eax]
288 OpBuffer[obp++]=(char)0x8B;
289 OpBuffer[obp++]=(char)0x08;
290 }
291 }
292 }
293 else if(*pType==MAKE_PTR_TYPE(DEF_OBJECT,2)){
294 //構造体ポインタのポインタ型メンバ変数
295
296 if(lpPtrOffset[0]){
297 //ppObj[n]->member
298 if(RefType!=DEF_PTR_OBJECT){
299 if(isErrorEnabled) SetError(104,member,cp);
300 return 0;
301 }
302
303 //直接参照に切り替え
304 SetRelativeOffset(pType,*plpNestIndex,pRelativeVar,lpPtrOffset);
305 pRelativeVar->dwKind=VAR_DIRECTMEM;
306
307 lpPtrOffset[0]=0;
308
309 //mov ecx,dword ptr[ecx]
310 OpBuffer[obp++]=(char)0x8B;
311 OpBuffer[obp++]=(char)0x09;
312 }
313 else{
314 if(isErrorEnabled) SetError(104,member,cp);
315 return 0;
316 }
317 }
318
319 if(!GetMemberOffset(
320 isErrorEnabled,
321 isWriteAccess,
322 pobj_c->ppobj_Member[i]->TypeInfo.u.pobj_Class,
323 NestMember,
324 pType,
325 pRelativeVar,
326 plpNestIndex,
327 0)) return 0;
328 }
329
330 if(lpPtrOffset[0]){
331 SetRelativeOffset(pType,*plpNestIndex,pRelativeVar,lpPtrOffset);
332 pRelativeVar->dwKind=VAR_DIRECTMEM;
333 }
334
335 return 1;
336}
337void GetWithName(char *buffer){
338 extern WITHINFO WithInfo;
339 int i;
340
341 buffer[0]=0;
342 for(i=0;i<WithInfo.num;i++)
343 lstrcat(buffer,WithInfo.ppName[i]);
344}
345
346int LocalVar_ThisPtrOffset;
347void SetThisPtrToReg(int reg){
348 //自身のオブジェクトのThisポインタをregにコピー
349
350 extern VARIABLE *LocalVar;
351 RELATIVE_VAR RelativeVar;
352 RelativeVar.dwKind=VAR_LOCAL;
353 RelativeVar.bOffsetOffset=0;
354 RelativeVar.offset=-LocalVar_ThisPtrOffset;
355
356 SetReg_WholeVariable(DEF_PTR_VOID,&RelativeVar,reg);
357}
358
359BOOL GetVarOffset(bool isErrorEnabled, bool isWriteAccess, char *NameBuffer, int *pType, RELATIVE_VAR *pRelativeVar, LONG_PTR *plpIndex, int *pss){
360 extern BOOL bCompilingGlobal;
361 int i,RefType;
362 char variable[VN_SIZE],member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];
363
364 if(NameBuffer[0]=='.'){
365 GetWithName(variable);
366 lstrcat(variable,NameBuffer);
367 }
368 else lstrcpy(variable,NameBuffer);
369
370 lstrcpy(VarName,variable);
371 GetVarFormatString(VarName,array,lpPtrOffset,member,&RefType);
372
373 LONG_PTR lpIndex;
374 int *pSubScripts;
375 bool bConst;
376
377 if(bCompilingGlobal==0){
378 ////////////////////
379 // ローカル変数
380 ////////////////////
381
382 for(i=MaxLocalVarNum-1;i>=0;i--){ //レキシカルスコープを考慮してバックサーチ
383 if(LocalVar[i].bLiving){
384 if(lstrcmp(VarName,LocalVar[i].name)==0) break;
385 }
386 }
387 if(i>=0){
388 //ポインタ変数の場合
389 if(IsPtrType(LocalVar[i].type)){
390 if(LocalVar[i].SubScripts[0]==-1){
391 lstrcpy(lpPtrOffset,array);
392 array[0]=0;
393 }
394 }
395 else{
396 if(lpPtrOffset[0]){
397 SetError(16,variable,cp);
398 pRelativeVar->dwKind=NON_VAR;
399 return 0;
400 }
401 }
402
403 pRelativeVar->offset=-LocalVar[i].offset;
404 pRelativeVar->bOffsetOffset=0;
405 if(LocalVar[i].fRef) pRelativeVar->dwKind=VAR_REFLOCAL;
406 else pRelativeVar->dwKind=VAR_LOCAL;
407 *pType=LocalVar[i].type;
408 lpIndex=LocalVar[i].u.index;
409 if(plpIndex) *plpIndex=lpIndex;
410 pSubScripts=LocalVar[i].SubScripts;
411 bConst = LocalVar[i].bConst;
412
413 goto ok;
414 }
415 }
416
417 if(pobj_CompilingClass){
418 //////////////////////
419 // クラスメンバの参照
420 //////////////////////
421
422 if(lstrcmpi(variable,"This")==0){
423 //Thisオブジェクト
424
425 //Thisポインタをecxにコピー
426 SetThisPtrToReg(REG_ECX);
427
428 *pType=DEF_OBJECT;
429 pRelativeVar->dwKind=VAR_DIRECTMEM;
430
431 if(plpIndex) *plpIndex=(LONG_PTR)pobj_CompilingClass;
432 return 1;
433 }
434
435 if(_memicmp(variable,"This.",5)==0){
436 //Thisオブジェクトのメンバを参照するとき
437 SlideString(variable+5,-5);
438 lstrcpy(VarName,variable);
439 }
440 else{
441 //クラス内メンバを参照するとき(通常)
442
443 for(i=0;i<pobj_CompilingClass->iMemberNum;i++){
444 if(lstrcmp(VarName,pobj_CompilingClass->ppobj_Member[i]->name)==0) break;
445 }
446 if(i==pobj_CompilingClass->iMemberNum) goto NonClassMember;
447 }
448
449 //Const修飾子のメソッド内でメンバ書き込みアクセスが発生したとき
450 //(コンストラクタ、デストラクタ内を除く)
451 CMethod *pMethod = pobj_DBClass->GetNowCompilingMethodInfo();
452 if( isWriteAccess &&
453 pMethod->isConst &&
454 pobj_CompilingClass->IsCompilingConstructor() == false &&
455 pobj_CompilingClass->IsCompilingDestructor() == false
456 ){
457 SetError(131, NULL, cp );
458 }
459
460 /////////////////////////////
461 // thisポインタをecxにセット
462
463 //Thisポインタをecxにコピー
464 SetThisPtrToReg(REG_ECX);
465
466 pRelativeVar->dwKind=VAR_DIRECTMEM;
467 if(!GetMemberOffset(
468 isErrorEnabled,
469 isWriteAccess,
470 pobj_CompilingClass,
471 variable,
472 pType,
473 pRelativeVar,
474 &lpIndex,1)) return 0;
475 if(plpIndex) *plpIndex=lpIndex;
476 return 1;
477 }
478
479NonClassMember:
480
481 //////////////////////////
482 // 静的ローカル変数
483 // ※"Static.Object.Method.Variable"
484 //////////////////////////
485
486 char temporary[VN_SIZE];
487 extern SUBINFO *pCompilingSubInfo;
488 if(pCompilingSubInfo){
489 GetNowStaticVarFullName(VarName,temporary);
490
491 for(i=0;i<MaxGlobalVarNum;i++){
492 if(lstrcmp(temporary,GlobalVar[i].name)==0) break;
493 }
494 if(i!=MaxGlobalVarNum){
495 goto GlobalOk;
496 }
497 }
498
499
500 ////////////////////
501 // グローバル変数
502 ////////////////////
503
504 for(i=MaxGlobalVarNum-1;i>=0;i--){ //レキシカルスコープを考慮してバックサーチ
505 if(GlobalVar[i].bLiving){
506 if(lstrcmp(VarName,GlobalVar[i].name)==0) break;
507 }
508 }
509 if(i>=0){
510 goto GlobalOk;
511 }
512
513
514 //////////////////////////
515 // クラスの静的メンバ
516 //////////////////////////
517
518 if(member[0]){
519 lstrcpy(temporary,member);
520 GetVarFormatString(temporary,array,lpPtrOffset,member,&i);
521
522 char temp2[VN_SIZE];
523 sprintf(temp2,"%s.%s",VarName,temporary);
524 for(i=0;i<MaxGlobalVarNum;i++){
525 if(lstrcmp(temp2,GlobalVar[i].name)==0) break;
526 }
527
528 if(i!=MaxGlobalVarNum){
529 goto GlobalOk;
530 }
531 }
532
533 if(pobj_CompilingClass){
534 //自身のクラスから静的メンバを参照する場合
535 char temp2[VN_SIZE];
536 sprintf(temp2,"%s.%s",pobj_CompilingClass->name,VarName);
537 for(i=0;i<MaxGlobalVarNum;i++){
538 if(lstrcmp(temp2,GlobalVar[i].name)==0) break;
539 }
540
541 if(i!=MaxGlobalVarNum){
542 goto GlobalOk;
543 }
544 }
545
546 if(isErrorEnabled) SetError(3,variable,cp);
547 pRelativeVar->dwKind=NON_VAR;
548 return 0;
549
550
551GlobalOk:
552
553 //ポインタ変数の場合
554 if(IsPtrType(GlobalVar[i].type)){
555 if(GlobalVar[i].SubScripts[0]==-1){
556 lstrcpy(lpPtrOffset,array);
557 array[0]=0;
558 }
559 }
560 else{
561 if(lpPtrOffset[0]){
562 SetError(16,variable,cp);
563 pRelativeVar->dwKind=NON_VAR;
564 return 0;
565 }
566 }
567
568 pRelativeVar->offset=GlobalVar[i].offset;
569 pRelativeVar->bOffsetOffset=0;
570 pRelativeVar->dwKind=VAR_GLOBAL;
571 *pType=GlobalVar[i].type;
572 lpIndex=GlobalVar[i].u.index;
573 if(plpIndex) *plpIndex=lpIndex;
574 pSubScripts=GlobalVar[i].SubScripts;
575 bConst = GlobalVar[i].bConst;
576
577
578ok:
579
580 if( bConst && isWriteAccess ){
581 //Const定義の変数に書き込みアクセスをしようとした場合
582 if( *pType == DEF_OBJECT ){
583 //オブジェクト定数
584 SetError(130, VarName, cp );
585 }
586 else{
587 //一般のConst変数
588 SetError(61,VarName,cp);
589 }
590 }
591
592 if(array[0]==0&&pSubScripts[0]!=-1){
593 //配列の先頭ポインタを示す場合
594 *pType|=FLAG_PTR;
595 if(pss) memcpy(pss,pSubScripts,MAX_ARRAYDIM);
596 return 1;
597 }
598
599 if(array[0]||member[0]){
600 //xor ecx,ecx(ecxを0に初期化する)
601 //※ecxは変数ベースアドレスからの相対オフセットを示す
602 op_zero_reg(REG_ECX);
603
604 pRelativeVar->bOffsetOffset=1;
605 }
606 if(array[0]){
607 if(!GetArrayOffset(pSubScripts,array,*pType,lpIndex)){
608 SetError(14,variable,cp);
609 pRelativeVar->dwKind=NON_VAR;
610 return 0;
611 }
612 }
613 if(member[0]){
614 if(*pType==DEF_OBJECT){
615 //実態オブジェクトのメンバを参照(obj.member)
616 if(RefType!=DEF_OBJECT){
617 SetError(104,VarName,cp);
618 pRelativeVar->dwKind=NON_VAR;
619 return 0;
620 }
621 }
622 else if(*pType==DEF_PTR_OBJECT){
623 //ポインタオブジェクトが示すメンバを参照
624 if(lpPtrOffset[0]){
625 //pObj[n].member
626 if(RefType!=DEF_OBJECT){
627 SetError(104,VarName,cp);
628 pRelativeVar->dwKind=NON_VAR;
629 return 0;
630 }
631 SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset);
632 pRelativeVar->dwKind=VAR_DIRECTMEM;
633 }
634 else{
635 //pObj->member
636 if(RefType!=DEF_PTR_OBJECT){
637 SetError(104,VarName,cp);
638 pRelativeVar->dwKind=NON_VAR;
639 return 0;
640 }
641
642 SetVarPtrToEax(pRelativeVar);
643 pRelativeVar->dwKind=VAR_DIRECTMEM;
644
645 //mov ecx,dword ptr[eax]
646 OpBuffer[obp++]=(char)0x8B;
647 OpBuffer[obp++]=(char)0x08;
648 }
649 }
650 else if(*pType==MAKE_PTR_TYPE(DEF_OBJECT,2)){
651 //ポインタオブジェクトが示すメンバを参照
652 if(lpPtrOffset[0]){
653 //ppObj[n]->member
654 if(RefType!=DEF_PTR_OBJECT){
655 SetError(104,VarName,cp);
656 pRelativeVar->dwKind=NON_VAR;
657 return 0;
658 }
659
660 SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset);
661 pRelativeVar->dwKind=VAR_DIRECTMEM;
662
663
664 SetVarPtrToEax(pRelativeVar);
665
666 //mov ecx,dword ptr[eax]
667 OpBuffer[obp++]=(char)0x8B;
668 OpBuffer[obp++]=(char)0x08;
669 }
670 else{
671 SetError(104,VarName,cp);
672 pRelativeVar->dwKind=NON_VAR;
673 return 0;
674 }
675 }
676 else{
677 SetError(102,VarName,cp);
678 pRelativeVar->dwKind=NON_VAR;
679 return 0;
680 }
681
682 LONG_PTR lp2;
683 if(!GetMemberOffset(
684 isErrorEnabled,
685 isWriteAccess,
686 (CClass *)lpIndex,
687 member,pType,pRelativeVar,&lp2,0)) return 0;
688 if(plpIndex) *plpIndex=lp2;
689
690 return 1;
691 }
692
693 if(lpPtrOffset[0]){
694 SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset);
695 pRelativeVar->dwKind=VAR_DIRECTMEM;
696 }
697
698 return 1;
699}
700
701BOOL SetInitGlobalData(int offset,int type,LONG_PTR lpIndex,int *SubScripts,char *InitBuf){
702 extern BYTE *initGlobalBuf;
703 int i,i2,i3,TypeSize;
704 char temporary[VN_SIZE];
705
706 if(InitBuf[0]=='['){
707 SlideString(InitBuf+1,-1);
708 InitBuf[lstrlen(InitBuf)-1]=0;
709
710 TypeSize=GetTypeSize(type,lpIndex);
711
712 if(SubScripts[0]!=-1){
713 TypeSize*=JumpSubScripts(SubScripts+1);
714 i=0;
715 i2=0;
716 while(1){
717 if(SubScripts[0]<i2){
718 SetError(41,0,cp);
719 return 0;
720 }
721 i=GetOneParameter(InitBuf,i,temporary);
722 if(!SetInitGlobalData(
723 offset+i2*TypeSize,
724 type,
725 lpIndex,
726 SubScripts+1,
727 temporary)) return 0;
728 i2++;
729 if(InitBuf[i]=='\0') break;
730 }
731 return -1;
732 }
733
734 if(type==DEF_OBJECT){
735 CClass *pobj_c;
736 pobj_c=(CClass *)lpIndex;
737
738 for(i=0,i2=0;i2<pobj_c->iMemberNum;i2++){
739 i=GetOneParameter(InitBuf,i,temporary);
740
741 i3=GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);
742
743 if(!SetInitGlobalData(offset+i3,
744 pobj_c->ppobj_Member[i2]->TypeInfo.type,
745 pobj_c->ppobj_Member[i2]->TypeInfo.u.lpIndex,
746 pobj_c->ppobj_Member[i2]->SubScripts,
747 temporary)) return 0;
748
749 if(InitBuf[i]=='\0') break;
750 }
751 if(i2+1!=pobj_c->iMemberNum){
752 SetError(41,0,cp);
753 return 0;
754 }
755 return 1;
756 }
757
758 SetError(41,0,cp);
759 return 0;
760 }
761
762
763 ///////////////////////////////////////
764 // 単発式([]で囲まれていない)
765 ///////////////////////////////////////
766
767 if( type == DEF_OBJECT){
768 //オブジェクトの場合はありえない
769 SetError(300,NULL,cp);
770 return 0;
771 }
772
773 if(SubScripts[0]!=-1){
774 SetError(41,0,cp);
775 return 0;
776 }
777
778 double dbl;
779 _int64 i64data;
780 int CalcType;
781 LONG_PTR lpCalcIndex;
782 CalcType=StaticCalculation(true, InitBuf,type,&i64data,&lpCalcIndex);
783 if(IsRealNumberType(CalcType)){
784 memcpy(&dbl,&i64data,sizeof(double));
785 i64data=(_int64)dbl;
786 }
787 else dbl=(double)i64data;
788
789 //型チェック
790 CheckDifferentType(
791 type,
792 lpIndex,
793 CalcType,
794 lpCalcIndex,
795 0,0);
796
797 if(type==DEF_DOUBLE)
798 *(double *)(initGlobalBuf+offset)=(double)dbl;
799 else if(type==DEF_SINGLE)
800 *(float *)(initGlobalBuf+offset)=(float)dbl;
801 else if(type==DEF_INT64||type==DEF_QWORD)
802 *(_int64 *)(initGlobalBuf+offset)=i64data;
803 else if(type==DEF_LONG||type==DEF_DWORD||IsPtrType(type)){
804 if(type==DEF_PTR_BYTE&&lpCalcIndex==LITERAL_STRING){
805 //文字列定数のとき
806
807 char *temp;
808 temp=(char *)i64data;
809 i2=AddDataTable(temp,lstrlen(temp));
810 HeapDefaultFree(temp);
811
812 //mov eax,DataPos
813 OpBuffer[obp++]=(char)0xB8;
814 *((long *)(OpBuffer+obp))=(long)i2;
815 pobj_DataTableSchedule->add();
816 obp+=sizeof(long);
817
818 //mov dword ptr[offset],eax
819 OpBuffer[obp++]=(char)0xA3;
820 *((long *)(OpBuffer+obp))=offset;
821 pobj_GlobalVarSchedule->add();
822 obp+=sizeof(long);
823 }
824 else{
825 *(DWORD *)(initGlobalBuf+offset)=(DWORD)i64data;
826 }
827 }
828 else if(type==DEF_INTEGER||type==DEF_WORD)
829 *(WORD *)(initGlobalBuf+offset)=(WORD)i64data;
830 else if(type==DEF_CHAR||type==DEF_BYTE)
831 *(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data;
832 //String型が未完成
833 return 1;
834}
835BOOL InitLocalVar(int offset,int type,LONG_PTR lpIndex,int *SubScripts,char *InitBuf){
836 int i,i2,i3,TypeSize;
837 char temporary[VN_SIZE];
838
839 if(InitBuf[0]=='['){
840 SlideString(InitBuf+1,-1);
841 InitBuf[lstrlen(InitBuf)-1]=0;
842
843 TypeSize=GetTypeSize(type,lpIndex);
844
845 if(SubScripts[0]!=-1){
846 TypeSize*=JumpSubScripts(SubScripts+1);
847 i=0;
848 i2=0;
849 while(1){
850 if(SubScripts[0]<i2){
851 SetError(41,0,cp);
852 return 0;
853 }
854 i=GetOneParameter(InitBuf,i,temporary);
855 if(!InitLocalVar(
856 offset+i2*TypeSize,
857 type,
858 lpIndex,
859 SubScripts+1,
860 temporary)) return 0;
861 i2++;
862 if(InitBuf[i]=='\0') break;
863 }
864 return -1;
865 }
866
867 if(type==DEF_OBJECT){
868 CClass *pobj_c;
869 pobj_c=(CClass *)lpIndex;
870
871 for(i=0,i2=0;i2<pobj_c->iMemberNum;i2++){
872 i=GetOneParameter(InitBuf,i,temporary);
873
874 i3=GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);
875
876 if(!InitLocalVar(offset+i3,
877 pobj_c->ppobj_Member[i2]->TypeInfo.type,
878 pobj_c->ppobj_Member[i2]->TypeInfo.u.lpIndex,
879 pobj_c->ppobj_Member[i2]->SubScripts,
880 temporary)) return 0;
881
882 if(InitBuf[i]=='\0') break;
883 }
884 if(i2+1!=pobj_c->iMemberNum){
885 SetError(41,0,cp);
886 return 0;
887 }
888 return 1;
889 }
890
891 SetError(41,0,cp);
892 return 0;
893 }
894
895
896 ///////////////////////////////////////
897 // 単発式([]で囲まれていない)
898 ///////////////////////////////////////
899
900 if( type == DEF_OBJECT){
901 //オブジェクトの場合はありえない
902 SetError(300,NULL,cp);
903 return 0;
904 }
905
906 if(SubScripts[0]!=-1){
907 SetError(41,0,cp);
908 return 0;
909 }
910
911 double dbl;
912 _int64 i64data;
913 int CalcType;
914 LONG_PTR lpCalcIndex;
915 CalcType=StaticCalculation(false, InitBuf,type,&i64data,&lpCalcIndex);
916 if(!CalcType){
917 //動的データだった場合
918 return 0;
919 }
920 if(IsRealNumberType(CalcType)){
921 memcpy(&dbl,&i64data,sizeof(double));
922 i64data=(_int64)dbl;
923 }
924 else dbl=(double)i64data;
925
926 //型チェック
927 CheckDifferentType(
928 type,
929 lpIndex,
930 CalcType,
931 lpCalcIndex,
932 0,0);
933
934 if(type==DEF_DOUBLE){
935 //mov eax,HILONG(dbl)
936 OpBuffer[obp++]=(char)0xB8;
937 *((long *)(OpBuffer+obp))=(long)*(long *)(((char *)(&dbl))+4);
938 obp+=sizeof(long);
939
940 //mov dword ptr[ebp+offset+sizeof(long)],eax
941 OpBuffer[obp++]=(char)0x89;
942 OpBuffer[obp++]=(char)0x85;
943 *((long *)(OpBuffer+obp))=offset+sizeof(long);
944 AddLocalVarAddrSchedule();
945 obp+=sizeof(long);
946
947 //mov eax,LOLONG(dbl)
948 OpBuffer[obp++]=(char)0xB8;
949 *((long *)(OpBuffer+obp))=*(long *)(&dbl);
950 obp+=sizeof(long);
951
952 //mov dword ptr[ebp+offset],eax
953 OpBuffer[obp++]=(char)0x89;
954 OpBuffer[obp++]=(char)0x85;
955 *((long *)(OpBuffer+obp))=offset;
956 AddLocalVarAddrSchedule();
957 obp+=sizeof(long);
958 }
959 else if(type==DEF_SINGLE){
960 float flt;
961 flt=(float)dbl;
962 //mov eax,InitValue
963 OpBuffer[obp++]=(char)0xB8;
964 *((long *)(OpBuffer+obp))=*(long *)&flt;
965 obp+=sizeof(long);
966
967 //mov dword ptr[ebp+offset],eax
968 OpBuffer[obp++]=(char)0x89;
969 OpBuffer[obp++]=(char)0x85;
970 *((long *)(OpBuffer+obp))=offset;
971 AddLocalVarAddrSchedule();
972 obp+=sizeof(long);
973 }
974 else if(type==DEF_INT64||type==DEF_QWORD){
975 //mov eax,HILONG(i64data)
976 OpBuffer[obp++]=(char)0xB8;
977 *((long *)(OpBuffer+obp))=(long)*(long *)(((char *)(&i64data))+4);
978 obp+=sizeof(long);
979
980 //mov dword ptr[ebp+offset+sizeof(long)],eax
981 OpBuffer[obp++]=(char)0x89;
982 OpBuffer[obp++]=(char)0x85;
983 *((long *)(OpBuffer+obp))=offset+sizeof(long);
984 AddLocalVarAddrSchedule();
985 obp+=sizeof(long);
986
987 //mov eax,LOLONG(i64data)
988 OpBuffer[obp++]=(char)0xB8;
989 *((long *)(OpBuffer+obp))=*(long *)(&i64data);
990 obp+=sizeof(long);
991
992 //mov dword ptr[ebp+offset],eax
993 OpBuffer[obp++]=(char)0x89;
994 OpBuffer[obp++]=(char)0x85;
995 *((long *)(OpBuffer+obp))=offset;
996 AddLocalVarAddrSchedule();
997 obp+=sizeof(long);
998 }
999 else if(type==DEF_LONG||type==DEF_DWORD||IsPtrType(type)){
1000 if(type==DEF_PTR_BYTE&&lpCalcIndex==LITERAL_STRING){
1001 //文字列定数のとき
1002
1003 char *temp;
1004 temp=(char *)i64data;
1005 i2=AddDataTable(temp,lstrlen(temp));
1006 HeapDefaultFree(temp);
1007
1008 //mov eax,DataPos
1009 OpBuffer[obp++]=(char)0xB8;
1010 *((long *)(OpBuffer+obp))=(long)i2;
1011 pobj_DataTableSchedule->add();
1012 obp+=sizeof(long);
1013 }
1014 else{
1015 //mov eax,InitValue
1016 OpBuffer[obp++]=(char)0xB8;
1017 *((long *)(OpBuffer+obp))=(long)i64data;
1018 obp+=sizeof(long);
1019 }
1020
1021 //mov dword ptr[ebp+offset],eax
1022 OpBuffer[obp++]=(char)0x89;
1023 OpBuffer[obp++]=(char)0x85;
1024 *((long *)(OpBuffer+obp))=offset;
1025 AddLocalVarAddrSchedule();
1026 obp+=sizeof(long);
1027 }
1028 else if(type==DEF_INTEGER||type==DEF_WORD){
1029 //mov ax,InitValue
1030 OpBuffer[obp++]=(char)0x66;
1031 OpBuffer[obp++]=(char)0xB8;
1032 *((WORD *)(OpBuffer+obp))=(WORD)i64data;
1033 obp+=sizeof(WORD);
1034
1035 //mov word ptr[ebp+offset],ax
1036 OpBuffer[obp++]=(char)0x66;
1037 OpBuffer[obp++]=(char)0x89;
1038 OpBuffer[obp++]=(char)0x85;
1039 *((long *)(OpBuffer+obp))=offset;
1040 AddLocalVarAddrSchedule();
1041 obp+=sizeof(long);
1042 }
1043 else if(type==DEF_CHAR||type==DEF_BYTE){
1044 //mov byte ptr[ebp+offset],InitValue
1045 OpBuffer[obp++]=(char)0xC6;
1046 OpBuffer[obp++]=(char)0x85;
1047 *((long *)(OpBuffer+obp))=offset;
1048 AddLocalVarAddrSchedule();
1049 obp+=sizeof(long);
1050 *((BYTE *)(OpBuffer+obp))=(BYTE)i64data;
1051 obp+=sizeof(BYTE);
1052 }
1053 //String型が未完成
1054 return 1;
1055}
1056
1057void dim(char *Parameter,DWORD dwFlag){
1058 extern BOOL bCompilingGlobal;
1059 extern HANDLE hHeap;
1060 int i2,i3,VarSize;
1061 char VarName[VN_SIZE];
1062
1063
1064 if(dwFlag & DIMFLAG_CONST){
1065 //////////////////////////////////
1066 // 定数変数の場合を考慮
1067 //////////////////////////////////
1068 for(i2=0;;i2++){
1069 if(Parameter[i2] == '=' ||
1070 Parameter[i2] == 1 && Parameter[i2] == ESC_AS ||
1071 Parameter[i2] =='('){
1072 VarName[i2] = 0;
1073 break;
1074 }
1075 VarName[i2] = Parameter[i2];
1076 }
1077
1078 //定数と2重定義されていないる場合は抜け出す
1079 if(CDBConst::obj.GetType(VarName)){
1080 return;
1081 }
1082
1083 //定数マクロとして定義されている場合は抜け出す
1084 if(GetConstHash(VarName)){
1085 return;
1086 }
1087 }
1088
1089
1090 //構文を解析
1091 int SubScripts[MAX_ARRAYDIM];
1092 TYPEINFO TypeInfo;
1093 char InitBuf[8192];
1094 char ConstractParameter[VN_SIZE];
1095 if(!GetDimentionFormat(Parameter,VarName,SubScripts,&TypeInfo,InitBuf,ConstractParameter))
1096 return;
1097
1098
1099 //定数と2重定義されていないかを調べる
1100 if(CDBConst::obj.GetType(VarName)){
1101 SetError(15,VarName,cp);
1102 return;
1103 }
1104
1105 //定数マクロとして定義されている場合
1106 if(GetConstHash(VarName)){
1107 SetError(15,VarName,cp);
1108 return;
1109 }
1110
1111
1112 //タイプサイズを取得
1113 int TypeSize;
1114 TypeSize=GetTypeSize(TypeInfo.type,TypeInfo.u.lpIndex);
1115
1116 if(dwFlag&DIMFLAG_STATIC){
1117 if(bCompilingGlobal){
1118 SetError(60,NULL,cp);
1119 return;
1120 }
1121
1122 /////////////////////
1123 // Static変数
1124 // ※"Static.Object.Method.Variable"
1125 /////////////////////
1126
1127 char temporary[VN_SIZE];
1128 GetNowStaticVarFullName(VarName,temporary);
1129
1130 AddGlobalVariable(temporary,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlag);
1131
1132 /*
1133 Note: 静的変数のコンストラクタ呼び出しは
1134 _System_InitStaticLocalVariables関数内で一括して行う
1135 */
1136 }
1137 else{
1138 if(bCompilingGlobal){
1139 /////////////////////////
1140 // グローバル変数
1141 /////////////////////////
1142
1143 AddGlobalVariable(VarName,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlag);
1144 }
1145 else{
1146 /////////////////
1147 // ローカル変数
1148 /////////////////
1149
1150 for(i2=0;i2<MaxLocalVarNum;i2++){
1151 if(LocalVar[i2].bLiving&&obj_LexScopes.GetNowLevel()==LocalVar[i2].ScopeLevel){
1152 if(lstrcmp(LocalVar[i2].name,VarName)==0){
1153 //2重定義のエラー
1154 SetError(15,VarName,cp);
1155 return;
1156 }
1157 }
1158 }
1159
1160 LocalVar=(VARIABLE *)HeapReAlloc(hHeap,0,LocalVar,(MaxLocalVarNum+1)*sizeof(VARIABLE));
1161
1162 for(i2=1,i3=0;i3<255;i3++){
1163 //配列要素数
1164 LocalVar[MaxLocalVarNum].SubScripts[i3]=SubScripts[i3];
1165
1166 if(SubScripts[i3]==-1) break;
1167 i2*=SubScripts[i3]+1;
1168 }
1169 VarSize=TypeSize*i2;
1170 if(VarSize%4) VarSize+=4-(VarSize%4);
1171
1172 VARIABLE *pVar = &LocalVar[MaxLocalVarNum];
1173
1174 MaxLocalVarNum++;
1175
1176 //変数データを追加
1177 lstrcpy(pVar->name,VarName);
1178 pVar->fRef=0;
1179 if(dwFlag & DIMFLAG_CONST) pVar->bConst = true;
1180 else pVar->bConst = false;
1181 if(SubScripts[0]==-1) pVar->bArray=0;
1182 else pVar->bArray=1;
1183 pVar->type=TypeInfo.type;
1184 pVar->u.index=TypeInfo.u.lpIndex;
1185 AllLocalVarSize+=VarSize;
1186 pVar->offset=AllLocalVarSize;
1187
1188 //レキシカルスコープ
1189 pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
1190 pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
1191 pVar->bLiving=TRUE;
1192
1193 if(InitBuf[0]){
1194 //初期代入時のみ、書き込みアクセスを許可する
1195 bool bConstBack = pVar->bConst;
1196 pVar->bConst = false;
1197
1198 int result = InitLocalVar(-pVar->offset,
1199 pVar->type,
1200 pVar->u.index,
1201 pVar->SubScripts,
1202 InitBuf);
1203
1204 if(!result){
1205 //動的な式だった場合は代入演算を行う
1206 char temporary[8192];
1207 sprintf(temporary,"%s=%s",VarName,InitBuf);
1208 OpcodeCalc(temporary);
1209 }
1210
1211 pVar->bConst = bConstBack;
1212 }
1213 else{
1214 //push 0
1215 op_push_value(0);
1216
1217 //push VarSize
1218 op_push_value(VarSize);
1219
1220 //mov eax,ebp
1221 OpBuffer[obp++]=(char)0x8B;
1222 OpBuffer[obp++]=(char)0xC5;
1223
1224 //add eax,offset
1225 OpBuffer[obp++]=(char)0x05;
1226 *((long *)(OpBuffer+obp))=-pVar->offset;
1227 AddLocalVarAddrSchedule();
1228 obp+=sizeof(long);
1229
1230 //push eax
1231 op_push(REG_EAX);
1232
1233 //call FillMemory
1234 OpBuffer[obp++]=(char)0xFF;
1235 OpBuffer[obp++]=(char)0x15;
1236 DECLAREINFO *pdi;
1237 pdi=GetDeclareHash("FillMemory");
1238 pdi->bUse=1;
1239 pobj_ImportAddrSchedule->add(pdi);
1240 obp+=sizeof(long);
1241 }
1242 }
1243
1244 //コンストラクタ呼び出し
1245 if(TypeInfo.type==DEF_OBJECT&&(dwFlag&DIMFLAG_NONCALL_CONSTRACTOR)==0){
1246 CallConstractor(VarName,SubScripts,TypeInfo,ConstractParameter);
1247 }
1248 }
1249
1250 if(TypeInfo.type==DEF_OBJECT){
1251 if(TypeInfo.u.pobj_Class->IsHoldAbstractFunction()){
1252 //抽象クラスだったとき
1253 SetError(125,TypeInfo.u.pobj_Class->name,cp);
1254 }
1255 }
1256}
1257void OpcodeDim(char *Parameter,DWORD dwFlag){
1258 int i,i2,i3,IsStr=0;
1259 char temporary[8192];
1260
1261 for(i=0,i2=0;;i++,i2++){
1262 if(Parameter[i]=='\"') IsStr^=1;
1263 if(Parameter[i]=='('&&IsStr==0){
1264 i3=GetStringInPare(temporary+i2,Parameter+i);
1265 i+=i3-1;
1266 i2+=i3-1;
1267 continue;
1268 }
1269 if(Parameter[i]=='['&&IsStr==0){
1270 i3=GetStringInBracket(temporary+i2,Parameter+i);
1271 i+=i3-1;
1272 i2+=i3-1;
1273 continue;
1274 }
1275 if((Parameter[i]==','&&IsStr==0)||
1276 Parameter[i]=='\0'){
1277 temporary[i2]=0;
1278
1279 dim(temporary,dwFlag);
1280
1281 if(Parameter[i]=='\0') break;
1282 i2=-1;
1283 continue;
1284 }
1285 temporary[i2]=Parameter[i];
1286 }
1287}
1288
1289void SetVarPtrToEax(RELATIVE_VAR *pRelativeVar){
1290 if(pRelativeVar->dwKind==VAR_GLOBAL){
1291 if(pRelativeVar->bOffsetOffset){
1292 //lea eax,dword ptr[ecx+offset]
1293 OpBuffer[obp++]=(char)0x8D;
1294 OpBuffer[obp++]=(char)0x81;
1295 *((long *)(OpBuffer+obp))=pRelativeVar->offset;
1296 pobj_GlobalVarSchedule->add();
1297 obp+=sizeof(long);
1298 }
1299 else{
1300 //mov eax,offset
1301 OpBuffer[obp++]=(char)0xB8;
1302 *((long *)(OpBuffer+obp))=pRelativeVar->offset;
1303 pobj_GlobalVarSchedule->add();
1304 obp+=sizeof(long);
1305 }
1306 }
1307 else if(pRelativeVar->dwKind==VAR_LOCAL){
1308 if(pRelativeVar->bOffsetOffset){
1309 //add ecx,offset
1310 OpBuffer[obp++]=(char)0x81;
1311 OpBuffer[obp++]=(char)0xC1;
1312 *((long *)(OpBuffer+obp))=pRelativeVar->offset;
1313 AddLocalVarAddrSchedule();
1314 obp+=sizeof(long);
1315
1316 //lea eax,dword ptr[ebp+ecx]
1317 OpBuffer[obp++]=(char)0x8D;
1318 OpBuffer[obp++]=(char)0x44;
1319 OpBuffer[obp++]=(char)0x0D;
1320 OpBuffer[obp++]=(char)0x00;
1321 }
1322 else{
1323 //lea eax,dword ptr[ebp+offset]
1324 OpBuffer[obp++]=(char)0x8D;
1325 OpBuffer[obp++]=(char)0x85;
1326 *((long *)(OpBuffer+obp))=pRelativeVar->offset;
1327 AddLocalVarAddrSchedule();
1328 obp+=sizeof(long);
1329 }
1330 }
1331 else if(pRelativeVar->dwKind==VAR_REFLOCAL){
1332 if(pRelativeVar->bOffsetOffset){
1333 //mov eax,ecx
1334 OpBuffer[obp++]=(char)0x8B;
1335 OpBuffer[obp++]=(char)0xC1;
1336
1337 //add eax,dword ptr[ebp+offset]
1338 OpBuffer[obp++]=(char)0x03;
1339 OpBuffer[obp++]=(char)0x85;
1340 *((long *)(OpBuffer+obp))=pRelativeVar->offset;
1341 AddLocalVarAddrSchedule();
1342 obp+=sizeof(long);
1343 }
1344 else{
1345 //mov eax,dword ptr[ebp+offset]
1346 OpBuffer[obp++]=(char)0x8B;
1347 OpBuffer[obp++]=(char)0x85;
1348 *((long *)(OpBuffer+obp))=pRelativeVar->offset;
1349 AddLocalVarAddrSchedule();
1350 obp+=sizeof(long);
1351 }
1352 }
1353 else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
1354 //mov eax,ecx
1355 OpBuffer[obp++]=(char)0x8B;
1356 OpBuffer[obp++]=(char)0xC1;
1357 }
1358}
Note: See TracBrowser for help on using the repository browser.