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

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

Issue 1612323003: Introduce {FAST,SLOW}_STRING_WRAPPER_ELEMENTS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: one more DCHECK fix Created 4 years, 10 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/code-stubs.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.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 15 matching lines...) Expand all
26 26
27 void ScriptContextTable::set_used(int used) { 27 void ScriptContextTable::set_used(int used) {
28 set(kUsedSlot, Smi::FromInt(used)); 28 set(kUsedSlot, Smi::FromInt(used));
29 } 29 }
30 30
31 31
32 // static 32 // static
33 Handle<Context> ScriptContextTable::GetContext(Handle<ScriptContextTable> table, 33 Handle<Context> ScriptContextTable::GetContext(Handle<ScriptContextTable> table,
34 int i) { 34 int i) {
35 DCHECK(i < table->used()); 35 DCHECK(i < table->used());
36 return Handle<Context>::cast(FixedArray::get(table, i + kFirstContextSlot)); 36 return Handle<Context>::cast(
37 FixedArray::get(*table, i + kFirstContextSlot, table->GetIsolate()));
37 } 38 }
38 39
39 40
40 // static 41 // static
41 Context* Context::cast(Object* context) { 42 Context* Context::cast(Object* context) {
42 DCHECK(context->IsContext()); 43 DCHECK(context->IsContext());
43 return reinterpret_cast<Context*>(context); 44 return reinterpret_cast<Context*>(context);
44 } 45 }
45 46
46 47
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return type::cast(get(index)); \ 144 return type::cast(get(index)); \
144 } 145 }
145 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) 146 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS)
146 #undef NATIVE_CONTEXT_FIELD_ACCESSORS 147 #undef NATIVE_CONTEXT_FIELD_ACCESSORS
147 148
148 149
149 } // namespace internal 150 } // namespace internal
150 } // namespace v8 151 } // namespace v8
151 152
152 #endif // V8_CONTEXTS_INL_H_ 153 #endif // V8_CONTEXTS_INL_H_
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698