MCPcopy Create free account
hub / github.com/mozilla/rhino / get

Method get

rhino/src/main/java/org/mozilla/javascript/NativeArray.java:233–239  ·  view source on GitHub ↗
(int index, Scriptable start)

Source from the content-addressed store, hash-verified

231 }
232
233 @Override
234 public Object get(int index, Scriptable start) {
235 var slot = denseOnly ? null : getMap().query(null, index);
236 if (!denseOnly && slot != null && slot.isSetterSlot()) return slot.getValue(start);
237 if (dense != null && 0 <= index && index < dense.length) return dense[index];
238 return slot == null ? NOT_FOUND : slot.getValue(start);
239 }
240
241 @Override
242 public boolean has(int index, Scriptable start) {

Callers 15

mapMethod · 0.95
listMethod · 0.95
setMethod · 0.95
stringifyMethod · 0.95
coerceTypeImplMethod · 0.95
toArrayMethod · 0.95
indexOfMethod · 0.95
lastIndexOfMethod · 0.95
nextMethod · 0.95
previousMethod · 0.95
js_constructorMethod · 0.95

Calls 8

checkModCountMethod · 0.95
getMapMethod · 0.80
getRawElemMethod · 0.80
queryMethod · 0.65
getValueMethod · 0.65
unwrapMethod · 0.65
getMethod · 0.65
isSetterSlotMethod · 0.45

Tested by 14

mapMethod · 0.76
listMethod · 0.76
setMethod · 0.76
symbolIteratorMethod · 0.76
callStrictOrNonStrictMethod · 0.76
applyStrictMethod · 0.76
applyNonStrictMethod · 0.76
callStrictMethod · 0.76
callNonStrictMethod · 0.76