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

Side by Side Diff: src/isolate.cc

Issue 2562623003: Revert of Store OSR'd optimized code on the native context. (patchset #8 id:140001 of https://coder… (Closed)
Patch Set: Created 4 years 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 | « src/isolate.h ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2815 Context* current_context = Context::cast(context); 2815 Context* current_context = Context::cast(context);
2816 if (current_context->initial_object_prototype() == object || 2816 if (current_context->initial_object_prototype() == object ||
2817 current_context->initial_array_prototype() == object) { 2817 current_context->initial_array_prototype() == object) {
2818 return true; 2818 return true;
2819 } 2819 }
2820 context = current_context->next_context_link(); 2820 context = current_context->next_context_link();
2821 } 2821 }
2822 return false; 2822 return false;
2823 } 2823 }
2824 2824
2825 void Isolate::ClearOSROptimizedCode() {
2826 DisallowHeapAllocation no_gc;
2827 Object* context = heap()->native_contexts_list();
2828 while (!context->IsUndefined(this)) {
2829 Context* current_context = Context::cast(context);
2830 current_context->ClearOptimizedCodeMap();
2831 context = current_context->next_context_link();
2832 }
2833 }
2834
2835 void Isolate::EvictOSROptimizedCode(Code* code, const char* reason) {
2836 DisallowHeapAllocation no_gc;
2837 Object* context = heap()->native_contexts_list();
2838 while (!context->IsUndefined(this)) {
2839 Context* current_context = Context::cast(context);
2840 current_context->EvictFromOptimizedCodeMap(code, reason);
2841 context = current_context->next_context_link();
2842 }
2843 }
2844
2845 bool Isolate::IsInAnyContext(Object* object, uint32_t index) { 2825 bool Isolate::IsInAnyContext(Object* object, uint32_t index) {
2846 DisallowHeapAllocation no_gc; 2826 DisallowHeapAllocation no_gc;
2847 Object* context = heap()->native_contexts_list(); 2827 Object* context = heap()->native_contexts_list();
2848 while (!context->IsUndefined(this)) { 2828 while (!context->IsUndefined(this)) {
2849 Context* current_context = Context::cast(context); 2829 Context* current_context = Context::cast(context);
2850 if (current_context->get(index) == object) { 2830 if (current_context->get(index) == object) {
2851 return true; 2831 return true;
2852 } 2832 }
2853 context = current_context->next_context_link(); 2833 context = current_context->next_context_link();
2854 } 2834 }
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
3537 // Then check whether this scope intercepts. 3517 // Then check whether this scope intercepts.
3538 if ((flag & intercept_mask_)) { 3518 if ((flag & intercept_mask_)) {
3539 intercepted_flags_ |= flag; 3519 intercepted_flags_ |= flag;
3540 return true; 3520 return true;
3541 } 3521 }
3542 return false; 3522 return false;
3543 } 3523 }
3544 3524
3545 } // namespace internal 3525 } // namespace internal
3546 } // namespace v8 3526 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698