Ignore:
Timestamp:
Aug 25, 2020, 1:06:48 AM (5 years ago)
Author:
[email protected]
Message:

[JSC] Add concurrency-aware version of isCallable / isConstructor to make it usable in DFG compiler
https://bugs.webkit.org/show_bug.cgi?id=215746

Reviewed by Saam Barati.

This patch adds isCallableWithConcurrency and isConstructorWithConcurrency to JSCell, JSValue etc.
This can work even if it is called from concurrent compiler threads. We also add jsTypeStringForValueWithConcurrency
and jsTypeofIsFunctionWithConcurrency which are using the above WithConcurrency functionalities.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • runtime/Concurrency.h: Added.

(WTF::printInternal):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::finishCreation):
(JSC::InternalFunction::getCallData):
(JSC::InternalFunction::getConstructData):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::isCallableWithConcurrency const):
(JSC::JSValue::isConstructorWithConcurrency const):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::isCallableWithConcurrency):
(JSC::JSCell::isConstructorWithConcurrency):
(JSC::JSCell::isCallable):
(JSC::JSCell::isConstructor):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):
(JSC::JSFunction::getCallData):
(JSC::JSFunction::getConstructData):

  • runtime/NumberPrototype.cpp:

(JSC::throwVMToThisNumberError):

  • runtime/Operations.cpp:

(JSC::jsTypeStringForValueWithConcurrency):
(JSC::jsTypeStringForValue): Deleted.

  • runtime/Operations.h:

(JSC::jsTypeofIsFunctionWithConcurrency):
(JSC::jsTypeStringForValue):
(JSC::jsTypeofIsFunction):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.h

    r263035 r266107  
    2323#pragma once
    2424
     25#include "Concurrency.h"
    2526#include "ECMAMode.h"
    2627#include "JSExportMacros.h"
     
    234235    bool isEmpty() const;
    235236    bool isCallable(VM&) const;
     237    template<Concurrency> TriState isCallableWithConcurrency(VM&) const;
    236238    bool isConstructor(VM&) const;
     239    template<Concurrency> TriState isConstructorWithConcurrency(VM&) const;
    237240    bool isUndefined() const;
    238241    bool isNull() const;
Note: See TracChangeset for help on using the changeset viewer.