Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357656

Summary: Support the move statement
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Jeff Douglas <jeffdouglas>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jspadea, lasher
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Heitz CLA 2011-09-14 12:16:33 EDT
In EDT 0.7 we support four forms of the move statement:

move a to b;
move a to b for c;
move a to b for all;
move a to b byName;

Java support for the statement is being done under bug 353670.  When it's finished, the debugger will need to deal with the statement properly.  Of the four forms of the statement listed above, the first will probably result in one line of generated code, the second and third will be generated as loops, and the fourth will be generated as zero or more assignments.
Comment 1 Justin Spadea CLA 2011-09-22 10:32:32 EDT
Jeff - the only thing that needs to be done for this is a small change to the SMAP generation for "move a to b for c;" or "move a to b for all;"

Given:
arr1 int[] = [1,2,3];
arr2 int[] = new int[3];
move arr1 to arr2 for all;

The SMAP for the move statement is:
18#1:40

But the generated code is a FOR loop that's 4 lines of Java code. The SMAP should be:
18#1:40,4

Otherwise a stepInto on the statement must be done once for each iteration.
Comment 2 Jeff Douglas CLA 2011-09-22 10:52:44 EDT
smap numbering fix done
Comment 3 Justin Spadea CLA 2011-09-22 11:11:52 EDT
Verified