MCPcopy Create free account
hub / github.com/Snapchat/Valdi / newUnsignedLong

Method newUnsignedLong

valdi/src/valdi/runtime/Interfaces/IJavaScriptContext.cpp:232–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 setObjectPropertyIndex(cache.get(), cacheIndex, cachedValue.get(), exceptionTracker);
231 }
232
233 return cachedValue;
234}
235
236JSValueRef IJavaScriptContext::newLong(int64_t value, JSExceptionTracker& exceptionTracker) {
237 if (value >= -128 && value < 128) {
238 return newLongFromCache(
239 JavaScriptLong(value), _signedLongCache, static_cast<size_t>(value + 128), exceptionTracker);
240 } else {
241 return newLongUncached(JavaScriptLong(value), exceptionTracker);
242 }

Callers 2

TEST_PFunction · 0.80

Calls 1

JavaScriptLongClass · 0.70

Tested by 1

TEST_PFunction · 0.64