Changeset 240335 in webkit


Ignore:
Timestamp:
Jan 23, 2019 7:40:55 AM (5 years ago)
Author:
ddkilzer@apple.com
Message:

[JSC] Duplicate global variables: JSC::opcodeLengths
<https://webkit.org/b/193714>
<rdar://problem/47340200>

Reviewed by Mark Lam.

  • bytecode/Opcode.cpp:

(JSC::opcodeLengths): Move array implementation here and mark
const.

  • bytecode/Opcode.h:

(JSC::opcodeLengths): Change to extern declaration.

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r240330 r240335  
     12019-01-23  David Kilzer  <ddkilzer@apple.com>
     2
     3        [JSC] Duplicate global variables: JSC::opcodeLengths
     4        <https://webkit.org/b/193714>
     5        <rdar://problem/47340200>
     6
     7        Reviewed by Mark Lam.
     8
     9        * bytecode/Opcode.cpp:
     10        (JSC::opcodeLengths): Move array implementation here and mark
     11        const.
     12        * bytecode/Opcode.h:
     13        (JSC::opcodeLengths): Change to extern declaration.
     14
    1152019-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
    216
  • trunk/Source/JavaScriptCore/bytecode/Opcode.cpp

    r238997 r240335  
    4141namespace JSC {
    4242
     43const unsigned opcodeLengths[] = {
     44#define OPCODE_LENGTH(opcode, length) length,
     45    FOR_EACH_OPCODE_ID(OPCODE_LENGTH)
     46#undef OPCODE_LENGTH
     47};
     48
    4349const char* const opcodeNames[] = {
    4450#define OPCODE_NAME_ENTRY(opcode, size) #opcode,
  • trunk/Source/JavaScriptCore/bytecode/Opcode.h

    r238997 r240335  
    7272#endif
    7373
    74 IGNORE_WARNINGS_BEGIN("unused-variable")
    75 
    76 #define OPCODE_LENGTH(opcode, length) length,
    77     static unsigned opcodeLengths[] = {
    78         FOR_EACH_OPCODE_ID(OPCODE_LENGTH)
    79     };
    80 #undef OPCODE_LENGTH
    81 
    82 IGNORE_WARNINGS_END
     74extern const unsigned opcodeLengths[];
    8375
    8476#define OPCODE_ID_LENGTHS(id, length) const int id##_length = length;
Note: See TracChangeset for help on using the changeset viewer.