diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/interpreter/ProtoCallFrame.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/interpreter/ProtoCallFrame.h')
-rw-r--r-- | Source/JavaScriptCore/interpreter/ProtoCallFrame.h | 27 |
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 |