Bug 193858

Summary: [JSC] Offer @makeTypeError instead of exposing @TypeError
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, mark.lam, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch mark.lam: review+

Yusuke Suzuki
Reported 2019-01-25 17:41:16 PST
And by doing so, we can make TypeError, ErrorPrototype, ErrorConstructor etc.'s dependency tree lazily-allocated.
Attachments
Patch (33.63 KB, patch)
2019-03-03 02:37 PST, Yusuke Suzuki
no flags
Patch (33.63 KB, patch)
2019-03-03 03:27 PST, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2019-03-03 02:37:57 PST
EWS Watchlist
Comment 2 2019-03-03 02:41:22 PST
Attachment 363454 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 3 2019-03-03 03:27:34 PST
Mark Lam
Comment 4 2019-03-03 12:55:08 PST
Comment on attachment 363455 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363455&action=review r=me > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:698 > + This seems unnecessary. > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:762 > - JSGlobalObject* globalObject = exec->lexicalGlobalObject(); > - VM& vm = globalObject->vm(); > + VM& vm = exec->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); > > + JSGlobalObject* globalObject = exec->lexicalGlobalObject(); Why make this change? It's more efficient to get the vm from the globalObject than from the ExecState, and getting the lexicalGlobalObject() cannot throw an exception, can it?
Yusuke Suzuki
Comment 5 2019-03-04 10:52:37 PST
Comment on attachment 363455 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363455&action=review Thank you >> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:698 >> + > > This seems unnecessary. Removed. >> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:762 >> + JSGlobalObject* globalObject = exec->lexicalGlobalObject(); > > Why make this change? It's more efficient to get the vm from the globalObject than from the ExecState, and getting the lexicalGlobalObject() cannot throw an exception, can it? I aligned this code to the other places, but it seems that this code is better in terms of performance. Reverted.
Yusuke Suzuki
Comment 6 2019-03-04 10:56:32 PST
Radar WebKit Bug Importer
Comment 7 2019-03-04 10:57:18 PST
Note You need to log in before you can comment on or make changes to this bug.