bug fix for finding primitive objects

This commit is contained in:
Julian Dolby 2014-04-11 09:58:34 -04:00
parent fe5ad51acd
commit 26684af676
1 changed files with 3 additions and 2 deletions

View File

@ -118,7 +118,7 @@ public class FlowGraphBuilder {
}
// primitive functions that are treated specially
private static String[] primitiveFunctions = { "Object", "Function", "Array", "String", "Number", "RegExp" };
private static String[] primitiveFunctions = { "Object", "Function", "Array", "StringObject", "NumberObject", "BooleanObject", "RegExp" };
/**
* Add flows from the special primitive functions to the corresponding global variables.
@ -130,7 +130,8 @@ public class FlowGraphBuilder {
for(String pf : primitiveFunctions) {
TypeReference typeref = TypeReference.findOrCreate(JavaScriptTypes.jsLoader, "L" + pf);
IClass klass = cha.lookupClass(typeref);
flowgraph.addEdge(factory.makeFuncVertex(klass), factory.makePropVertex(pf));
String prop = pf.endsWith("Object")? pf.substring(0, pf.length() - 6): pf;
flowgraph.addEdge(factory.makeFuncVertex(klass), factory.makePropVertex(prop));
}
}