Bug 193714 - [JSC] Duplicate global variables: JSC::opcodeLengths
Summary: [JSC] Duplicate global variables: JSC::opcodeLengths
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-23 03:49 PST by David Kilzer (:ddkilzer)
Modified: 2019-01-23 07:41 PST (History)
9 users (show)

See Also:


Attachments
Patch v1 (2.22 KB, patch)
2019-01-23 03:53 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2019-01-23 03:49:03 PST
Because JSC::opcodeLengths is defined in the Source/JavaScriptCore/bytecode/Opcode.h header, there are 11 copies of it created on Release-iphoneos builds:

$ nm -a $BUILD_ROOT/Release-iphoneos/JavaScriptCore.framework/JavaScriptCore | grep opcodeLengths
0000000000bfdb54 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000bfdb54 s __ZN3JSCL13opcodeLengthsE
0000000000bfde2c s __ZN3JSCL13opcodeLengthsE
0000000000bfde2c - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000bfe130 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000bfe130 s __ZN3JSCL13opcodeLengthsE
0000000000bfe5e8 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000bfe5e8 s __ZN3JSCL13opcodeLengthsE
0000000000bfe930 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000bfe930 s __ZN3JSCL13opcodeLengthsE
0000000000bff1f0 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000bff1f0 s __ZN3JSCL13opcodeLengthsE
0000000000c08684 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000c08684 s __ZN3JSCL13opcodeLengthsE
0000000000c08970 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000c08970 s __ZN3JSCL13opcodeLengthsE
0000000000c08c98 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000c08c98 s __ZN3JSCL13opcodeLengthsE
0000000000c09100 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE
0000000000c09100 s __ZN3JSCL13opcodeLengthsE
0000000000c09880 s __ZN3JSCL13opcodeLengthsE
0000000000c09880 - 04 0000 STSYM __ZN3JSCL13opcodeLengthsE

After moving JSC::opcodeLengths to Source/JavaScriptCore/bytecode/Opcode.cpp, we have only one copy:

$ nm -a $BUILD_ROOT/Release-iphoneos/JavaScriptCore.framework/JavaScriptCore | grep opcodeLengths
0000000000000000 - 00 0000  GSYM __ZN3JSC13opcodeLengthsE
0000000000bfd878 s __ZN3JSC13opcodeLengthsE
Comment 1 David Kilzer (:ddkilzer) 2019-01-23 03:49:16 PST
<rdar://problem/47340200>
Comment 2 David Kilzer (:ddkilzer) 2019-01-23 03:53:25 PST
Created attachment 359869 [details]
Patch v1
Comment 3 Mark Lam 2019-01-23 07:15:41 PST
Comment on attachment 359869 [details]
Patch v1

r=me
Comment 4 WebKit Commit Bot 2019-01-23 07:41:01 PST
Comment on attachment 359869 [details]
Patch v1

Clearing flags on attachment: 359869

Committed r240335: <https://trac.webkit.org/changeset/240335>
Comment 5 WebKit Commit Bot 2019-01-23 07:41:03 PST
All reviewed patches have been landed.  Closing bug.