/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#if ENABLE(FTL_JIT)
+#include "DFGNode.h"
#include "JITInlineCacheGenerator.h"
#include "MacroAssembler.h"
namespace JSC { namespace FTL {
+using namespace DFG;
+
// The default sizes are x86-64-specific, and were found empirically. They have to cover the worst
// possible combination of registers leading to the largest possible encoding of each instruction in
// the IC.
#endif
}
+size_t sizeOfCallVarargs()
+{
+#if CPU(ARM64)
+ return 332;
+#else
+ return 275;
+#endif
+}
+
+size_t sizeOfCallForwardVarargs()
+{
+#if CPU(ARM64)
+ return 312;
+#else
+ return 262;
+#endif
+}
+
+size_t sizeOfConstructVarargs()
+{
+ return sizeOfCallVarargs(); // Should be the same size.
+}
+
+size_t sizeOfConstructForwardVarargs()
+{
+ return sizeOfCallForwardVarargs(); // Should be the same size.
+}
+
+size_t sizeOfIn()
+{
+#if CPU(ARM64)
+ return 4;
+#else
+ return 5;
+#endif
+}
+
+size_t sizeOfICFor(Node* node)
+{
+ switch (node->op()) {
+ case GetById:
+ return sizeOfGetById();
+ case PutById:
+ return sizeOfPutById();
+ case Call:
+ case Construct:
+ return sizeOfCall();
+ case CallVarargs:
+ return sizeOfCallVarargs();
+ case CallForwardVarargs:
+ return sizeOfCallForwardVarargs();
+ case ConstructVarargs:
+ return sizeOfConstructVarargs();
+ case ConstructForwardVarargs:
+ return sizeOfConstructForwardVarargs();
+ case In:
+ return sizeOfIn();
+ default:
+ return 0;
+ }
+}
+
} } // namespace JSC::FTL
#endif // ENABLE(FTL_JIT)