summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/interpreter/ProtoCallFrame.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/interpreter/ProtoCallFrame.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/interpreter/ProtoCallFrame.h')
-rw-r--r--Source/JavaScriptCore/interpreter/ProtoCallFrame.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/interpreter/ProtoCallFrame.h b/Source/JavaScriptCore/interpreter/ProtoCallFrame.h
index 84037da95..e41de5f8c 100644
--- a/Source/JavaScriptCore/interpreter/ProtoCallFrame.h
+++ b/Source/JavaScriptCore/interpreter/ProtoCallFrame.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2013-2017 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,43 +23,44 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ProtoCallFrame_h
-#define ProtoCallFrame_h
+#pragma once
#include "Register.h"
+#include <wtf/ForbidHeapAllocation.h>
namespace JSC {
-struct ProtoCallFrame {
+struct JS_EXPORT_PRIVATE ProtoCallFrame {
+ WTF_FORBID_HEAP_ALLOCATION;
+public:
Register codeBlockValue;
- Register scopeChainValue;
Register calleeValue;
Register argCountAndCodeOriginValue;
Register thisArg;
uint32_t paddedArgCount;
+ bool arityMissMatch;
JSValue *args;
- void init(CodeBlock*, JSScope*, JSObject*, JSValue, int, JSValue* otherArgs = 0);
+ void init(CodeBlock*, JSObject*, JSValue, int, JSValue* otherArgs = 0);
CodeBlock* codeBlock() const { return codeBlockValue.Register::codeBlock(); }
void setCodeBlock(CodeBlock* codeBlock) { codeBlockValue = codeBlock; }
- JSScope* scope() const { return scopeChainValue.Register::scope(); }
- void setScope(JSScope* scope) { scopeChainValue = scope; }
-
- JSObject* callee() const { return calleeValue.Register::function(); }
- void setCallee(JSObject* callee) { calleeValue = Register::withCallee(callee); }
+ JSObject* callee() const { return calleeValue.Register::object(); }
+ void setCallee(JSObject* callee) { calleeValue = callee; }
int argumentCountIncludingThis() const { return argCountAndCodeOriginValue.payload(); }
int argumentCount() const { return argumentCountIncludingThis() - 1; }
void setArgumentCountIncludingThis(int count) { argCountAndCodeOriginValue.payload() = count; }
- void setPaddedArgsCount(uint32_t argCount) { paddedArgCount = argCount; }
+ void setPaddedArgCount(uint32_t argCount) { paddedArgCount = argCount; }
void clearCurrentVPC() { argCountAndCodeOriginValue.tag() = 0; }
JSValue thisValue() const { return thisArg.Register::jsValue(); }
void setThisValue(JSValue value) { thisArg = value; }
+ bool needArityCheck() { return arityMissMatch; }
+
JSValue argument(size_t argumentIndex)
{
ASSERT(static_cast<int>(argumentIndex) < argumentCount());
@@ -73,5 +74,3 @@ struct ProtoCallFrame {
};
} // namespace JSC
-
-#endif // ProtoCallFrame_h