Title: [157696] trunk/Source/_javascript_Core
- Revision
- 157696
- Author
- [email protected]
- Date
- 2013-10-19 22:40:56 -0700 (Sat, 19 Oct 2013)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (157695 => 157696)
--- trunk/Source/_javascript_Core/ChangeLog 2013-10-20 04:58:04 UTC (rev 157695)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-10-20 05:40:56 UTC (rev 157696)
@@ -1,5 +1,14 @@
2013-10-19 Filip Pizlo <[email protected]>
+ 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:
+
+2013-10-19 Filip Pizlo <[email protected]>
+
Rename RegisterSet to TempRegisterSet
https://bugs.webkit.org/show_bug.cgi?id=123077
Modified: trunk/Source/_javascript_Core/jit/TempRegisterSet.h (157695 => 157696)
--- trunk/Source/_javascript_Core/jit/TempRegisterSet.h 2013-10-20 04:58:04 UTC (rev 157695)
+++ trunk/Source/_javascript_Core/jit/TempRegisterSet.h 2013-10-20 05:40:56 UTC (rev 157696)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,18 +32,9 @@
#include "FPRInfo.h"
#include "GPRInfo.h"
-#include <wtf/Bitmap.h>
namespace JSC {
-static const unsigned totalNumberOfRegisters =
- GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters;
-
-static const unsigned numberOfBytesInTempRegisterSet =
- (totalNumberOfRegisters + 7) >> 3;
-
-typedef uint8_t TempRegisterSetPOD[numberOfBytesInTempRegisterSet];
-
class TempRegisterSet {
public:
TempRegisterSet()
@@ -52,20 +43,6 @@
m_set[i] = 0;
}
- TempRegisterSet(const TempRegisterSetPOD& other)
- {
- for (unsigned i = numberOfBytesInTempRegisterSet; i--;)
- m_set[i] = other[i];
- }
-
- const TempRegisterSetPOD& asPOD() const { return m_set; }
-
- void copyInfo(TempRegisterSetPOD& other) const
- {
- for (unsigned i = numberOfBytesInTempRegisterSet; i--;)
- other[i] = m_set[i];
- }
-
void set(GPRReg reg)
{
setBit(GPRInfo::toIndex(reg));
@@ -201,7 +178,13 @@
return !!(m_set[i >> 3] & (1 << (i & 7)));
}
- TempRegisterSetPOD m_set;
+ static const unsigned totalNumberOfRegisters =
+ GPRInfo::numberOfRegisters + FPRInfo::numberOfRegisters;
+
+ static const unsigned numberOfBytesInTempRegisterSet =
+ (totalNumberOfRegisters + 7) >> 3;
+
+ uint8_t m_set[numberOfBytesInTempRegisterSet];
};
} // namespace JSC
@@ -210,11 +193,10 @@
namespace JSC {
-// Define TempRegisterSetPOD to something that is a POD, but is otherwise useless,
-// to make it easier to refer to this type in code that may be compiled when
-// the DFG is disabled.
+// Define TempRegisterSet to something, to make it easier to refer to this type in code that
+// make be compiled when the JIT is disabled.
-struct TempRegisterSetPOD { };
+struct TempRegisterSet { };
} // namespace JSC
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes