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

Side by Side Diff: src/isolate.cc

Issue 2549753002: Store OSR'd optimized code on the native context. (Closed)
Patch Set: Comment response. 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
2825 bool Isolate::IsInAnyContext(Object* object, uint32_t index) { 2845 bool Isolate::IsInAnyContext(Object* object, uint32_t index) {
2826 DisallowHeapAllocation no_gc; 2846 DisallowHeapAllocation no_gc;
2827 Object* context = heap()->native_contexts_list(); 2847 Object* context = heap()->native_contexts_list();
2828 while (!context->IsUndefined(this)) { 2848 while (!context->IsUndefined(this)) {
2829 Context* current_context = Context::cast(context); 2849 Context* current_context = Context::cast(context);
2830 if (current_context->get(index) == object) { 2850 if (current_context->get(index) == object) {
2831 return true; 2851 return true;
2832 } 2852 }
2833 context = current_context->next_context_link(); 2853 context = current_context->next_context_link();
2834 } 2854 }
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
3517 // Then check whether this scope intercepts. 3537 // Then check whether this scope intercepts.
3518 if ((flag & intercept_mask_)) { 3538 if ((flag & intercept_mask_)) {
3519 intercepted_flags_ |= flag; 3539 intercepted_flags_ |= flag;
3520 return true; 3540 return true;
3521 } 3541 }
3522 return false; 3542 return false;
3523 } 3543 }
3524 3544
3525 } // namespace internal 3545 } // namespace internal
3526 } // namespace v8 3546 } // 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