WebKit Bugzilla
Attachment 359869 Details for
Bug 193714
: [JSC] Duplicate global variables: JSC::opcodeLengths
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-193714-20190123035324.patch (text/plain), 2.22 KB, created by
David Kilzer (:ddkilzer)
on 2019-01-23 03:53:25 PST
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-01-23 03:53:25 PST
Size:
2.22 KB
patch
obsolete
>Subversion Revision: 240275 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index c34ced4859fe3931fbbc2a2aa5f7cb5ce03beb94..90c0638817c9165846847c518e62b9c90b970afc 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-23 David Kilzer <ddkilzer@apple.com> >+ >+ [JSC] Duplicate global variables: JSC::opcodeLengths >+ <https://webkit.org/b/193714> >+ <rdar://problem/47340200> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * bytecode/Opcode.cpp: >+ (JSC::opcodeLengths): Move array implementation here and mark >+ const. >+ * bytecode/Opcode.h: >+ (JSC::opcodeLengths): Change to extern declaration. >+ > 2019-01-22 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Intl constructors should fit in sizeof(InternalFunction) >diff --git a/Source/JavaScriptCore/bytecode/Opcode.cpp b/Source/JavaScriptCore/bytecode/Opcode.cpp >index 97d47d45ecc71229e0b78019a8cf881be4a5eb6e..2dd93448faa08c8bf2d6ab3b8dbc66dd3f36539c 100644 >--- a/Source/JavaScriptCore/bytecode/Opcode.cpp >+++ b/Source/JavaScriptCore/bytecode/Opcode.cpp >@@ -40,6 +40,12 @@ > > namespace JSC { > >+const unsigned opcodeLengths[] = { >+#define OPCODE_LENGTH(opcode, length) length, >+ FOR_EACH_OPCODE_ID(OPCODE_LENGTH) >+#undef OPCODE_LENGTH >+}; >+ > const char* const opcodeNames[] = { > #define OPCODE_NAME_ENTRY(opcode, size) #opcode, > FOR_EACH_OPCODE_ID(OPCODE_NAME_ENTRY) >diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h >index 1f39b7f9d9c32008edaeeaee64b5297691da28a5..feeb4427f6859541e578fe509dafb5c3ccf5a8f6 100644 >--- a/Source/JavaScriptCore/bytecode/Opcode.h >+++ b/Source/JavaScriptCore/bytecode/Opcode.h >@@ -71,15 +71,7 @@ const int numOpcodeIDs = NUMBER_OF_BYTECODE_IDS + NUMBER_OF_BYTECODE_HELPER_IDS; > #undef OPCODE_ID_ENUM > #endif > >-IGNORE_WARNINGS_BEGIN("unused-variable") >- >-#define OPCODE_LENGTH(opcode, length) length, >- static unsigned opcodeLengths[] = { >- FOR_EACH_OPCODE_ID(OPCODE_LENGTH) >- }; >-#undef OPCODE_LENGTH >- >-IGNORE_WARNINGS_END >+extern const unsigned opcodeLengths[]; > > #define OPCODE_ID_LENGTHS(id, length) const int id##_length = length; > FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193714
: 359869