Title: [195365] trunk/Source/_javascript_Core
- Revision
- 195365
- Author
- akl...@apple.com
- Date
- 2016-01-20 12:27:01 -0800 (Wed, 20 Jan 2016)
Log Message
Pack RegisterAtOffset harder.
<https://webkit.org/b/152501>
Reviewed by Michael Saboff.
Pack the register index and the offset into a single pointer-sized word instead of two.
This reduces memory consumption by 620 kB on mobile theverge.com.
The packing doesn't succeed on MSVC for some reason, so I've left out the static
assertion about class size in those builds.
* jit/RegisterAtOffset.cpp:
* jit/RegisterAtOffset.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (195364 => 195365)
--- trunk/Source/_javascript_Core/ChangeLog 2016-01-20 20:02:15 UTC (rev 195364)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-01-20 20:27:01 UTC (rev 195365)
@@ -1,3 +1,19 @@
+2016-01-20 Andreas Kling <akl...@apple.com>
+
+ Pack RegisterAtOffset harder.
+ <https://webkit.org/b/152501>
+
+ Reviewed by Michael Saboff.
+
+ Pack the register index and the offset into a single pointer-sized word instead of two.
+ This reduces memory consumption by 620 kB on mobile theverge.com.
+
+ The packing doesn't succeed on MSVC for some reason, so I've left out the static
+ assertion about class size in those builds.
+
+ * jit/RegisterAtOffset.cpp:
+ * jit/RegisterAtOffset.h:
+
2016-01-20 Per Arne Vollan <pe...@outlook.com>
[B3][Win64] Compile fix.
Modified: trunk/Source/_javascript_Core/jit/RegisterAtOffset.cpp (195364 => 195365)
--- trunk/Source/_javascript_Core/jit/RegisterAtOffset.cpp 2016-01-20 20:02:15 UTC (rev 195364)
+++ trunk/Source/_javascript_Core/jit/RegisterAtOffset.cpp 2016-01-20 20:27:01 UTC (rev 195365)
@@ -30,6 +30,10 @@
namespace JSC {
+#if !COMPILER(MSVC)
+static_assert(sizeof(RegisterAtOffset) == sizeof(ptrdiff_t), "RegisterAtOffset should be small.");
+#endif
+
void RegisterAtOffset::dump(PrintStream& out) const
{
out.print(reg(), " at ", offset());
Modified: trunk/Source/_javascript_Core/jit/RegisterAtOffset.h (195364 => 195365)
--- trunk/Source/_javascript_Core/jit/RegisterAtOffset.h 2016-01-20 20:02:15 UTC (rev 195364)
+++ trunk/Source/_javascript_Core/jit/RegisterAtOffset.h 2016-01-20 20:27:01 UTC (rev 195365)
@@ -70,7 +70,7 @@
private:
Reg m_reg;
- ptrdiff_t m_offset;
+ ptrdiff_t m_offset : sizeof(ptrdiff_t) * 8 - sizeof(Reg) * 8;
};
} // namespace JSC
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes