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

Side by Side Diff: runtime/vm/raw_object.cc

Issue 143263012: Ensure the debugger keeps a reference to code objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/raw_object.h" 5 #include "vm/raw_object.h"
6 6
7 #include "vm/class_table.h" 7 #include "vm/class_table.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/freelist.h" 9 #include "vm/freelist.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // helper functions to the raw object interface. 382 // helper functions to the raw object interface.
383 Function fn; 383 Function fn;
384 fn = raw_fun; 384 fn = raw_fun;
385 385
386 Code code; 386 Code code;
387 code = fn.CurrentCode(); 387 code = fn.CurrentCode();
388 388
389 if (!code.IsNull() && // The function may not have code. 389 if (!code.IsNull() && // The function may not have code.
390 !code.is_optimized() && 390 !code.is_optimized() &&
391 (fn.CurrentCode() == fn.unoptimized_code()) && 391 (fn.CurrentCode() == fn.unoptimized_code()) &&
392 !fn.HasBreakpoint() && 392 !code.HasBreakpoint() &&
393 (fn.usage_counter() >= 0)) { 393 (fn.usage_counter() >= 0)) {
394 fn.set_usage_counter(fn.usage_counter() / 2); 394 fn.set_usage_counter(fn.usage_counter() / 2);
395 if (FLAG_always_drop_code || (fn.usage_counter() == 0)) { 395 if (FLAG_always_drop_code || (fn.usage_counter() == 0)) {
396 return true; 396 return true;
397 } 397 }
398 } 398 }
399 return false; 399 return false;
400 } 400 }
401 401
402 402
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 843
844 intptr_t RawMirrorReference::VisitMirrorReferencePointers( 844 intptr_t RawMirrorReference::VisitMirrorReferencePointers(
845 RawMirrorReference* raw_obj, ObjectPointerVisitor* visitor) { 845 RawMirrorReference* raw_obj, ObjectPointerVisitor* visitor) {
846 // Make sure that we got here with the tagged pointer as this. 846 // Make sure that we got here with the tagged pointer as this.
847 ASSERT(raw_obj->IsHeapObject()); 847 ASSERT(raw_obj->IsHeapObject());
848 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 848 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
849 return MirrorReference::InstanceSize(); 849 return MirrorReference::InstanceSize();
850 } 850 }
851 851
852 } // namespace dart 852 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698