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

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

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments Created 5 years, 3 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/instructions_arm.h » ('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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 void Add(RawFunction* func) { 86 void Add(RawFunction* func) {
87 skipped_code_functions_.Add(func); 87 skipped_code_functions_.Add(func);
88 } 88 }
89 89
90 void DetachCode() { 90 void DetachCode() {
91 intptr_t unoptimized_code_count = 0; 91 intptr_t unoptimized_code_count = 0;
92 intptr_t current_code_count = 0; 92 intptr_t current_code_count = 0;
93 for (int i = 0; i < skipped_code_functions_.length(); i++) { 93 for (int i = 0; i < skipped_code_functions_.length(); i++) {
94 RawFunction* func = skipped_code_functions_[i]; 94 RawFunction* func = skipped_code_functions_[i];
95 RawCode* code = func->ptr()->instructions_->ptr()->code_; 95 RawCode* code = func->ptr()->code_;
96 if (!code->IsMarked()) { 96 if (!code->IsMarked()) {
97 // If the code wasn't strongly visited through other references 97 // If the code wasn't strongly visited through other references
98 // after skipping the function's code pointer, then we disconnect the 98 // after skipping the function's code pointer, then we disconnect the
99 // code from the function. 99 // code from the function.
100 func->StorePointer( 100 func->StorePointer(
101 &(func->ptr()->instructions_), 101 &(func->ptr()->code_),
102 StubCode::LazyCompile_entry()->code()->ptr()->instructions_); 102 StubCode::LazyCompile_entry()->code());
103 uword entry_point = StubCode::LazyCompile_entry()->EntryPoint(); 103 uword entry_point = StubCode::LazyCompile_entry()->EntryPoint();
104 func->ptr()->entry_point_ = entry_point; 104 func->ptr()->entry_point_ = entry_point;
105 if (FLAG_log_code_drop) { 105 if (FLAG_log_code_drop) {
106 // NOTE: This code runs while GC is in progress and runs within 106 // NOTE: This code runs while GC is in progress and runs within
107 // a NoHandleScope block. Hence it is not okay to use a regular Zone 107 // a NoHandleScope block. Hence it is not okay to use a regular Zone
108 // or Scope handle. We use a direct stack handle so the raw pointer in 108 // or Scope handle. We use a direct stack handle so the raw pointer in
109 // this handle is not traversed. The use of a handle is mainly to 109 // this handle is not traversed. The use of a handle is mainly to
110 // be able to reuse the handle based code and avoid having to add 110 // be able to reuse the handle based code and avoid having to add
111 // helper functions to the raw object interface. 111 // helper functions to the raw object interface.
112 String name; 112 String name;
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 barrier.Exit(); 711 barrier.Exit();
712 } 712 }
713 delay_set.ClearReferences(); 713 delay_set.ClearReferences();
714 ProcessWeakTables(page_space); 714 ProcessWeakTables(page_space);
715 ProcessObjectIdTable(isolate); 715 ProcessObjectIdTable(isolate);
716 } 716 }
717 Epilogue(isolate, invoke_api_callbacks); 717 Epilogue(isolate, invoke_api_callbacks);
718 } 718 }
719 719
720 } // namespace dart 720 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/instructions_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698