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

Side by Side Diff: vm/scavenger.cc

Issue 10052027: Add fast paths for Smi values in the dart embedding api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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
« vm/handles.h ('K') | « vm/raw_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include "vm/dart.h" 7 #include "vm/dart.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // the API callbacks should be invoked. 348 // the API callbacks should be invoked.
349 Scavenge(false); 349 Scavenge(false);
350 } 350 }
351 351
352 352
353 void Scavenger::Scavenge(bool invoke_api_callbacks) { 353 void Scavenger::Scavenge(bool invoke_api_callbacks) {
354 // Scavenging is not reentrant. Make sure that is the case. 354 // Scavenging is not reentrant. Make sure that is the case.
355 ASSERT(!scavenging_); 355 ASSERT(!scavenging_);
356 scavenging_ = true; 356 scavenging_ = true;
357 Isolate* isolate = Isolate::Current(); 357 Isolate* isolate = Isolate::Current();
358 NoHandleScope no_handles(isolate); 358 NOHANDLESCOPE(isolate);
359 359
360 if (FLAG_verify_before_gc) { 360 if (FLAG_verify_before_gc) {
361 OS::PrintErr("Verifying before Scavenge... "); 361 OS::PrintErr("Verifying before Scavenge... ");
362 heap_->Verify(); 362 heap_->Verify();
363 OS::PrintErr(" done.\n"); 363 OS::PrintErr(" done.\n");
364 } 364 }
365 365
366 Timer timer(FLAG_verbose_gc, "Scavenge"); 366 Timer timer(FLAG_verbose_gc, "Scavenge");
367 timer.Start(); 367 timer.Start();
368 // Setup the visitor and run a scavenge. 368 // Setup the visitor and run a scavenge.
(...skipping 16 matching lines...) Expand all
385 OS::PrintErr(" done.\n"); 385 OS::PrintErr(" done.\n");
386 } 386 }
387 387
388 count_++; 388 count_++;
389 // Done scavenging. Reset the marker. 389 // Done scavenging. Reset the marker.
390 ASSERT(scavenging_); 390 ASSERT(scavenging_);
391 scavenging_ = false; 391 scavenging_ = false;
392 } 392 }
393 393
394 } // namespace dart 394 } // namespace dart
OLDNEW
« vm/handles.h ('K') | « vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698