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

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

Issue 2081733004: Rip out most of our outdated modules implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « src/contexts.h ('k') | src/crankshaft/hydrogen.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 bool Context::has_extension() { return !extension()->IsTheHole(GetIsolate()); } 61 bool Context::has_extension() { return !extension()->IsTheHole(GetIsolate()); }
62 HeapObject* Context::extension() { 62 HeapObject* Context::extension() {
63 return HeapObject::cast(get(EXTENSION_INDEX)); 63 return HeapObject::cast(get(EXTENSION_INDEX));
64 } 64 }
65 void Context::set_extension(HeapObject* object) { 65 void Context::set_extension(HeapObject* object) {
66 set(EXTENSION_INDEX, object); 66 set(EXTENSION_INDEX, object);
67 } 67 }
68 68
69 69
70 JSModule* Context::module() { return JSModule::cast(get(EXTENSION_INDEX)); }
71 void Context::set_module(JSModule* module) { set(EXTENSION_INDEX, module); }
72
73
74 Context* Context::native_context() { 70 Context* Context::native_context() {
75 Object* result = get(NATIVE_CONTEXT_INDEX); 71 Object* result = get(NATIVE_CONTEXT_INDEX);
76 DCHECK(IsBootstrappingOrNativeContext(this->GetIsolate(), result)); 72 DCHECK(IsBootstrappingOrNativeContext(this->GetIsolate(), result));
77 return reinterpret_cast<Context*>(result); 73 return reinterpret_cast<Context*>(result);
78 } 74 }
79 75
80 76
81 void Context::set_native_context(Context* context) { 77 void Context::set_native_context(Context* context) {
82 set(NATIVE_CONTEXT_INDEX, context); 78 set(NATIVE_CONTEXT_INDEX, context);
83 } 79 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return type::cast(get(index)); \ 145 return type::cast(get(index)); \
150 } 146 }
151 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) 147 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS)
152 #undef NATIVE_CONTEXT_FIELD_ACCESSORS 148 #undef NATIVE_CONTEXT_FIELD_ACCESSORS
153 149
154 150
155 } // namespace internal 151 } // namespace internal
156 } // namespace v8 152 } // namespace v8
157 153
158 #endif // V8_CONTEXTS_INL_H_ 154 #endif // V8_CONTEXTS_INL_H_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698