Mercurial > hg > Members > kono > jpf-core
comparison src/main/gov/nasa/jpf/vm/FunctionObjectFactory.java @ 28:7be90179bb3b
Provided support for double colon operator used for lamabda expressions. Fixed a bug related to generating names for funcation object classes (by supporting double colon operator, a new stragety needed to generate unique names for function objects. To achive that the bootstrap ids are incorporated into names). Finally modified the method that retrieves the SAM from functional interfaces.
author | nastaran <nastaran.shafiei@gmail.com> |
---|---|
date | Thu, 25 Jun 2015 13:20:50 -0700 |
parents | cb7500a46eab |
children |
comparison
equal
deleted
inserted
replaced
27:8aded593a50f | 28:7be90179bb3b |
---|---|
20 /** | 20 /** |
21 * @author Nastaran Shafiei <nastaran.shafiei@gmail.com> | 21 * @author Nastaran Shafiei <nastaran.shafiei@gmail.com> |
22 */ | 22 */ |
23 public class FunctionObjectFactory { | 23 public class FunctionObjectFactory { |
24 | 24 |
25 public int getFunctionObject(ThreadInfo ti, ClassInfo fiClassInfo, String samUniqueName, BootstrapMethodInfo bmi, | 25 public int getFunctionObject(int bsIdx, ThreadInfo ti, ClassInfo fiClassInfo, String samUniqueName, BootstrapMethodInfo bmi, |
26 String[] freeVariableTypeNames, Object[] freeVariableValues) { | 26 String[] freeVariableTypeNames, Object[] freeVariableValues) { |
27 | 27 |
28 ClassLoaderInfo cli = bmi.enclosingClass.getClassLoaderInfo(); | 28 ClassLoaderInfo cli = bmi.enclosingClass.getClassLoaderInfo(); |
29 | 29 |
30 ClassInfo funcObjType = cli.getResolvedFuncObjType(fiClassInfo, samUniqueName, bmi, freeVariableTypeNames); | 30 ClassInfo funcObjType = cli.getResolvedFuncObjType(bsIdx, fiClassInfo, samUniqueName, bmi, freeVariableTypeNames); |
31 | 31 |
32 funcObjType.registerClass(ti); | 32 funcObjType.registerClass(ti); |
33 | 33 |
34 Heap heap = ti.getHeap(); | 34 Heap heap = ti.getHeap(); |
35 ElementInfo ei = heap.newObject(funcObjType, ti); | 35 ElementInfo ei = heap.newObject(funcObjType, ti); |