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

Side by Side Diff: src/isolate.cc

Issue 2561083002: Reland Store OSR'd optimized code on the native context. (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 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 Context* current_context = Context::cast(context); 2814 Context* current_context = Context::cast(context);
2815 if (current_context->initial_object_prototype() == object || 2815 if (current_context->initial_object_prototype() == object ||
2816 current_context->initial_array_prototype() == object) { 2816 current_context->initial_array_prototype() == object) {
2817 return true; 2817 return true;
2818 } 2818 }
2819 context = current_context->next_context_link(); 2819 context = current_context->next_context_link();
2820 } 2820 }
2821 return false; 2821 return false;
2822 } 2822 }
2823 2823
2824 void Isolate::ClearOSROptimizedCode() {
2825 DisallowHeapAllocation no_gc;
2826 Object* context = heap()->native_contexts_list();
2827 while (!context->IsUndefined(this)) {
2828 Context* current_context = Context::cast(context);
2829 current_context->ClearOptimizedCodeMap();
2830 context = current_context->next_context_link();
2831 }
2832 }
2833
2834 void Isolate::EvictOSROptimizedCode(Code* code, const char* reason) {
2835 DisallowHeapAllocation no_gc;
2836 Object* context = heap()->native_contexts_list();
2837 while (!context->IsUndefined(this)) {
2838 Context* current_context = Context::cast(context);
2839 current_context->EvictFromOptimizedCodeMap(code, reason);
2840 context = current_context->next_context_link();
2841 }
2842 }
2843
2824 bool Isolate::IsInAnyContext(Object* object, uint32_t index) { 2844 bool Isolate::IsInAnyContext(Object* object, uint32_t index) {
2825 DisallowHeapAllocation no_gc; 2845 DisallowHeapAllocation no_gc;
2826 Object* context = heap()->native_contexts_list(); 2846 Object* context = heap()->native_contexts_list();
2827 while (!context->IsUndefined(this)) { 2847 while (!context->IsUndefined(this)) {
2828 Context* current_context = Context::cast(context); 2848 Context* current_context = Context::cast(context);
2829 if (current_context->get(index) == object) { 2849 if (current_context->get(index) == object) {
2830 return true; 2850 return true;
2831 } 2851 }
2832 context = current_context->next_context_link(); 2852 context = current_context->next_context_link();
2833 } 2853 }
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 // Then check whether this scope intercepts. 3536 // Then check whether this scope intercepts.
3517 if ((flag & intercept_mask_)) { 3537 if ((flag & intercept_mask_)) {
3518 intercepted_flags_ |= flag; 3538 intercepted_flags_ |= flag;
3519 return true; 3539 return true;
3520 } 3540 }
3521 return false; 3541 return false;
3522 } 3542 }
3523 3543
3524 } // namespace internal 3544 } // namespace internal
3525 } // namespace v8 3545 } // 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