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

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

Issue 296213005: Various extensions to types (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/types.cc ('k') | test/cctest/test-types.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_TYPES_INL_H_ 5 #ifndef V8_TYPES_INL_H_
6 #define V8_TYPES_INL_H_ 6 #define V8_TYPES_INL_H_
7 7
8 #include "types.h" 8 #include "types.h"
9 9
10 #include "factory.h" 10 #include "factory.h"
11 #include "handles-inl.h" 11 #include "handles-inl.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 // -------------------------------------------------------------------------- // 16 // -------------------------------------------------------------------------- //
17 // TypeImpl 17 // TypeImpl
18 18
19 template<class Config> 19 template<class Config>
20 TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) { 20 TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) {
21 TypeImpl* t = static_cast<TypeImpl*>(object); 21 TypeImpl* t = static_cast<TypeImpl*>(object);
22 ASSERT(t->IsBitset() || t->IsClass() || t->IsConstant() || 22 ASSERT(t->IsBitset() || t->IsClass() || t->IsConstant() ||
23 t->IsUnion() || t->IsArray() || t->IsFunction()); 23 t->IsUnion() || t->IsArray() || t->IsFunction() || t->IsContext());
24 return t; 24 return t;
25 } 25 }
26 26
27 27
28 template<class Config> 28 template<class Config>
29 bool TypeImpl<Config>::NowContains(i::Object* value) { 29 bool TypeImpl<Config>::NowContains(i::Object* value) {
30 DisallowHeapAllocation no_allocation; 30 DisallowHeapAllocation no_allocation;
31 if (this->IsAny()) return true; 31 if (this->IsAny()) return true;
32 if (value->IsHeapObject()) { 32 if (value->IsHeapObject()) {
33 i::Map* map = i::HeapObject::cast(value)->map(); 33 i::Map* map = i::HeapObject::cast(value)->map();
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 344
345 // static 345 // static
346 int HeapTypeConfig::lub_bitset(Type* type) { 346 int HeapTypeConfig::lub_bitset(Type* type) {
347 return 0; // kNone, which causes recomputation. 347 return 0; // kNone, which causes recomputation.
348 } 348 }
349 349
350 } } // namespace v8::internal 350 } } // namespace v8::internal
351 351
352 #endif // V8_TYPES_INL_H_ 352 #endif // V8_TYPES_INL_H_
OLDNEW
« no previous file with comments | « src/types.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698