Changeset 157696 in webkit


Ignore:
Timestamp:
Oct 19, 2013 10:40:56 PM (10 years ago)
Author:
fpizlo@apple.com
Message:

Simplify TempRegisterSet - it no longer needs to be convertible to a POD since it's no longer going to be a member of a union
https://bugs.webkit.org/show_bug.cgi?id=123079

Reviewed by Geoffrey Garen.

  • jit/TempRegisterSet.h:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r157693 r157696  
     12013-10-19  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Simplify TempRegisterSet - it no longer needs to be convertible to a POD since it's no longer going to be a member of a union
     4        https://bugs.webkit.org/show_bug.cgi?id=123079
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * jit/TempRegisterSet.h:
     9
    1102013-10-19  Filip Pizlo  <fpizlo@apple.com>
    211
  • trunk/Source/JavaScriptCore/jit/TempRegisterSet.h

    r157693 r157696  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3333#include "FPRInfo.h"
    3434#include "GPRInfo.h"
    35 #include <wtf/Bitmap.h>
    3635
    3736namespace JSC {
    38 
    39 static const unsigned totalNumberOfRegisters =
    40     GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters;
    41 
    42 static const unsigned numberOfBytesInTempRegisterSet =
    43     (totalNumberOfRegisters + 7) >> 3;
    44 
    45 typedef uint8_t TempRegisterSetPOD[numberOfBytesInTempRegisterSet];
    4637
    4738class TempRegisterSet {
     
    5142        for (unsigned i = numberOfBytesInTempRegisterSet; i--;)
    5243            m_set[i] = 0;
    53     }
    54    
    55     TempRegisterSet(const TempRegisterSetPOD& other)
    56     {
    57         for (unsigned i = numberOfBytesInTempRegisterSet; i--;)
    58             m_set[i] = other[i];
    59     }
    60    
    61     const TempRegisterSetPOD& asPOD() const { return m_set; }
    62    
    63     void copyInfo(TempRegisterSetPOD& other) const
    64     {
    65         for (unsigned i = numberOfBytesInTempRegisterSet; i--;)
    66             other[i] = m_set[i];
    6744    }
    6845   
     
    202179    }
    203180   
    204     TempRegisterSetPOD m_set;
     181    static const unsigned totalNumberOfRegisters =
     182        GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters;
     183   
     184    static const unsigned numberOfBytesInTempRegisterSet =
     185        (totalNumberOfRegisters + 7) >> 3;
     186
     187    uint8_t m_set[numberOfBytesInTempRegisterSet];
    205188};
    206189
     
    211194namespace JSC {
    212195
    213 // Define TempRegisterSetPOD to something that is a POD, but is otherwise useless,
    214 // to make it easier to refer to this type in code that may be compiled when
    215 // the DFG is disabled.
    216 
    217 struct TempRegisterSetPOD { };
     196// Define TempRegisterSet to something, to make it easier to refer to this type in code that
     197// make be compiled when the JIT is disabled.
     198
     199struct TempRegisterSet { };
    218200
    219201} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.