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

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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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.cc ('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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 Context* Context::previous() { 52 Context* Context::previous() {
53 Object* result = get(PREVIOUS_INDEX); 53 Object* result = get(PREVIOUS_INDEX);
54 DCHECK(IsBootstrappingOrValidParentContext(result, this)); 54 DCHECK(IsBootstrappingOrValidParentContext(result, this));
55 return reinterpret_cast<Context*>(result); 55 return reinterpret_cast<Context*>(result);
56 } 56 }
57 void Context::set_previous(Context* context) { set(PREVIOUS_INDEX, context); } 57 void Context::set_previous(Context* context) { set(PREVIOUS_INDEX, context); }
58 58
59 Object* Context::next_context_link() { return get(Context::NEXT_CONTEXT_LINK); } 59 Object* Context::next_context_link() { return get(Context::NEXT_CONTEXT_LINK); }
60 60
61 bool Context::has_extension() { return !extension()->IsTheHole(); } 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)); } 70 JSModule* Context::module() { return JSModule::cast(get(EXTENSION_INDEX)); }
71 void Context::set_module(JSModule* module) { set(EXTENSION_INDEX, module); } 71 void Context::set_module(JSModule* module) { set(EXTENSION_INDEX, module); }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return type::cast(get(index)); \ 149 return type::cast(get(index)); \
150 } 150 }
151 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) 151 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS)
152 #undef NATIVE_CONTEXT_FIELD_ACCESSORS 152 #undef NATIVE_CONTEXT_FIELD_ACCESSORS
153 153
154 154
155 } // namespace internal 155 } // namespace internal
156 } // namespace v8 156 } // namespace v8
157 157
158 #endif // V8_CONTEXTS_INL_H_ 158 #endif // V8_CONTEXTS_INL_H_
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698