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

Unified Diff: runtime/vm/become.cc

Issue 2203733004: Fix clang builds. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/become.cc
diff --git a/runtime/vm/become.cc b/runtime/vm/become.cc
index a037f9d8b846a6ac46dee457ad94a1c4d4190412..accca31f396de7ee188a33f5222d30890d99b211 100644
--- a/runtime/vm/become.cc
+++ b/runtime/vm/become.cc
@@ -152,27 +152,31 @@ class ForwardHeapPointersHandleVisitor : public HandleVisitor {
// which is normally write-protected, so we need to make it temporarily writable
// to forward the pointers. On all other architectures, object pointers are
// accessed through ObjectPools.
+#if defined(TARGET_ARCH_IA32)
class WritableCodeLiteralsScope : public ValueObject {
public:
explicit WritableCodeLiteralsScope(Heap* heap) : heap_(heap) {
-#if defined(TARGET_ARCH_IA32)
if (FLAG_write_protect_code) {
heap_->WriteProtectCode(false);
}
-#endif
}
~WritableCodeLiteralsScope() {
-#if defined(TARGET_ARCH_IA32)
if (FLAG_write_protect_code) {
heap_->WriteProtectCode(true);
}
-#endif
}
private:
Heap* heap_;
};
+#else
+class WritableCodeLiteralsScope : public ValueObject {
+ public:
+ explicit WritableCodeLiteralsScope(Heap* heap) { }
+ ~WritableCodeLiteralsScope() { }
+};
+#endif
void Become::MakeDummyObject(const Instance& instance) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698