Generate load native context code.