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

Unified Diff: runtime/vm/megamorphic_cache_table.cc

Issue 70183010: Fixes a couple problems with GC of unoptimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/megamorphic_cache_table.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/megamorphic_cache_table.cc
===================================================================
--- runtime/vm/megamorphic_cache_table.cc (revision 30598)
+++ runtime/vm/megamorphic_cache_table.cc (working copy)
@@ -12,7 +12,8 @@
namespace dart {
MegamorphicCacheTable::MegamorphicCacheTable()
- : miss_handler_(NULL),
+ : miss_handler_function_(NULL),
+ miss_handler_code_(NULL),
capacity_(0),
length_(0),
table_(NULL) {
@@ -65,14 +66,16 @@
false, // Not external.
cls,
0)); // No token position.
+ miss_handler_code_ = code.raw();
+ miss_handler_function_ = function.raw();
function.SetCode(code);
- miss_handler_ = function.raw();
}
void MegamorphicCacheTable::VisitObjectPointers(ObjectPointerVisitor* v) {
ASSERT(v != NULL);
- v->VisitPointer(reinterpret_cast<RawObject**>(&miss_handler_));
+ v->VisitPointer(reinterpret_cast<RawObject**>(&miss_handler_code_));
+ v->VisitPointer(reinterpret_cast<RawObject**>(&miss_handler_function_));
for (intptr_t i = 0; i < length_; ++i) {
v->VisitPointer(reinterpret_cast<RawObject**>(&table_[i].name));
v->VisitPointer(reinterpret_cast<RawObject**>(&table_[i].descriptor));
« no previous file with comments | « runtime/vm/megamorphic_cache_table.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698