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

Side by Side Diff: src/contexts-inl.h

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/contexts.cc ('k') | src/debug/debug.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_CONTEXTS_INL_H_ 5 #ifndef V8_CONTEXTS_INL_H_
6 #define V8_CONTEXTS_INL_H_ 6 #define V8_CONTEXTS_INL_H_
7 7
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Map* map = this->map(); 117 Map* map = this->map();
118 return map == map->GetHeap()->module_context_map(); 118 return map == map->GetHeap()->module_context_map();
119 } 119 }
120 120
121 121
122 bool Context::IsScriptContext() { 122 bool Context::IsScriptContext() {
123 Map* map = this->map(); 123 Map* map = this->map();
124 return map == map->GetHeap()->script_context_map(); 124 return map == map->GetHeap()->script_context_map();
125 } 125 }
126 126
127 bool Context::OptimizedCodeMapIsCleared() {
128 return osr_code_table() == GetHeap()->empty_fixed_array();
129 }
130 127
131 bool Context::HasSameSecurityTokenAs(Context* that) { 128 bool Context::HasSameSecurityTokenAs(Context* that) {
132 return this->native_context()->security_token() == 129 return this->native_context()->security_token() ==
133 that->native_context()->security_token(); 130 that->native_context()->security_token();
134 } 131 }
135 132
136 133
137 #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \ 134 #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \
138 void Context::set_##name(type* value) { \ 135 void Context::set_##name(type* value) { \
139 DCHECK(IsNativeContext()); \ 136 DCHECK(IsNativeContext()); \
140 set(index, value); \ 137 set(index, value); \
141 } \ 138 } \
142 bool Context::is_##name(type* value) { \ 139 bool Context::is_##name(type* value) { \
143 DCHECK(IsNativeContext()); \ 140 DCHECK(IsNativeContext()); \
144 return type::cast(get(index)) == value; \ 141 return type::cast(get(index)) == value; \
145 } \ 142 } \
146 type* Context::name() { \ 143 type* Context::name() { \
147 DCHECK(IsNativeContext()); \ 144 DCHECK(IsNativeContext()); \
148 return type::cast(get(index)); \ 145 return type::cast(get(index)); \
149 } 146 }
150 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) 147 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS)
151 #undef NATIVE_CONTEXT_FIELD_ACCESSORS 148 #undef NATIVE_CONTEXT_FIELD_ACCESSORS
152 149
153 150
154 } // namespace internal 151 } // namespace internal
155 } // namespace v8 152 } // namespace v8
156 153
157 #endif // V8_CONTEXTS_INL_H_ 154 #endif // V8_CONTEXTS_INL_H_
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698