Changeset 251584 in webkit for trunk/Source/JavaScriptCore/interpreter/CallFrame.h
- Timestamp:
- Oct 24, 2019, 11:59:36 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r251529 r251584 2 2 * Copyright (C) 1999-2001 Harri Porten ([email protected]) 3 3 * Copyright (C) 2001 Peter Kelly ([email protected]) 4 * Copyright (C) 2003-201 8Apple Inc. All rights reserved.4 * Copyright (C) 2003-2019 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 105 105 // to be a cell, however, there is a brief window where we need to check 106 106 // to see if it's a cell, and if it's not, we throw an exception. 107 JSValue guaranteedJSValueCallee() const 108 { 109 ASSERT(!callee().isWasm()); 110 return this[CallFrameSlot::callee].jsValue(); 111 } 112 JSObject* jsCallee() const 113 { 114 ASSERT(!callee().isWasm()); 115 return this[CallFrameSlot::callee].object(); 116 } 107 inline JSValue guaranteedJSValueCallee() const; 108 inline JSObject* jsCallee() const; 117 109 CalleeBits callee() const { return CalleeBits(this[CallFrameSlot::callee].pointer()); } 118 110 SUPPRESS_ASAN CalleeBits unsafeCallee() const { return CalleeBits(this[CallFrameSlot::callee].asanUnsafePointer()); } 119 CodeBlock* codeBlock() const { return this[CallFrameSlot::codeBlock].Register::codeBlock(); }111 CodeBlock* codeBlock() const; 120 112 CodeBlock** addressOfCodeBlock() const { return bitwise_cast<CodeBlock**>(this + CallFrameSlot::codeBlock); } 121 SUPPRESS_ASAN CodeBlock* unsafeCodeBlock() const { return this[CallFrameSlot::codeBlock].Register::asanUnsafeCodeBlock(); } 122 JSScope* scope(int scopeRegisterOffset) const 123 { 124 ASSERT(this[scopeRegisterOffset].Register::scope()); 125 return this[scopeRegisterOffset].Register::scope(); 126 } 113 inline SUPPRESS_ASAN CodeBlock* unsafeCodeBlock() const; 114 inline JSScope* scope(int scopeRegisterOffset) const; 127 115 128 116 JS_EXPORT_PRIVATE bool isAnyWasmCallee(); … … 184 172 JS_EXPORT_PRIVATE CodeOrigin codeOrigin(); 185 173 186 Register* topOfFrame() 187 { 188 if (!codeBlock()) 189 return registers(); 190 return topOfFrameInternal(); 191 } 174 inline Register* topOfFrame(); 192 175 193 176 const Instruction* currentVPC() const; // This only makes sense in the LLInt and baseline. … … 195 178 196 179 void setCallerFrame(CallFrame* frame) { callerFrameAndPC().callerFrame = frame; } 197 void setScope(int scopeRegisterOffset, JSScope* scope) { static_cast<Register*>(this)[scopeRegisterOffset] = scope; }180 inline void setScope(int scopeRegisterOffset, JSScope*); 198 181 199 182 static void initDeprecatedCallFrameForDebugger(CallFrame* globalExec, JSCallee* globalCallee); … … 270 253 271 254 void setArgumentCountIncludingThis(int count) { static_cast<Register*>(this)[CallFrameSlot::argumentCount].payload() = count; } 272 void setCallee(JSObject* callee) { static_cast<Register*>(this)[CallFrameSlot::callee] = callee; }273 void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[CallFrameSlot::codeBlock] = codeBlock; }255 inline void setCallee(JSObject*); 256 inline void setCodeBlock(CodeBlock*); 274 257 void setReturnPC(void* value) { callerFrameAndPC().returnPC = reinterpret_cast<const Instruction*>(value); } 275 258 … … 324 307 }; 325 308 326 // Helper function to get VM& from JSGlobalObject* if JSGlobalObject.h is not included.327 VM& getVM(JSGlobalObject*);328 309 JS_EXPORT_PRIVATE bool isFromJSCode(void* returnAddress); 329 310
Note:
See TracChangeset
for help on using the changeset viewer.