* object associated with this segment if the access is not within the bounds of the segment.
* @param address the address in the segment which should be written
* @param val the value to write to the location in the segment
*/
public void write(int address, byte val) {
MulticastWatch p;
// FAST PATH 1: no watches
if ( segment_watches == null ) {
checked_write(address, val);
return;
}
// FAST PATH 2: no watches for this address
p = segment_watches[address];
if ( p == null) {
checked_write(address, val);
return;
}
// SLOW PATH: consult with memory watches
p.fireBeforeWrite(interpreter.state, address, val);
checked_write(address, val);
p.fireAfterWrite(interpreter.state, address, val);
}