(Object ref)
| 204 | |
| 205 | // FIXME: move to helper class |
| 206 | public static Object getThis(Object ref) { |
| 207 | Object thisValue = null; |
| 208 | |
| 209 | // FIXME: We can probably remove this check for IRJSFunctions since we will not be using references |
| 210 | if (ref instanceof Reference) { |
| 211 | if (((Reference) ref).isPropertyReference()) { |
| 212 | thisValue = ((Reference) ref).getBase(); |
| 213 | } else { |
| 214 | thisValue = ((EnvironmentRecord) ((Reference) ref).getBase()).implicitThisValue(); |
| 215 | } |
| 216 | } |
| 217 | return thisValue; |
| 218 | } |
| 219 | |
| 220 | // FIXME: This breaks for non-numeric uses if isSubtraction |
| 221 | private static Object add(ExecutionContext context, Object lhs, Object rhs) { |
no test coverage detected