001 /* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013 package org.jikesrvm.compilers.opt.specialization; 014 015 import org.jikesrvm.classloader.NormalMethod; 016 import org.jikesrvm.compilers.common.CompiledMethod; 017 018 interface SpecializationContext { 019 020 /** 021 * Find or create a specialized version of source for this 022 * context. Do NOT compile it immediately. However, DO 023 * allocate an spmd if needed 024 */ 025 SpecializedMethod findOrCreateSpecializedVersion(NormalMethod source); 026 027 /** 028 * Generate code for a specialized version of source in this 029 * context. 030 */ 031 CompiledMethod specialCompile(NormalMethod source); 032 }