Changeset 228397 in webkit


Ignore:
Timestamp:
Feb 12, 2018 2:49:02 PM (6 years ago)
Author:
mark.lam@apple.com
Message:

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

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • llint/LLIntData.h:

(JSC::LLInt::getCodePtr):

  • llint/LLIntPCRanges.h:

(JSC::LLInt::isLLIntPC):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

Source/WTF:

  • wtf/PointerPreparations.h:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r228388 r228397  
     12018-02-12  Mark Lam  <mark.lam@apple.com>
     2
     3        Add more support for pointer preparations.
     4        https://bugs.webkit.org/show_bug.cgi?id=182703
     5        <rdar://problem/37469451>
     6
     7        Reviewed by Saam Barati.
     8
     9        * llint/LLIntData.h:
     10        (JSC::LLInt::getCodePtr):
     11        * llint/LLIntPCRanges.h:
     12        (JSC::LLInt::isLLIntPC):
     13        * runtime/Options.cpp:
     14        (JSC::recomputeDependentOptions):
     15
    1162018-02-12  Mark Lam  <mark.lam@apple.com>
    217
  • trunk/Source/JavaScriptCore/llint/LLIntData.h

    r206525 r228397  
    11/*
    2  * Copyright (C) 2011, 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2929#include "Opcode.h"
    3030#include <array>
     31#include <wtf/PointerPreparations.h>
    3132
    3233namespace JSC {
     
    113114ALWAYS_INLINE void* getCodePtr(JSC::EncodedJSValue glueHelper())
    114115{
    115     return bitwise_cast<void*>(glueHelper);
     116    return WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(glueHelper);
    116117}
    117118
  • trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h

    r206525 r228397  
    11/*
    2  * Copyright (C) 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2626#pragma once
    2727
     28#include <wtf/PointerPreparations.h>
     29
    2830namespace JSC {
    2931
     
    3941{
    4042    uintptr_t pcAsInt = bitwise_cast<uintptr_t>(pc);
    41     uintptr_t llintStart = bitwise_cast<uintptr_t>(llintPCRangeStart);
    42     uintptr_t llintEnd = bitwise_cast<uintptr_t>(llintPCRangeEnd);
     43    uintptr_t llintStart = bitwise_cast<uintptr_t>(WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(llintPCRangeStart));
     44    uintptr_t llintEnd = bitwise_cast<uintptr_t>(WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(llintPCRangeEnd));
    4345    RELEASE_ASSERT(llintStart < llintEnd);
    4446    return llintStart <= pcAsInt && pcAsInt <= llintEnd;
  • trunk/Source/JavaScriptCore/runtime/Options.cpp

    r225618 r228397  
    11/*
    2  * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4242#include <wtf/DataLog.h>
    4343#include <wtf/NumberOfCores.h>
     44#include <wtf/PointerPreparations.h>
    4445#include <wtf/StdLibExtras.h>
    4546#include <wtf/text/StringBuilder.h>
     
    401402        Options::useJIT() = false;
    402403#endif
     404
     405    WTF_SET_POINTER_PREPARATION_OPTIONS();
    403406
    404407    if (!Options::useJIT())
  • trunk/Source/WTF/ChangeLog

    r228330 r228397  
     12018-02-12  Mark Lam  <mark.lam@apple.com>
     2
     3        Add more support for pointer preparations.
     4        https://bugs.webkit.org/show_bug.cgi?id=182703
     5        <rdar://problem/37469451>
     6
     7        Reviewed by Saam Barati.
     8
     9        * wtf/PointerPreparations.h:
     10
    1112018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
    212
  • trunk/Source/WTF/wtf/PointerPreparations.h

    r227701 r228397  
    3030#endif
    3131
     32#ifndef WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION
     33#define WTF_PREPARE_FUNCTION_POINTER_FOR_EXECUTION(vtblPtr) (reinterpret_cast<void*>(vtblPtr))
     34#endif
     35
    3236#ifndef WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION
    3337#define WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION(vtblPtr) (reinterpret_cast<void*>(vtblPtr))
    3438#endif
     39
     40#ifndef WTF_SET_POINTER_PREPARATION_OPTIONS
     41#define WTF_SET_POINTER_PREPARATION_OPTIONS() do { } while (false)
     42#endif
     43
Note: See TracChangeset for help on using the changeset viewer.