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

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

Issue 1247783002: Make array allocation stub shared between isolates. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
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/gc_marker.h" 5 #include "vm/gc_marker.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 void DetachCode() { 310 void DetachCode() {
311 intptr_t unoptimized_code_count = 0; 311 intptr_t unoptimized_code_count = 0;
312 intptr_t current_code_count = 0; 312 intptr_t current_code_count = 0;
313 for (int i = 0; i < skipped_code_functions_.length(); i++) { 313 for (int i = 0; i < skipped_code_functions_.length(); i++) {
314 RawFunction* func = skipped_code_functions_[i]; 314 RawFunction* func = skipped_code_functions_[i];
315 RawCode* code = func->ptr()->instructions_->ptr()->code_; 315 RawCode* code = func->ptr()->instructions_->ptr()->code_;
316 if (!code->IsMarked()) { 316 if (!code->IsMarked()) {
317 // If the code wasn't strongly visited through other references 317 // If the code wasn't strongly visited through other references
318 // after skipping the function's code pointer, then we disconnect the 318 // after skipping the function's code pointer, then we disconnect the
319 // code from the function. 319 // code from the function.
320 StubCode* stub_code = isolate()->stub_code();
321 func->StorePointer( 320 func->StorePointer(
322 &(func->ptr()->instructions_), 321 &(func->ptr()->instructions_),
323 stub_code->LazyCompile_entry()->code()->ptr()->instructions_); 322 StubCode::LazyCompile_entry()->code()->ptr()->instructions_);
324 if (FLAG_log_code_drop) { 323 if (FLAG_log_code_drop) {
325 // NOTE: This code runs while GC is in progress and runs within 324 // NOTE: This code runs while GC is in progress and runs within
326 // a NoHandleScope block. Hence it is not okay to use a regular Zone 325 // a NoHandleScope block. Hence it is not okay to use a regular Zone
327 // or Scope handle. We use a direct stack handle so the raw pointer in 326 // or Scope handle. We use a direct stack handle so the raw pointer in
328 // this handle is not traversed. The use of a handle is mainly to 327 // this handle is not traversed. The use of a handle is mainly to
329 // be able to reuse the handle based code and avoid having to add 328 // be able to reuse the handle based code and avoid having to add
330 // helper functions to the raw object interface. 329 // helper functions to the raw object interface.
331 String name; 330 String name;
332 name = func->ptr()->name_; 331 name = func->ptr()->name_;
333 ISL_Print("Detaching code: %s\n", name.ToCString()); 332 ISL_Print("Detaching code: %s\n", name.ToCString());
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); 589 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
591 mark.Finalize(); 590 mark.Finalize();
592 delay_set.ClearReferences(); 591 delay_set.ClearReferences();
593 ProcessWeakTables(page_space); 592 ProcessWeakTables(page_space);
594 ProcessObjectIdTable(isolate); 593 ProcessObjectIdTable(isolate);
595 } 594 }
596 Epilogue(isolate, invoke_api_callbacks); 595 Epilogue(isolate, invoke_api_callbacks);
597 } 596 }
598 597
599 } // namespace dart 598 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698