structural equivalence | content equivalence | semantic equivalence | name equivalence |
hot spot compilation | dynamic compilation | just in time compilation | virtual machine |
linker | loader | compiler | unrolling |
inlining | tail trimming | basic block | data block |
control block | dope vector | symbol table | relocation table |
dimensions table | jump table | hotspot table | re-ordering evaluation |
short circuit evaluation | lifting evaluation | hot read evaluation | runtime environment |
if (exp1 && exp2)is it safe to evaluate exp2 before exp1? Why or why not? If you say it is not safe, please give me a concrete C example that shows why it is unsafe.
for (i = 0; i < 10; i++) for (j = 0; j < 20; j++) for (k = 0; k < 30; k++) ... a[i][j][k]
typedef struct { double centimeters; double meters; } measure; typedef measure metric_measure; struct unitA { double centimeters; double meters; }; struct unitB { double meters; double centimeters; };Answer the following questions:
A.c | B.c |
---|---|
Imports: | Imports: |
Exports: | Exports: |
Relocatable Names: | Relocatable Names: |
Code:
int x; int y; int main() { z = add(x,y); print x, y, z; } |
Code:
int z; int add(int a, int b) { return a + b; } |
Data: | Data: |
Fill in the remainder of the table as follows:
If there are no names for a particular section, just leave that section blank.
while (i < 10) sum = sum + i * i; i = i + 1; while----------------------------- / \ \ < := ------------ null / \ / \ \ i 10 sum + := ------ / \ / \ \ sum * i + null / \ / \ i i i 1