Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/qt5-script: Prevent clang from optimizing the code with undefin…
…ed behavior PR: 277236 Obtained from: OpenBSD ports
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...qt5-script/files/patch-src_3rdparty_javascriptcore_JavaScriptCore_interpreter_CallFrame.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Index: src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h | ||
--- src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h.orig | ||
+++ src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h | ||
@@ -135,9 +135,11 @@ namespace JSC { | ||
static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); } | ||
int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); } | ||
|
||
+#pragma clang optimize off | ||
bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; } | ||
CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); } | ||
CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); } | ||
+#pragma clang optimize on | ||
|
||
private: | ||
void setArgumentCount(int count) { static_cast<Register*>(this)[RegisterFile::ArgumentCount] = Register::withInt(count); } |