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/assembler.h b/src/assembler.h
index 3d2f7d9..e95b7ed 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -41,7 +41,7 @@
#include "src/builtins.h"
#include "src/gdb-jit.h"
#include "src/isolate.h"
-#include "src/runtime.h"
+#include "src/runtime/runtime.h"
#include "src/token.h"
namespace v8 {
@@ -79,6 +79,16 @@
return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0;
}
+ bool is_ool_constant_pool_available() const {
+ if (FLAG_enable_ool_constant_pool) {
+ return ool_constant_pool_available_;
+ } else {
+ // Out-of-line constant pool not supported on this architecture.
+ UNREACHABLE();
+ return false;
+ }
+ }
+
// Overwrite a host NaN with a quiet target NaN. Used by mksnapshot for
// cross-snapshotting.
static void QuietNaN(HeapObject* nan) { }
@@ -98,6 +108,15 @@
int buffer_size_;
bool own_buffer_;
+ void set_ool_constant_pool_available(bool available) {
+ if (FLAG_enable_ool_constant_pool) {
+ ool_constant_pool_available_ = available;
+ } else {
+ // Out-of-line constant pool not supported on this architecture.
+ UNREACHABLE();
+ }
+ }
+
// The program counter, which points into the buffer above and moves forward.
byte* pc_;
@@ -108,6 +127,14 @@
bool emit_debug_code_;
bool predictable_code_size_;
bool serializer_enabled_;
+
+ // Indicates whether the constant pool can be accessed, which is only possible
+ // if the pp register points to the current code object's constant pool.
+ bool ool_constant_pool_available_;
+
+ // Constant pool.
+ friend class FrameAndConstantPoolScope;
+ friend class ConstantPoolUnavailableScope;
};
@@ -216,7 +243,7 @@
// unknown pc location. Assembler::bind() is used to bind a label to the
// current pc. A label can be bound only once.
-class Label BASE_EMBEDDED {
+class Label {
public:
enum Distance {
kNear, kFar
@@ -578,7 +605,7 @@
#ifdef ENABLE_DISASSEMBLER
// Printing
static const char* RelocModeName(Mode rmode);
- void Print(Isolate* isolate, OStream& os); // NOLINT
+ void Print(Isolate* isolate, std::ostream& os); // NOLINT
#endif // ENABLE_DISASSEMBLER
#ifdef VERIFY_HEAP
void Verify(Isolate* isolate);
@@ -959,14 +986,6 @@
static ExternalReference stress_deopt_count(Isolate* isolate);
- bool operator==(const ExternalReference& other) const {
- return address_ == other.address_;
- }
-
- bool operator!=(const ExternalReference& other) const {
- return !(*this == other);
- }
-
private:
explicit ExternalReference(void* address)
: address_(address) {}
@@ -987,6 +1006,13 @@
void* address_;
};
+bool operator==(ExternalReference, ExternalReference);
+bool operator!=(ExternalReference, ExternalReference);
+
+size_t hash_value(ExternalReference);
+
+std::ostream& operator<<(std::ostream&, ExternalReference);
+
// -----------------------------------------------------------------------------
// Position recording support