Ignore:
Timestamp:
Aug 27, 2020, 1:11:57 PM (5 years ago)
Author:
[email protected]
Message:

structureOrNull should take VM instead of getting it from the marked block
https://bugs.webkit.org/show_bug.cgi?id=215899

Reviewed by Yusuke Suzuki.

It's slightly faster use an existing VM over recomputing the address. It probably doesn't
happen to matter here for performance but it's good hygiene.

  • API/tests/JSWrapperMapTests.mm:

(+[JSWrapperMapTests testStructureIdentity]):

  • jit/JITOperations.cpp:
  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::structureOrNull const):
(JSC::JSValue::structureOrUndefined const): Deleted.

File:
1 edited

Legend:

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

    r266107 r266251  
    339339    JS_EXPORT_PRIVATE bool isValidCallee();
    340340
    341     Structure* structureOrNull() const;
    342     JSValue structureOrUndefined() const;
     341    Structure* structureOrNull(VM&) const;
    343342
    344343    JS_EXPORT_PRIVATE void dump(PrintStream&) const;
Note: See TracChangeset for help on using the changeset viewer.