Changeset 157696 in webkit
- Timestamp:
- Oct 19, 2013 10:40:56 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r157693 r157696 1 2013-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 1 10 2013-10-19 Filip Pizlo <fpizlo@apple.com> 2 11 -
trunk/Source/JavaScriptCore/jit/TempRegisterSet.h
r157693 r157696 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 #include "FPRInfo.h" 34 34 #include "GPRInfo.h" 35 #include <wtf/Bitmap.h>36 35 37 36 namespace 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];46 37 47 38 class TempRegisterSet { … … 51 42 for (unsigned i = numberOfBytesInTempRegisterSet; i--;) 52 43 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) const64 {65 for (unsigned i = numberOfBytesInTempRegisterSet; i--;)66 other[i] = m_set[i];67 44 } 68 45 … … 202 179 } 203 180 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]; 205 188 }; 206 189 … … 211 194 namespace JSC { 212 195 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 199 struct TempRegisterSet { }; 218 200 219 201 } // namespace JSC
Note: See TracChangeset
for help on using the changeset viewer.