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

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

Issue 668193002: Remove isolate pointer from context objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/debugger_mips.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | 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/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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void DetachCode() { 240 void DetachCode() {
241 for (int i = 0; i < skipped_code_functions_.length(); i++) { 241 for (int i = 0; i < skipped_code_functions_.length(); i++) {
242 RawFunction* func = skipped_code_functions_[i]; 242 RawFunction* func = skipped_code_functions_[i];
243 RawCode* code = func->ptr()->instructions_->ptr()->code_; 243 RawCode* code = func->ptr()->instructions_->ptr()->code_;
244 if (!code->IsMarked()) { 244 if (!code->IsMarked()) {
245 // If the code wasn't strongly visited through other references 245 // If the code wasn't strongly visited through other references
246 // after skipping the function's code pointer, then we disconnect the 246 // after skipping the function's code pointer, then we disconnect the
247 // code from the function. 247 // code from the function.
248 StubCode* stub_code = isolate()->stub_code();
248 func->ptr()->instructions_ = 249 func->ptr()->instructions_ =
249 StubCode::LazyCompile_entry()->code()->ptr()->instructions_; 250 stub_code->LazyCompile_entry()->code()->ptr()->instructions_;
250 func->ptr()->unoptimized_code_ = Code::null(); 251 func->ptr()->unoptimized_code_ = Code::null();
251 if (FLAG_log_code_drop) { 252 if (FLAG_log_code_drop) {
252 // NOTE: This code runs while GC is in progress and runs within 253 // NOTE: This code runs while GC is in progress and runs within
253 // a NoHandleScope block. Hence it is not okay to use a regular Zone 254 // a NoHandleScope block. Hence it is not okay to use a regular Zone
254 // or Scope handle. We use a direct stack handle so the raw pointer in 255 // or Scope handle. We use a direct stack handle so the raw pointer in
255 // this handle is not traversed. The use of a handle is mainly to 256 // this handle is not traversed. The use of a handle is mainly to
256 // be able to reuse the handle based code and avoid having to add 257 // be able to reuse the handle based code and avoid having to add
257 // helper functions to the raw object interface. 258 // helper functions to the raw object interface.
258 String name; 259 String name;
259 name = func->ptr()->name_; 260 name = func->ptr()->name_;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 MarkingWeakVisitor mark_weak; 509 MarkingWeakVisitor mark_weak;
509 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); 510 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
510 mark.Finalize(); 511 mark.Finalize();
511 ProcessWeakTables(page_space); 512 ProcessWeakTables(page_space);
512 ProcessObjectIdTable(isolate); 513 ProcessObjectIdTable(isolate);
513 514
514 Epilogue(isolate, invoke_api_callbacks); 515 Epilogue(isolate, invoke_api_callbacks);
515 } 516 }
516 517
517 } // namespace dart 518 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger_mips.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698