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

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

Issue 2382953004: Revert "Lazy deopt without code patching." (Closed)
Patch Set: Created 4 years, 2 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/thread.h ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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/weak_code.h" 5 #include "vm/weak_code.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 UpdateArrayTo(Object::null_array()); 69 UpdateArrayTo(Object::null_array());
70 // Disable all code on stack. 70 // Disable all code on stack.
71 Code& code = Code::Handle(); 71 Code& code = Code::Handle();
72 { 72 {
73 DartFrameIterator iterator; 73 DartFrameIterator iterator;
74 StackFrame* frame = iterator.NextFrame(); 74 StackFrame* frame = iterator.NextFrame();
75 while (frame != NULL) { 75 while (frame != NULL) {
76 code = frame->LookupDartCode(); 76 code = frame->LookupDartCode();
77 if (IsOptimizedCode(code_objects, code)) { 77 if (IsOptimizedCode(code_objects, code)) {
78 ReportDeoptimization(code); 78 ReportDeoptimization(code);
79 DeoptimizeAt(code, frame); 79 DeoptimizeAt(code, frame->pc());
80 } 80 }
81 frame = iterator.NextFrame(); 81 frame = iterator.NextFrame();
82 } 82 }
83 } 83 }
84 84
85 // Switch functions that use dependent code to unoptimized code. 85 // Switch functions that use dependent code to unoptimized code.
86 WeakProperty& weak_property = WeakProperty::Handle(); 86 WeakProperty& weak_property = WeakProperty::Handle();
87 Object& owner = Object::Handle(); 87 Object& owner = Object::Handle();
88 Function& function = Function::Handle(); 88 Function& function = Function::Handle();
89 for (intptr_t i = 0; i < code_objects.Length(); i++) { 89 for (intptr_t i = 0; i < code_objects.Length(); i++) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Make non-OSR code non-entrant. 126 // Make non-OSR code non-entrant.
127 if (!code.IsDisabled()) { 127 if (!code.IsDisabled()) {
128 ReportSwitchingCode(code); 128 ReportSwitchingCode(code);
129 code.DisableDartCode(); 129 code.DisableDartCode();
130 } 130 }
131 } 131 }
132 } 132 }
133 } 133 }
134 134
135 } // namespace dart 135 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698