Clean up HermesValue::getNativeValue
Summary: This function doesn't really serve a purpose, particularly now that `NativeValue`s can only be one thing. Reviewed By: kodafb Differential Revision: D29872075 fbshipit-source-id: 3cee34da4024170828d0d1eecda6313df21638ee
This commit is contained in:
Родитель
61e905a801
Коммит
92e16809eb
|
@ -394,13 +394,6 @@ class HermesValue {
|
|||
return safeTypeCast<uint64_t, double>(raw_);
|
||||
}
|
||||
|
||||
inline int64_t getNativeValue() const {
|
||||
assert(isNativeValue());
|
||||
// Sign-extend the value.
|
||||
return (static_cast<int64_t>(raw_ & kDataMask) << (64 - kNumDataBits)) >>
|
||||
(64 - kNumDataBits);
|
||||
}
|
||||
|
||||
inline uint32_t getNativeUInt32() const {
|
||||
assert(isNativeValue());
|
||||
return (uint32_t)raw_;
|
||||
|
|
|
@ -50,7 +50,7 @@ llvh::raw_ostream &operator<<(llvh::raw_ostream &OS, HermesValue hv) {
|
|||
return OS << ']';
|
||||
}
|
||||
case NativeValueTag:
|
||||
return OS << "[NativeValue " << hv.getNativeValue() << "]";
|
||||
return OS << "[NativeValue " << hv.getNativeUInt32() << "]";
|
||||
case SymbolTag:
|
||||
return OS << "[Symbol "
|
||||
<< (hv.getSymbol().isNotUniqued() ? "(External)" : "(Internal)")
|
||||
|
|
Загрузка…
Ссылка в новой задаче