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

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

Issue 409543004: Add constructor for range types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | 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 "src/types.h" 8 #include "src/types.h"
9 9
10 #include "src/factory.h" 10 #include "src/factory.h"
11 #include "src/handles-inl.h" 11 #include "src/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() || t->IsRange() ||
23 t->IsUnion() || t->IsArray() || t->IsFunction() || t->IsContext()); 23 t->IsUnion() || t->IsArray() || t->IsFunction() || t->IsContext());
24 return t; 24 return t;
25 } 25 }
26 26
27 27
28 // Most precise _current_ type of a value (usually its class). 28 // Most precise _current_ type of a value (usually its class).
29 template<class Config> 29 template<class Config>
30 typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::NowOf( 30 typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::NowOf(
31 i::Object* value, Region* region) { 31 i::Object* value, Region* region) {
32 if (value->IsSmi() || 32 if (value->IsSmi() ||
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // static 327 // static
328 template<class V> 328 template<class V>
329 void HeapTypeConfig::struct_set_value( 329 void HeapTypeConfig::struct_set_value(
330 i::Handle<Struct> structure, int i, i::Handle<V> x) { 330 i::Handle<Struct> structure, int i, i::Handle<V> x) {
331 structure->set(i + 1, *x); 331 structure->set(i + 1, *x);
332 } 332 }
333 333
334 } } // namespace v8::internal 334 } } // namespace v8::internal
335 335
336 #endif // V8_TYPES_INL_H_ 336 #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