From 54e3c4cb7c3727fead0b4e9958d653ab6d197c3c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 12 Aug 2016 12:52:30 -0400 Subject: [PATCH] Implement CallArgs::callee. --- src/rust.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/rust.rs b/src/rust.rs index 778ef099b..686e85e7b 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -683,6 +683,18 @@ impl CallArgs { HandleValue::from_marked_location(self._base.argv_.offset(-1)) } } + + #[inline] + pub fn calleev(&self) -> HandleValue { + unsafe { + HandleValue::from_marked_location(self._base.argv_.offset(-2)) + } + } + + #[inline] + pub fn callee(&self) -> *mut JSObject { + self.calleev().to_object() + } } impl JSJitGetterCallArgs {