@ExplodeLoop private void notifyAllocateOrReallocate(Object value, long oldSize, long newSizeEstimate) { CompilerAsserts.partialEvaluationConstant(this); if (!listenersNotChangedAssumption.isValid()) { CompilerDirectives.transferToInterpreterAndInvalidate(); } AllocationListener[] ls = this.listeners; if (ls != null) { AllocationEvent event = new AllocationEvent(language, value, oldSize, newSizeEstimate); for (AllocationListener l : ls) { l.onEnter(event); } } }
@ExplodeLoop private void notifyAllocated(Object value, long oldSize, long newSize) { CompilerAsserts.partialEvaluationConstant(this); if (!listenersNotChangedAssumption.isValid()) { CompilerDirectives.transferToInterpreterAndInvalidate(); } AllocationListener[] ls = this.listeners; if (ls != null) { AllocationEvent event = new AllocationEvent(language, value, oldSize, newSize); for (AllocationListener l : ls) { l.onReturnValue(event); } } }
@ExplodeLoop private void notifyAllocateOrReallocate(Object value, long oldSize, long newSizeEstimate) { if (valueCheck != null) { setValueCheck(value); } CompilerAsserts.partialEvaluationConstant(this); if (!listenersNotChangedAssumption.isValid()) { CompilerDirectives.transferToInterpreterAndInvalidate(); } AllocationListener[] ls = this.listeners; if (ls != null) { AllocationEvent event = new AllocationEvent(language, value, oldSize, newSizeEstimate); for (AllocationListener l : ls) { l.onEnter(event); } } }
@ExplodeLoop private void notifyAllocated(Object value, long oldSize, long newSize) { CompilerAsserts.partialEvaluationConstant(this); if (!listenersNotChangedAssumption.isValid()) { CompilerDirectives.transferToInterpreterAndInvalidate(); } AllocationListener[] ls = this.listeners; if (ls != null) { AllocationEvent event = new AllocationEvent(language, value, oldSize, newSize); for (AllocationListener l : ls) { l.onReturnValue(event); } } }