Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: src/assembler.h

Issue 609843002: Refactor FrameAndConstantPoolScope and ConstantPoolUnavailableScope to be architecture independent (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Eliminate unreachable paths. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 5152fdc18291f7deb592ca85bde186d476139341..b8d55b04243ea8f3bbdb124c2a9720c03ff65b70 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -79,6 +79,16 @@ class AssemblerBase: public Malloced {
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 @@ class AssemblerBase: public Malloced {
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 @@ class AssemblerBase: public Malloced {
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;
};
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698