| OLD | NEW |
| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 for (int i = 0; i < skipped_code_functions_.length(); i++) { | 289 for (int i = 0; i < skipped_code_functions_.length(); i++) { |
| 290 RawFunction* func = skipped_code_functions_[i]; | 290 RawFunction* func = skipped_code_functions_[i]; |
| 291 RawCode* code = func->ptr()->instructions_->ptr()->code_; | 291 RawCode* code = func->ptr()->instructions_->ptr()->code_; |
| 292 if (!code->IsMarked()) { | 292 if (!code->IsMarked()) { |
| 293 // If the code wasn't strongly visited through other references | 293 // If the code wasn't strongly visited through other references |
| 294 // after skipping the function's code pointer, then we disconnect the | 294 // after skipping the function's code pointer, then we disconnect the |
| 295 // code from the function. | 295 // code from the function. |
| 296 func->StorePointer( | 296 func->StorePointer( |
| 297 &(func->ptr()->instructions_), | 297 &(func->ptr()->instructions_), |
| 298 StubCode::LazyCompile_entry()->code()->ptr()->instructions_); | 298 StubCode::LazyCompile_entry()->code()->ptr()->instructions_); |
| 299 uword entry_point = StubCode::LazyCompile_entry()->EntryPoint(); |
| 300 func->ptr()->entry_point_ = entry_point; |
| 301 |
| 299 if (FLAG_log_code_drop) { | 302 if (FLAG_log_code_drop) { |
| 300 // NOTE: This code runs while GC is in progress and runs within | 303 // NOTE: This code runs while GC is in progress and runs within |
| 301 // a NoHandleScope block. Hence it is not okay to use a regular Zone | 304 // a NoHandleScope block. Hence it is not okay to use a regular Zone |
| 302 // or Scope handle. We use a direct stack handle so the raw pointer in | 305 // or Scope handle. We use a direct stack handle so the raw pointer in |
| 303 // this handle is not traversed. The use of a handle is mainly to | 306 // this handle is not traversed. The use of a handle is mainly to |
| 304 // be able to reuse the handle based code and avoid having to add | 307 // be able to reuse the handle based code and avoid having to add |
| 305 // helper functions to the raw object interface. | 308 // helper functions to the raw object interface. |
| 306 String name; | 309 String name; |
| 307 name = func->ptr()->name_; | 310 name = func->ptr()->name_; |
| 308 ISL_Print("Detaching code: %s\n", name.ToCString()); | 311 ISL_Print("Detaching code: %s\n", name.ToCString()); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 marked_bytes_ = mark.marked_bytes(); | 548 marked_bytes_ = mark.marked_bytes(); |
| 546 mark.Finalize(); | 549 mark.Finalize(); |
| 547 delay_set.ClearReferences(); | 550 delay_set.ClearReferences(); |
| 548 ProcessWeakTables(page_space); | 551 ProcessWeakTables(page_space); |
| 549 ProcessObjectIdTable(isolate); | 552 ProcessObjectIdTable(isolate); |
| 550 } | 553 } |
| 551 Epilogue(isolate, invoke_api_callbacks); | 554 Epilogue(isolate, invoke_api_callbacks); |
| 552 } | 555 } |
| 553 | 556 |
| 554 } // namespace dart | 557 } // namespace dart |
| OLD | NEW |