Skip to content

Commit

Permalink
Remove Runtime::getHiddenClassForPrototypeRaw
Browse files Browse the repository at this point in the history
Summary:
Remove the Runtime::getHiddenClassForPrototypeRaw method, and update its single caller to use
the non-raw version.

Reviewed By: tmikov

Differential Revision: D40393784

fbshipit-source-id: 6d4fd545a3f5157ebbb80832cb25c871f320f339
  • Loading branch information
John Porto authored and facebook-github-bot committed Oct 18, 2022
1 parent 3af24a2 commit 81200a6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
6 changes: 0 additions & 6 deletions include/hermes/VM/Runtime-inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ inline Handle<HiddenClass> Runtime::getHiddenClassForPrototype(
return Handle<HiddenClass>::vmcast(clazz);
}

inline HiddenClass *Runtime::getHiddenClassForPrototypeRaw(
JSObject *proto,
unsigned reservedSlots) {
return *getHiddenClassForPrototype(proto, reservedSlots);
}

} // namespace vm
} // namespace hermes

Expand Down
7 changes: 0 additions & 7 deletions include/hermes/VM/Runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,6 @@ class Runtime : public PointerBase,
JSObject *proto,
unsigned reservedSlots);

/// Same as above but returns a raw pointer: standard warnings apply!
/// TODO: Delete this function once all callers are replaced with
/// getHiddenClassForPrototype.
inline HiddenClass *getHiddenClassForPrototypeRaw(
JSObject *proto,
unsigned reservedSlots);

/// Return the global object.
Handle<JSObject> getGlobal();

Expand Down
2 changes: 1 addition & 1 deletion lib/VM/Interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ static Handle<HiddenClass> getHiddenClassForBuffer(

MutableHandle<> tmpHandleKey{runtime};
MutableHandle<HiddenClass> clazz =
runtime.makeMutableHandle(runtime.getHiddenClassForPrototypeRaw(
runtime.makeMutableHandle(*runtime.getHiddenClassForPrototype(
vmcast<JSObject>(runtime.objectPrototype),
JSObject::numOverlapSlots<JSObject>()));

Expand Down

0 comments on commit 81200a6

Please sign in to comment.