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

Unified Diff: runtime/vm/raw_object.h

Issue 2112043002: Land Ivan's change of 'Remove support for verified memory handling' (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review comments. Created 4 years, 6 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 | « runtime/vm/pages.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 8bd6c0560501c07e38da4f5251a2fcbb27033342..dd8ff93e1b815696a6807b66a15e35acae069840 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -11,7 +11,6 @@
#include "vm/snapshot.h"
#include "vm/token.h"
#include "vm/token_position.h"
-#include "vm/verified_memory.h"
namespace dart {
@@ -572,10 +571,7 @@ CLASS_LIST_TYPED_DATA(DEFINE_IS_CID)
template<typename type>
void StorePointer(type const* addr, type value) {
-#if defined(DEBUG)
- ValidateOverwrittenPointer(*addr);
-#endif // DEBUG
- VerifiedMemory::Write(const_cast<type*>(addr), value);
+ *const_cast<type*>(addr) = value;
// Filter stores based on source and target.
if (!value->IsHeapObject()) return;
if (value->IsNewObject() && this->IsOldObject() &&
@@ -588,27 +584,11 @@ CLASS_LIST_TYPED_DATA(DEFINE_IS_CID)
// Use for storing into an explicitly Smi-typed field of an object
// (i.e., both the previous and new value are Smis).
void StoreSmi(RawSmi* const* addr, RawSmi* value) {
-#if defined(DEBUG)
- ValidateOverwrittenSmi(*addr);
-#endif // DEBUG
// Can't use Contains, as array length is initialized through this method.
ASSERT(reinterpret_cast<uword>(addr) >= RawObject::ToAddr(this));
- VerifiedMemory::Write(const_cast<RawSmi**>(addr), value);
+ *const_cast<RawSmi**>(addr) = value;
}
- void InitializeSmi(RawSmi* const* addr, RawSmi* value) {
- // Can't use Contains, as array length is initialized through this method.
- ASSERT(reinterpret_cast<uword>(addr) >= RawObject::ToAddr(this));
- // This is an initializing store, so any previous content is OK.
- VerifiedMemory::Accept(reinterpret_cast<uword>(addr), kWordSize);
- VerifiedMemory::Write(const_cast<RawSmi**>(addr), value);
- }
-
-#if defined(DEBUG)
- static void ValidateOverwrittenPointer(RawObject* raw);
- static void ValidateOverwrittenSmi(RawSmi* raw);
-#endif // DEBUG
-
friend class Api;
friend class ApiMessageReader; // GetClassId
friend class Serializer; // GetClassId
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698