Title: [228397] trunk/Source
Revision
228397
Author
mark....@apple.com
Date
2018-02-12 14:49:02 -0800 (Mon, 12 Feb 2018)

Log Message

Add more support for pointer preparations.
https://bugs.webkit.org/show_bug.cgi?id=182703
<rdar://problem/37469451>

Reviewed by Saam Barati.

Source/_javascript_Core:

* llint/LLIntData.h:
(JSC::LLInt::getCodePtr):
* llint/LLIntPCRanges.h:
(JSC::LLInt::isLLIntPC):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

Source/WTF:

* wtf/PointerPreparations.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (228396 => 228397)


--- trunk/Source/_javascript_Core/ChangeLog	2018-02-12 22:37:57 UTC (rev 228396)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-02-12 22:49:02 UTC (rev 228397)
@@ -1,5 +1,20 @@
 2018-02-12  Mark Lam  <mark....@apple.com>
 
+        Add more support for pointer preparations.
+        https://bugs.webkit.org/show_bug.cgi?id=182703
+        <rdar://problem/37469451>
+
+        Reviewed by Saam Barati.
+
+        * llint/LLIntData.h:
+        (JSC::LLInt::getCodePtr):
+        * llint/LLIntPCRanges.h:
+        (JSC::LLInt::isLLIntPC):
+        * runtime/Options.cpp:
+        (JSC::recomputeDependentOptions):
+
+2018-02-12  Mark Lam  <mark....@apple.com>
+
         Fix missing exception check in RegExpObject::matchGlobal().
         https://bugs.webkit.org/show_bug.cgi?id=182701
         <rdar://problem/37465865>

Modified: trunk/Source/_javascript_Core/llint/LLIntData.h (228396 => 228397)


--- trunk/Source/_javascript_Core/llint/LLIntData.h	2018-02-12 22:37:57 UTC (rev 228396)
+++ trunk/Source/_javascript_Core/llint/LLIntData.h	2018-02-12 22:49:02 UTC (rev 228397)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,6 +28,7 @@
 #include "JSCJSValue.h"
 #include "Opcode.h"
 #include <array>
+#include <wtf/PointerPreparations.h>
 
 namespace JSC {
 
@@ -112,7 +113,7 @@
 
 ALWAYS_INLINE void* getCodePtr(JSC::EncodedJSValue glueHelper())
 {
-    return bitwise_cast<void*>(glueHelper);
+    return WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(glueHelper);
 }
 
 } } // namespace JSC::LLInt

Modified: trunk/Source/_javascript_Core/llint/LLIntPCRanges.h (228396 => 228397)


--- trunk/Source/_javascript_Core/llint/LLIntPCRanges.h	2018-02-12 22:37:57 UTC (rev 228396)
+++ trunk/Source/_javascript_Core/llint/LLIntPCRanges.h	2018-02-12 22:49:02 UTC (rev 228397)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#include <wtf/PointerPreparations.h>
+
 namespace JSC {
 
 namespace LLInt {
@@ -38,8 +40,8 @@
 ALWAYS_INLINE bool isLLIntPC(void* pc)
 {
     uintptr_t pcAsInt = bitwise_cast<uintptr_t>(pc);
-    uintptr_t llintStart = bitwise_cast<uintptr_t>(llintPCRangeStart);
-    uintptr_t llintEnd = bitwise_cast<uintptr_t>(llintPCRangeEnd);
+    uintptr_t llintStart = bitwise_cast<uintptr_t>(WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(llintPCRangeStart));
+    uintptr_t llintEnd = bitwise_cast<uintptr_t>(WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(llintPCRangeEnd));
     RELEASE_ASSERT(llintStart < llintEnd);
     return llintStart <= pcAsInt && pcAsInt <= llintEnd;
 }

Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (228396 => 228397)


--- trunk/Source/_javascript_Core/runtime/Options.cpp	2018-02-12 22:37:57 UTC (rev 228396)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2018-02-12 22:49:02 UTC (rev 228397)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,6 +41,7 @@
 #include <wtf/Compiler.h>
 #include <wtf/DataLog.h>
 #include <wtf/NumberOfCores.h>
+#include <wtf/PointerPreparations.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/threads/Signals.h>
@@ -401,6 +402,8 @@
         Options::useJIT() = false;
 #endif
 
+    WTF_SET_POINTER_PREPARATION_OPTIONS();
+
     if (!Options::useJIT())
         Options::useWebAssembly() = false;
 

Modified: trunk/Source/WTF/ChangeLog (228396 => 228397)


--- trunk/Source/WTF/ChangeLog	2018-02-12 22:37:57 UTC (rev 228396)
+++ trunk/Source/WTF/ChangeLog	2018-02-12 22:49:02 UTC (rev 228397)
@@ -1,3 +1,13 @@
+2018-02-12  Mark Lam  <mark....@apple.com>
+
+        Add more support for pointer preparations.
+        https://bugs.webkit.org/show_bug.cgi?id=182703
+        <rdar://problem/37469451>
+
+        Reviewed by Saam Barati.
+
+        * wtf/PointerPreparations.h:
+
 2018-02-09  Ross Kirsling  <ross.kirsl...@sony.com>
 
         Use REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR on any non-Windows port.

Modified: trunk/Source/WTF/wtf/PointerPreparations.h (228396 => 228397)


--- trunk/Source/WTF/wtf/PointerPreparations.h	2018-02-12 22:37:57 UTC (rev 228396)
+++ trunk/Source/WTF/wtf/PointerPreparations.h	2018-02-12 22:49:02 UTC (rev 228397)
@@ -29,6 +29,15 @@
 #include <WebKitAdditions/PointerPreparations.h>
 #endif
 
+#ifndef WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION
+#define WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(vtblPtr) (reinterpret_cast<void*>(vtblPtr))
+#endif
+
 #ifndef WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION
 #define WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION(vtblPtr) (reinterpret_cast<void*>(vtblPtr))
 #endif
+
+#ifndef WTF_SET_POINTER_PREPARATION_OPTIONS
+#define WTF_SET_POINTER_PREPARATION_OPTIONS() do { } while (false)
+#endif
+
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to