Update V8 to version 4.1.0.21
This is a cherry-pick of all commits up to and including the
4.1.0.21 cherry-pick in Chromium.
Original commit message:
Version 4.1.0.21 (cherry-pick)
Merged 206e9136bde0f2b5ae8cb77afbb1e7833e5bd412
Unlink pages from the space page list after evacuation.
BUG=430201
LOG=N
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/953813002
Cr-Commit-Position: refs/branch-heads/4.1@{#22}
Cr-Branched-From: 2e08d2a7aa9d65d269d8c57aba82eb38a8cb0a18-refs/heads/candidates@{#25353}
---
FPIIM-449
Change-Id: I8c23c7bbb70772b4858fe8a47b64fa97ee0d1f8c
diff --git a/src/compiler/common-node-cache.h b/src/compiler/common-node-cache.h
index 1ed2b04..7ec70ae 100644
--- a/src/compiler/common-node-cache.h
+++ b/src/compiler/common-node-cache.h
@@ -5,47 +5,67 @@
#ifndef V8_COMPILER_COMMON_NODE_CACHE_H_
#define V8_COMPILER_COMMON_NODE_CACHE_H_
-#include "src/assembler.h"
#include "src/compiler/node-cache.h"
namespace v8 {
namespace internal {
+
+// Forward declarations.
+class ExternalReference;
+
+
namespace compiler {
// Bundles various caches for common nodes.
-class CommonNodeCache FINAL : public ZoneObject {
+class CommonNodeCache FINAL {
public:
explicit CommonNodeCache(Zone* zone) : zone_(zone) {}
+ ~CommonNodeCache() {}
Node** FindInt32Constant(int32_t value) {
- return int32_constants_.Find(zone_, value);
+ return int32_constants_.Find(zone(), value);
+ }
+
+ Node** FindInt64Constant(int64_t value) {
+ return int64_constants_.Find(zone(), value);
+ }
+
+ Node** FindFloat32Constant(float value) {
+ // We canonicalize float constants at the bit representation level.
+ return float32_constants_.Find(zone(), bit_cast<int32_t>(value));
}
Node** FindFloat64Constant(double value) {
// We canonicalize double constants at the bit representation level.
- return float64_constants_.Find(zone_, bit_cast<int64_t>(value));
+ return float64_constants_.Find(zone(), bit_cast<int64_t>(value));
}
- Node** FindExternalConstant(ExternalReference reference) {
- return external_constants_.Find(zone_, reference.address());
- }
+ Node** FindExternalConstant(ExternalReference value);
Node** FindNumberConstant(double value) {
// We canonicalize double constants at the bit representation level.
- return number_constants_.Find(zone_, bit_cast<int64_t>(value));
+ return number_constants_.Find(zone(), bit_cast<int64_t>(value));
}
+ // Return all nodes from the cache.
+ void GetCachedNodes(ZoneVector<Node*>* nodes);
+
Zone* zone() const { return zone_; }
private:
Int32NodeCache int32_constants_;
+ Int64NodeCache int64_constants_;
+ Int32NodeCache float32_constants_;
Int64NodeCache float64_constants_;
- PtrNodeCache external_constants_;
+ IntPtrNodeCache external_constants_;
Int64NodeCache number_constants_;
Zone* zone_;
+
+ DISALLOW_COPY_AND_ASSIGN(CommonNodeCache);
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_COMMON_NODE_CACHE_H_