372 } 373 374 protected boolean hasSenderPD() { 375 // FIXME 376 return true; 377 } 378 379 public long frameSize() { 380 return (getSenderSP().minus(getSP()) / VM.getVM().getAddressSize()); 381 } 382 383 public Address getLink() { 384 return getSenderSP().getAddressAt(0); 385 } 386 387 public Address getUnextendedSP() { return raw_unextendedSP; } 388 389 // Return address: 390 public Address getSenderPC() { return getSenderSP().getAddressAt(2 * VM.getVM().getAddressSize()); } 391 392 // return address of param, zero origin index. 393 // MPJ note: Appears to be unused. 394 public Address getNativeParamAddr(int idx) { 395 return null; 396 // return addressOfStackSlot(NATIVE_FRAME_INITIAL_PARAM_OFFSET + idx); 397 } 398 399 public Address getSenderSP() { return getFP(); } 400 public Address addressOfInterpreterFrameLocals() { 401 return addressOfStackSlot(INTERPRETER_FRAME_LOCALS_OFFSET); 402 } 403 404 private Address addressOfInterpreterFrameBCX() { 405 return addressOfStackSlot(INTERPRETER_FRAME_BCX_OFFSET); 406 } 407 408 public int getInterpreterFrameBCI() { 409 // FIXME: this is not atomic with respect to GC and is unsuitable 410 // for use in a non-debugging, or reflective, system. Need to 411 // figure out how to express this. 412 Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0); 413 Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0); 414 Method method = (Method)Metadata.instantiateWrapperFor(methodHandle); 415 return bcpToBci(bcp, method); 416 } 417 418 public Address addressOfInterpreterFrameMDX() { | 372 } 373 374 protected boolean hasSenderPD() { 375 // FIXME 376 return true; 377 } 378 379 public long frameSize() { 380 return (getSenderSP().minus(getSP()) / VM.getVM().getAddressSize()); 381 } 382 383 public Address getLink() { 384 return getSenderSP().getAddressAt(0); 385 } 386 387 public Address getUnextendedSP() { return raw_unextendedSP; } 388 389 // Return address: 390 public Address getSenderPC() { return getSenderSP().getAddressAt(2 * VM.getVM().getAddressSize()); } 391 392 public Address getSenderSP() { return getFP(); } 393 public Address addressOfInterpreterFrameLocals() { 394 return addressOfStackSlot(INTERPRETER_FRAME_LOCALS_OFFSET); 395 } 396 397 private Address addressOfInterpreterFrameBCX() { 398 return addressOfStackSlot(INTERPRETER_FRAME_BCX_OFFSET); 399 } 400 401 public int getInterpreterFrameBCI() { 402 // FIXME: this is not atomic with respect to GC and is unsuitable 403 // for use in a non-debugging, or reflective, system. Need to 404 // figure out how to express this. 405 Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0); 406 Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0); 407 Method method = (Method)Metadata.instantiateWrapperFor(methodHandle); 408 return bcpToBci(bcp, method); 409 } 410 411 public Address addressOfInterpreterFrameMDX() { |