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

Unified Diff: runtime/vm/assembler.cc

Issue 1846063002: - Fix the hash code for raw objects that are added into the object pool (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix Created 4 years, 9 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/assembler.h ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler.cc
diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc
index 318881cba119edc4248368283000f255d8ba0475..fe775bf7775b70205ad546f03d19843554a6eaaa 100644
--- a/runtime/vm/assembler.cc
+++ b/runtime/vm/assembler.cc
@@ -244,6 +244,7 @@ const Code::Comments& Assembler::GetCodeComments() const {
intptr_t ObjectPoolWrapper::AddObject(const Object& obj,
Patchability patchable) {
+ ASSERT(obj.IsNotTemporaryScopedHandle());
return AddObject(ObjectPoolWrapperEntry(&obj), patchable);
}
@@ -255,6 +256,10 @@ intptr_t ObjectPoolWrapper::AddImmediate(uword imm) {
intptr_t ObjectPoolWrapper::AddObject(ObjectPoolWrapperEntry entry,
Patchability patchable) {
+ ASSERT((entry.type_ != ObjectPool::kTaggedObject) ||
+ (entry.obj_->IsNotTemporaryScopedHandle() &&
+ (entry.equivalence_ == NULL ||
+ entry.equivalence_->IsNotTemporaryScopedHandle())));
object_pool_.Add(entry);
if (patchable == kNotPatchable) {
// The object isn't patchable. Record the index for fast lookup.
@@ -275,7 +280,6 @@ intptr_t ObjectPoolWrapper::FindObject(ObjectPoolWrapperEntry entry,
return idx;
}
}
-
return AddObject(entry, patchable);
}
@@ -288,8 +292,7 @@ intptr_t ObjectPoolWrapper::FindObject(const Object& obj,
intptr_t ObjectPoolWrapper::FindObject(const Object& obj,
const Object& equivalence) {
- return FindObject(ObjectPoolWrapperEntry(&obj, &equivalence),
- kNotPatchable);
+ return FindObject(ObjectPoolWrapperEntry(&obj, &equivalence), kNotPatchable);
}
« no previous file with comments | « runtime/vm/assembler.h ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698