| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 437 } |
| 438 static void union_set(Unioned* unioned, int i, Type* type) { | 438 static void union_set(Unioned* unioned, int i, Type* type) { |
| 439 ASSERT(!is_union(type)); | 439 ASSERT(!is_union(type)); |
| 440 tagged_set(tagged_from_union(unioned), i, type); | 440 tagged_set(tagged_from_union(unioned), i, type); |
| 441 } | 441 } |
| 442 static int union_length(Unioned* unioned) { | 442 static int union_length(Unioned* unioned) { |
| 443 return tagged_length(tagged_from_union(unioned)); | 443 return tagged_length(tagged_from_union(unioned)); |
| 444 } | 444 } |
| 445 static int lub_bitset(Type* type) { | 445 static int lub_bitset(Type* type) { |
| 446 ASSERT(is_class(type) || is_constant(type)); | 446 ASSERT(is_class(type) || is_constant(type)); |
| 447 return tagged_get<intptr_t>(as_tagged(type), 0); | 447 return static_cast<int>(tagged_get<intptr_t>(as_tagged(type), 0)); |
| 448 } | 448 } |
| 449 }; | 449 }; |
| 450 | 450 |
| 451 | 451 |
| 452 // Heap-allocated types are either smis for bitsets, maps for classes, boxes for | 452 // Heap-allocated types are either smis for bitsets, maps for classes, boxes for |
| 453 // constants, or fixed arrays for unions. | 453 // constants, or fixed arrays for unions. |
| 454 struct HeapTypeConfig { | 454 struct HeapTypeConfig { |
| 455 typedef TypeImpl<HeapTypeConfig> Type; | 455 typedef TypeImpl<HeapTypeConfig> Type; |
| 456 typedef i::Object Base; | 456 typedef i::Object Base; |
| 457 typedef i::FixedArray Unioned; | 457 typedef i::FixedArray Unioned; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 581 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
| 582 } | 582 } |
| 583 }; | 583 }; |
| 584 | 584 |
| 585 typedef BoundsImpl<ZoneTypeConfig> Bounds; | 585 typedef BoundsImpl<ZoneTypeConfig> Bounds; |
| 586 | 586 |
| 587 | 587 |
| 588 } } // namespace v8::internal | 588 } } // namespace v8::internal |
| 589 | 589 |
| 590 #endif // V8_TYPES_H_ | 590 #endif // V8_TYPES_H_ |
| OLD | NEW |