Source Code Cross Referenced for BastoreCommand.java in  » Development » jdec » net » sf » jdec » jvminstructions » commands » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » jdec » net.sf.jdec.jvminstructions.commands 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sf.jdec.jvminstructions.commands;
002:
003:        import net.sf.jdec.core.DecompilerHelper;
004:        import net.sf.jdec.core.GlobalVariableStore;
005:        import net.sf.jdec.core.JvmOpCodes;
006:        import net.sf.jdec.core.Operand;
007:        import net.sf.jdec.core.OperandStack;
008:        import net.sf.jdec.reflection.Behaviour;
009:        import net.sf.jdec.util.Util;
010:
011:        public class BastoreCommand extends AbstractInstructionCommand {
012:
013:            public BastoreCommand(Behaviour context) {
014:                super (context);
015:
016:            }
017:
018:            public int getSkipBytes() {
019:                return 0;
020:            }
021:
022:            public void execute() {
023:                Behaviour behaviour = getContext();
024:                int currentForIndex = getCurrentInstPosInCode();
025:                byte[] info = behaviour.getCode();
026:                OperandStack opStack = behaviour.getOpStack();
027:                Operand op = null;
028:                Operand op1 = null;
029:                Operand op2 = null;
030:                StringBuffer addtype = new StringBuffer();
031:                boolean specialIASTORE = GlobalVariableStore.isSpecialIASTORE();
032:                int arraytimespush = GlobalVariableStore.getArraytimespush();
033:
034:                boolean primitiveastore = GlobalVariableStore
035:                        .isPrimitiveastore();
036:                boolean b = DecompilerHelper.checkForArrayPostIncrement(
037:                        currentForIndex, opStack, behaviour.getCode(),
038:                        "category1", addtype);
039:                boolean bl2 = DecompilerHelper
040:                        .checkForArrayMultiAssignablePostIncrement(
041:                                currentForIndex, opStack, behaviour.getCode(),
042:                                "category1");
043:                if (b && opStack.size() > 0
044:                        && GlobalVariableStore.getArraytimesstack().size() == 0) {
045:                    op = (Operand) opStack.pop();
046:                    op1 = (Operand) opStack.pop();
047:                    op2 = (Operand) opStack.pop();
048:
049:                    java.lang.String temp = "";
050:                    if (addtype.toString().equals("add"))
051:                        temp += op2.getOperandValue() + "["
052:                                + op1.getOperandValue() + "]" + "++";
053:                    else
054:                        temp += op2.getOperandValue() + "["
055:                                + op1.getOperandValue() + "]" + "--";
056:                    Operand o = opStack.peekTopOfStack();
057:                    o.setOperandValue(temp);
058:
059:                } else if (bl2 && opStack.size() > 0
060:                        && GlobalVariableStore.getArraytimesstack().size() == 0) {
061:                    op = (Operand) opStack.pop();
062:                    op1 = (Operand) opStack.pop();
063:                    op2 = (Operand) opStack.pop();
064:
065:                    java.lang.String temp = "";
066:                    temp += op2.getOperandValue() + "[" + op1.getOperandValue()
067:                            + "]" + "=";
068:                    Operand o = opStack.peekTopOfStack();
069:                    temp = temp + o.getOperandValue();
070:                    o.setOperandValue(temp);
071:                }
072:
073:                else {
074:                    if (GlobalVariableStore.getSkipPrimitiveArrayStores()
075:                            .contains(new Integer(currentForIndex)) == false) {
076:                        java.lang.String tempString = "";
077:                        op = (Operand) opStack.pop();
078:                        op1 = (Operand) opStack.pop();
079:                        if (opStack.size() > 0) {
080:                            op2 = (Operand) opStack.pop();
081:                            tempString = op2.getOperandValue() + "["
082:                                    + op1.getOperandValue() + "]="
083:                                    + op.getOperandValue() + ";\n";
084:                        }
085:                        if (GlobalVariableStore.getArraytimesstack().size() == 0) {
086:                            int curpos = currentForIndex;
087:                            if (curpos - 3 > 0
088:                                    && (info[curpos - 1] == JvmOpCodes.DUP_X2
089:                                            || info[curpos - 1] == JvmOpCodes.DUP
090:                                            || info[curpos - 1] == JvmOpCodes.DUP2
091:                                            || info[curpos - 1] == JvmOpCodes.DUP_X1
092:                                            || info[curpos - 1] == JvmOpCodes.DUP2_X1 || info[curpos - 1] == JvmOpCodes.DUP2_X2)
093:                                    && info[curpos - 2] == JvmOpCodes.I2B
094:                                    && info[curpos - 3] == JvmOpCodes.IADD) {
095:                                tempString = "++" + op2.getOperandValue() + "["
096:                                        + op1.getOperandValue() + "]";
097:                                java.lang.String v1 = op2.getOperandValue()
098:                                        + "[" + op1.getOperandValue() + "]";
099:                                java.lang.String v2 = opStack.peekTopOfStack()
100:                                        .getOperandValue();
101:                                if (v2.equals(v1)) {
102:                                    opStack.pop();
103:                                }
104:
105:                                opStack.push(createOperand(tempString));
106:                            } else if (curpos - 3 > 0
107:                                    && (info[curpos - 1] == JvmOpCodes.DUP_X2
108:                                            || info[curpos - 1] == JvmOpCodes.DUP
109:                                            || info[curpos - 1] == JvmOpCodes.DUP2
110:                                            || info[curpos - 1] == JvmOpCodes.DUP_X1
111:                                            || info[curpos - 1] == JvmOpCodes.DUP2_X1 || info[curpos - 1] == JvmOpCodes.DUP2_X2)
112:                                    && info[curpos - 2] == JvmOpCodes.I2B
113:                                    && info[curpos - 3] == JvmOpCodes.ISUB) {
114:                                tempString = "--" + op2.getOperandValue() + "["
115:                                        + op1.getOperandValue() + "]";
116:                                java.lang.String v1 = op2.getOperandValue()
117:                                        + "[" + op1.getOperandValue() + "]";
118:                                java.lang.String v2 = opStack.peekTopOfStack()
119:                                        .getOperandValue();
120:                                if (v2.equals(v1)) {
121:                                    opStack.pop();
122:                                }
123:                                opStack.push(createOperand(tempString));
124:                            } else if (curpos - 4 > 0
125:                                    && info[curpos - 1] == JvmOpCodes.I2B
126:                                    && info[curpos - 2] == JvmOpCodes.IADD
127:                                    && info[curpos - 3] == JvmOpCodes.ICONST_1
128:                                    && (info[curpos - 4] == JvmOpCodes.DUP_X2
129:                                            || info[curpos - 4] == JvmOpCodes.DUP
130:                                            || info[curpos - 4] == JvmOpCodes.DUP2
131:                                            || info[curpos - 4] == JvmOpCodes.DUP_X1
132:                                            || info[curpos - 4] == JvmOpCodes.DUP2_X1 || info[curpos - 4] == JvmOpCodes.DUP2_X2)) {
133:                                tempString = op2.getOperandValue() + "["
134:                                        + op1.getOperandValue() + "]++";
135:                                java.lang.String v1 = op2.getOperandValue()
136:                                        + "[" + op1.getOperandValue() + "]";
137:                                java.lang.String v2 = opStack.peekTopOfStack()
138:                                        .getOperandValue();
139:                                if (v2.equals(v1)) {
140:                                    opStack.pop();
141:                                }
142:                                opStack.push(createOperand(tempString));
143:                            } else if (curpos - 4 > 0
144:                                    && info[curpos - 1] == JvmOpCodes.I2B
145:                                    && info[curpos - 2] == JvmOpCodes.ISUB
146:                                    && info[curpos - 3] == JvmOpCodes.ICONST_1
147:                                    && (info[curpos - 4] == JvmOpCodes.DUP_X2
148:                                            || info[curpos - 4] == JvmOpCodes.DUP
149:                                            || info[curpos - 4] == JvmOpCodes.DUP2
150:                                            || info[curpos - 4] == JvmOpCodes.DUP_X1
151:                                            || info[curpos - 4] == JvmOpCodes.DUP2_X1 || info[curpos - 4] == JvmOpCodes.DUP2_X2)) {
152:                                tempString = op2.getOperandValue() + "["
153:                                        + op1.getOperandValue() + "]--";
154:                                java.lang.String v1 = op2.getOperandValue()
155:                                        + "[" + op1.getOperandValue() + "]";
156:                                java.lang.String v2 = opStack.peekTopOfStack()
157:                                        .getOperandValue();
158:                                if (v2.equals(v1)) {
159:                                    opStack.pop();
160:                                }
161:                                opStack.push(createOperand(tempString));
162:                            } else {
163:                                if (GlobalVariableStore
164:                                        .getSkipPrimitiveArrayStores()
165:                                        .contains(new Integer(currentForIndex)) == false) {
166:                                    behaviour
167:                                            .appendToBuffer(Util
168:                                                    .formatDecompiledStatement(tempString));
169:                                }
170:                            }
171:                        } else {
172:
173:                            primitiveastore = true;
174:                            java.lang.String newvalue = "";
175:                            arraytimespush = Integer
176:                                    .parseInt(GlobalVariableStore
177:                                            .getArraytimesstack().peek()
178:                                            .toString());
179:                            if (arraytimespush > 0) {
180:
181:                                int curpos = currentForIndex;
182:
183:                                if (curpos - 3 > 0
184:                                        && DecompilerHelper
185:                                                .isArrayElement(curpos + 1)
186:                                        && (info[curpos - 1] == JvmOpCodes.DUP_X2
187:                                                || info[curpos - 1] == JvmOpCodes.DUP
188:                                                || info[curpos - 1] == JvmOpCodes.DUP2
189:                                                || info[curpos - 1] == JvmOpCodes.DUP_X1
190:                                                || info[curpos - 1] == JvmOpCodes.DUP2_X1 || info[curpos - 1] == JvmOpCodes.DUP2_X2)
191:                                        && info[curpos - 2] == JvmOpCodes.I2B
192:                                        && info[curpos - 3] == JvmOpCodes.IADD) {
193:                                    if (!newfound())
194:                                        newvalue = "++" + op2.getOperandValue()
195:                                                + "[" + op1.getOperandValue()
196:                                                + "]";
197:                                    else {
198:                                        if (opStack.size() > 0) {
199:                                            java.lang.String topv = opStack
200:                                                    .getTopOfStack()
201:                                                    .getOperandValue();
202:                                            if (topv.trim().startsWith("++")) {
203:                                                newvalue = op2
204:                                                        .getOperandValue()
205:                                                        + topv;
206:                                            } else
207:                                                newvalue = "++"
208:                                                        + op2.getOperandValue()
209:                                                        + topv;
210:                                            if (topv.equals(opStack
211:                                                    .peekTopOfStack()
212:                                                    .getOperandValue())) {
213:                                                opStack.pop();
214:                                            }
215:                                        }
216:                                    }
217:
218:                                } else if (curpos - 3 > 0
219:                                        && DecompilerHelper
220:                                                .isArrayElement(curpos + 1)
221:                                        && (info[curpos - 1] == JvmOpCodes.DUP_X2
222:                                                || info[curpos - 1] == JvmOpCodes.DUP
223:                                                || info[curpos - 1] == JvmOpCodes.DUP2
224:                                                || info[curpos - 1] == JvmOpCodes.DUP_X1
225:                                                || info[curpos - 1] == JvmOpCodes.DUP2_X1 || info[curpos - 1] == JvmOpCodes.DUP2_X2)
226:                                        && info[curpos - 2] == JvmOpCodes.I2B
227:                                        && info[curpos - 3] == JvmOpCodes.ISUB) {
228:                                    if (!newfound())
229:                                        newvalue = "--" + op2.getOperandValue()
230:                                                + "[" + op1.getOperandValue()
231:                                                + "]";
232:                                    else {
233:                                        if (opStack.size() > 0) {
234:
235:                                            java.lang.String topv = opStack
236:                                                    .getTopOfStack()
237:                                                    .getOperandValue();
238:                                            if (topv.trim().startsWith("--")) {
239:                                                newvalue = op2
240:                                                        .getOperandValue()
241:                                                        + topv;
242:                                            } else
243:                                                newvalue = "--"
244:                                                        + op2.getOperandValue()
245:                                                        + topv;//
246:                                            if (topv.equals(opStack
247:                                                    .peekTopOfStack()
248:                                                    .getOperandValue())) {
249:                                                opStack.pop();
250:                                            }
251:
252:                                        }
253:                                    }
254:
255:                                } else if (curpos - 4 > 0
256:                                        && DecompilerHelper
257:                                                .isArrayElement(curpos + 1)
258:                                        && info[curpos - 1] == JvmOpCodes.I2B
259:                                        && info[curpos - 2] == JvmOpCodes.IADD
260:                                        && (info[curpos - 3] == JvmOpCodes.ICONST_1
261:                                                || info[curpos - 4] == JvmOpCodes.DUP_X2
262:                                                || info[curpos - 4] == JvmOpCodes.DUP
263:                                                || info[curpos - 4] == JvmOpCodes.DUP2
264:                                                || info[curpos - 4] == JvmOpCodes.DUP_X1
265:                                                || info[curpos - 4] == JvmOpCodes.DUP2_X1 || info[curpos - 4] == JvmOpCodes.DUP2_X2)) {
266:                                    if (!newfound())
267:                                        newvalue = op2.getOperandValue() + "["
268:                                                + op1.getOperandValue() + "]++";
269:                                    else {
270:                                        if (opStack.size() > 0) {
271:
272:                                            java.lang.String topv = opStack
273:                                                    .getTopOfStack()
274:                                                    .getOperandValue();
275:                                            newvalue = op2.getOperandValue()
276:                                                    + topv + "++";
277:                                            if (topv.equals(opStack
278:                                                    .peekTopOfStack()
279:                                                    .getOperandValue())) {
280:                                                opStack.pop();
281:                                            }
282:
283:                                        }
284:                                    }
285:
286:                                } else if (curpos - 4 > 0
287:                                        && DecompilerHelper
288:                                                .isArrayElement(curpos + 1)
289:                                        && info[curpos - 1] == JvmOpCodes.I2B
290:                                        && info[curpos - 2] == JvmOpCodes.ISUB
291:                                        && (info[curpos - 3] == JvmOpCodes.ICONST_1
292:                                                || info[curpos - 4] == JvmOpCodes.DUP_X2
293:                                                || info[curpos - 4] == JvmOpCodes.DUP
294:                                                || info[curpos - 4] == JvmOpCodes.DUP2
295:                                                || info[curpos - 4] == JvmOpCodes.DUP_X1
296:                                                || info[curpos - 4] == JvmOpCodes.DUP2_X1 || info[curpos - 4] == JvmOpCodes.DUP2_X2)) {
297:
298:                                    if (!newfound())
299:                                        newvalue = op2.getOperandValue() + "["
300:                                                + op1.getOperandValue() + "]--";
301:                                    else {
302:                                        if (opStack.size() > 0) {
303:
304:                                            java.lang.String topv = opStack
305:                                                    .getTopOfStack()
306:                                                    .getOperandValue();
307:                                            newvalue = op2.getOperandValue()
308:                                                    + topv + "--";
309:                                            if (topv.equals(opStack
310:                                                    .peekTopOfStack()
311:                                                    .getOperandValue())) {
312:                                                opStack.pop();
313:                                            }
314:                                        }
315:                                    }
316:
317:                                } else
318:                                    newvalue = "";
319:                                if (newvalue.length() > 0) {
320:                                    StringBuffer v = new StringBuffer("");
321:                                    int c = getGenericFinder()
322:                                            .isNextInstructionConversionInst(
323:                                                    currentForIndex + 1, v);
324:                                    if (c != -1
325:                                            && newvalue.indexOf(v.toString()) == -1) {
326:                                        newvalue = "(" + v.toString() + ")"
327:                                                + newvalue;
328:                                    }
329:                                }
330:
331:                                /////////////////
332:                                if (GlobalVariableStore
333:                                        .getSkipPrimitiveArrayStores()
334:                                        .contains(new Integer(currentForIndex)) == false) {
335:
336:                                    if (newfound()) {
337:                                        //z=createOperand(op.getOperandValue());
338:                                        //Operand y=opStack.getTopOfStack();
339:                                        java.lang.String newv = op2
340:                                                .getOperandValue()
341:                                                + op.getOperandValue();
342:                                        if (newvalue.length() > 0) {
343:                                            newv = newvalue;
344:                                            specialIASTORE = true;
345:                                        }
346:                                        arraytimespush = Integer
347:                                                .parseInt(GlobalVariableStore
348:                                                        .getArraytimesstack()
349:                                                        .pop().toString());
350:                                        arraytimespush--;
351:                                        if (arraytimespush == 0) {
352:                                            newv += "}";
353:                                        } else {
354:                                            GlobalVariableStore
355:                                                    .getArraytimesstack()
356:                                                    .push("" + arraytimespush);
357:                                            newv += ",";
358:                                        }
359:                                        opStack.push(createOperand(newv));
360:                                    } else {
361:                                        arraytimespush = Integer
362:                                                .parseInt(GlobalVariableStore
363:                                                        .getArraytimesstack()
364:                                                        .pop().toString());
365:                                        arraytimespush--;
366:                                        if (arraytimespush == 0) {
367:
368:                                            boolean closeImmediate = false; // for the parent actually
369:                                            if (GlobalVariableStore
370:                                                    .getArraytimesstack()
371:                                                    .size() > 0) {
372:                                                int oldstacksize = Integer
373:                                                        .parseInt(GlobalVariableStore
374:                                                                .getArraytimesstack()
375:                                                                .pop()
376:                                                                .toString());
377:                                                int newstacksize = oldstacksize - 1;
378:                                                if (newstacksize != 0)
379:                                                    GlobalVariableStore
380:                                                            .getArraytimesstack()
381:                                                            .push(
382:                                                                    ""
383:                                                                            + newstacksize);
384:                                                else
385:                                                    closeImmediate = true;
386:                                                //behaviour.appendToBuffer("}";
387:                                            }
388:
389:                                            if (GlobalVariableStore
390:                                                    .getArraytimesstack()
391:                                                    .isEmpty()) {
392:                                                if (newvalue.length() > 0) {
393:                                                    behaviour
394:                                                            .appendToBuffer(newvalue
395:                                                                    + "}");
396:                                                    int count = arrayClosingBracketCount(currentForIndex);
397:                                                    java.lang.String temp = "";
398:                                                    for (int z = 1; z <= count; z++) {
399:                                                        temp += "\n}";
400:                                                        if (z < count)
401:                                                            temp += "\n";
402:
403:                                                    }
404:                                                    //Util.forceNewLine=false;
405:                                                    Util.forceTrimLines = false;
406:                                                    behaviour
407:                                                            .appendToBuffer(Util
408:                                                                    .formatDecompiledStatement(temp)
409:                                                                    + ";\n");
410:                                                    Util.forceNewLine = true;
411:                                                    Util.forceTrimLines = true;
412:                                                    specialIASTORE = true;
413:                                                } else {
414:                                                    behaviour.appendToBuffer(op
415:                                                            .getOperandValue()
416:                                                            + "}");
417:                                                    int count = arrayClosingBracketCount(currentForIndex);
418:                                                    java.lang.String temp = "";
419:                                                    for (int z = 1; z <= count; z++) {
420:                                                        temp += "\n}";
421:                                                        if (z < count)
422:                                                            temp += "\n";
423:                                                    }
424:                                                    Util.forceStartSpace = false;
425:                                                    Util.forceNewLine = false;
426:                                                    Util.forceTrimLines = false;
427:                                                    behaviour
428:                                                            .appendToBuffer(Util
429:                                                                    .formatDecompiledStatement(temp)
430:                                                                    + ";\n");
431:                                                    Util.forceStartSpace = true;
432:                                                    Util.forceTrimLines = false;
433:                                                    Util.forceNewLine = true;
434:                                                }
435:                                            } else {
436:                                                if (newvalue.length() > 0) {
437:                                                    behaviour
438:                                                            .appendToBuffer(newvalue
439:                                                                    + "},");
440:                                                    specialIASTORE = true;
441:                                                } else {
442:                                                    behaviour.appendToBuffer(op
443:                                                            .getOperandValue()
444:                                                            + "},");
445:                                                }
446:                                                if (closeImmediate) {
447:                                                    do {
448:                                                        Util.forceStartSpace = false;
449:                                                        Util.forceNewLine = false;
450:                                                        Util.forceTrimLines = false;
451:                                                        if (GlobalVariableStore
452:                                                                .getArraytimesstack()
453:                                                                .size() > 0)
454:                                                            behaviour
455:                                                                    .appendToBuffer(Util
456:                                                                            .formatDecompiledStatement("\n},\n"));
457:                                                        else {
458:                                                            behaviour
459:                                                                    .appendToBuffer(Util
460:                                                                            .formatDecompiledStatement("\n};\n"));
461:                                                        }
462:                                                        Util.forceStartSpace = true;
463:                                                        Util.forceNewLine = true;
464:                                                        Util.forceTrimLines = true;
465:
466:                                                        if (GlobalVariableStore
467:                                                                .getArraytimesstack()
468:                                                                .size() > 0) {
469:                                                            int oldstacksize = Integer
470:                                                                    .parseInt(GlobalVariableStore
471:                                                                            .getArraytimesstack()
472:                                                                            .pop()
473:                                                                            .toString());
474:                                                            int newstacksize = oldstacksize - 1;
475:                                                            if (newstacksize != 0) {
476:                                                                GlobalVariableStore
477:                                                                        .getArraytimesstack()
478:                                                                        .push(
479:                                                                                ""
480:                                                                                        + newstacksize);
481:                                                                closeImmediate = false;
482:                                                            } else {
483:                                                                closeImmediate = true;
484:                                                            }
485:                                                        } else {
486:                                                            closeImmediate = false;
487:                                                        }
488:
489:                                                    } while (closeImmediate);
490:
491:                                                }
492:
493:                                            }
494:
495:                                        } else {
496:                                            GlobalVariableStore
497:                                                    .getArraytimesstack()
498:                                                    .push("" + arraytimespush);
499:                                            /*if(isThisInstrStart(starts,(currentForIndex-1)) && isInstructionAnyDUP(info[currentForIndex-1]) && newvalue!=null && newvalue.trim().length() > 0){
500:                                               if(newvalue!=null && (newvalue.trim().startsWith("++") || newvalue.trim().startsWith("--")) && opStack.size() > 0)  {
501:                                                   java.lang.String tpv=opStack.peekTopOfStack().getOperandValue().trim();
502:                                                   if("++".concat(tpv).equals(newvalue) || "--".concat(tpv).equals(newvalue)){
503:                                                       opStack.pop();
504:                                                   }
505:                                               }
506:                                                
507:                                                opStack.push(createOperand(newvalue));
508:                                            }*/
509:                                            //                                    else{
510:                                            if (newvalue.length() > 0) {
511:                                                behaviour
512:                                                        .appendToBuffer(newvalue
513:                                                                + ",");
514:                                                specialIASTORE = true;
515:                                            } else {
516:
517:                                                if (getStoreFinder()
518:                                                        .isInstPrimitiveArrayStore(
519:                                                                info[(currentForIndex + 1)])
520:                                                        && tempString != null
521:                                                        && tempString.length() > 0)
522:                                                    behaviour
523:                                                            .appendToBuffer(tempString);
524:                                                else
525:                                                    behaviour.appendToBuffer(op
526:                                                            .getOperandValue()
527:                                                            + ",");
528:                                            }
529:                                            //                                  }
530:                                        }
531:                                    }
532:                                }
533:                            }
534:                        }
535:                    } else {
536:
537:                        if (opStack.size() > 2 && !newfound()) {
538:                            opStack.pop();
539:                            opStack.pop();
540:                        }
541:
542:                    }
543:                    int nextinst = info[currentForIndex + 1];
544:                    if (getGenericFinder()
545:                            .isThisInstrStart(currentForIndex + 1)
546:                            && nextinst == JvmOpCodes.AASTORE) {
547:                        GlobalVariableStore.getSkipaastores().add(
548:                                new Integer(currentForIndex + 1));
549:                    }
550:
551:                }
552:                GlobalVariableStore.setArraytimespush(arraytimespush);
553:                GlobalVariableStore.setSpecialIASTORE(specialIASTORE);
554:                GlobalVariableStore.setPrimitiveastore(primitiveastore);
555:
556:            }
557:
558:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.