If we have the code like this:
class A {
private hash = 0;
public void test(){
if (hash == 1) {
//dosomething
}
}
}
Where exactly the compare performed ?
Here's my understanding:
- Load hash into thread's stack, named r1.
- compare r1 with literal 1.
Is it right ? In the meaning time, the hash in the heap could be changed ?