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

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

Issue 2743903002: Revert "Do not rely on code patching on DBC for lazy deoptimization." (Closed)
Patch Set: Created 3 years, 9 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/instructions_dbc.cc ('k') | runtime/vm/simulator_dbc.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/text_buffer.h" 10 #include "platform/text_buffer.h"
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 delete old_pending_deopts; 1938 delete old_pending_deopts;
1939 } 1939 }
1940 1940
1941 1941
1942 uword Isolate::FindPendingDeopt(uword fp) const { 1942 uword Isolate::FindPendingDeopt(uword fp) const {
1943 for (intptr_t i = 0; i < pending_deopts_->length(); i++) { 1943 for (intptr_t i = 0; i < pending_deopts_->length(); i++) {
1944 if ((*pending_deopts_)[i].fp() == fp) { 1944 if ((*pending_deopts_)[i].fp() == fp) {
1945 return (*pending_deopts_)[i].pc(); 1945 return (*pending_deopts_)[i].pc();
1946 } 1946 }
1947 } 1947 }
1948 FATAL1("Missing pending deopt entry for fp=%" Pp "", fp); 1948 FATAL("Missing pending deopt entry");
1949 return 0; 1949 return 0;
1950 } 1950 }
1951 1951
1952 1952
1953 void Isolate::ClearPendingDeoptsAtOrBelow(uword fp) const { 1953 void Isolate::ClearPendingDeoptsAtOrBelow(uword fp) const {
1954 for (intptr_t i = pending_deopts_->length() - 1; i >= 0; i--) { 1954 for (intptr_t i = pending_deopts_->length() - 1; i >= 0; i--) {
1955 uword deopt_fp = (*pending_deopts_)[i].fp(); 1955 if ((*pending_deopts_)[i].fp() <= fp) {
1956 if ((fp == deopt_fp) || IsCalleeFrameOf(fp, deopt_fp)) {
1957 pending_deopts_->RemoveAt(i); 1956 pending_deopts_->RemoveAt(i);
1958 } 1957 }
1959 } 1958 }
1960 } 1959 }
1961 1960
1962 1961
1963 #ifndef PRODUCT 1962 #ifndef PRODUCT
1964 static const char* ExceptionPauseInfoToServiceEnum(Dart_ExceptionPauseInfo pi) { 1963 static const char* ExceptionPauseInfoToServiceEnum(Dart_ExceptionPauseInfo pi) {
1965 switch (pi) { 1964 switch (pi) {
1966 case kPauseOnAllExceptions: 1965 case kPauseOnAllExceptions:
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
2950 void IsolateSpawnState::DecrementSpawnCount() { 2949 void IsolateSpawnState::DecrementSpawnCount() {
2951 ASSERT(spawn_count_monitor_ != NULL); 2950 ASSERT(spawn_count_monitor_ != NULL);
2952 ASSERT(spawn_count_ != NULL); 2951 ASSERT(spawn_count_ != NULL);
2953 MonitorLocker ml(spawn_count_monitor_); 2952 MonitorLocker ml(spawn_count_monitor_);
2954 ASSERT(*spawn_count_ > 0); 2953 ASSERT(*spawn_count_ > 0);
2955 *spawn_count_ = *spawn_count_ - 1; 2954 *spawn_count_ = *spawn_count_ - 1;
2956 ml.Notify(); 2955 ml.Notify();
2957 } 2956 }
2958 2957
2959 } // namespace dart 2958 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/instructions_dbc.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698