| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return reinterpret_cast<intptr_t>(t) & 1; | 134 return reinterpret_cast<intptr_t>(t) & 1; |
| 135 } | 135 } |
| 136 static bool IsClass(ZoneType* t) { return IsTagged(t, 0); } | 136 static bool IsClass(ZoneType* t) { return IsTagged(t, 0); } |
| 137 static bool IsConstant(ZoneType* t) { return IsTagged(t, 1); } | 137 static bool IsConstant(ZoneType* t) { return IsTagged(t, 1); } |
| 138 static bool IsUnion(ZoneType* t) { return IsTagged(t, 2); } | 138 static bool IsUnion(ZoneType* t) { return IsTagged(t, 2); } |
| 139 | 139 |
| 140 static ZoneList<void*>* AsTagged(ZoneType* t) { | 140 static ZoneList<void*>* AsTagged(ZoneType* t) { |
| 141 return reinterpret_cast<ZoneList<void*>*>(t); | 141 return reinterpret_cast<ZoneList<void*>*>(t); |
| 142 } | 142 } |
| 143 static int AsBitset(ZoneType* t) { | 143 static int AsBitset(ZoneType* t) { |
| 144 return reinterpret_cast<intptr_t>(t) >> 1; | 144 return static_cast<int>(reinterpret_cast<intptr_t>(t) >> 1); |
| 145 } | 145 } |
| 146 static Map* AsClass(ZoneType* t) { | 146 static Map* AsClass(ZoneType* t) { |
| 147 return *reinterpret_cast<Map**>(AsTagged(t)->at(1)); | 147 return *reinterpret_cast<Map**>(AsTagged(t)->at(1)); |
| 148 } | 148 } |
| 149 static Object* AsConstant(ZoneType* t) { | 149 static Object* AsConstant(ZoneType* t) { |
| 150 return *reinterpret_cast<Object**>(AsTagged(t)->at(1)); | 150 return *reinterpret_cast<Object**>(AsTagged(t)->at(1)); |
| 151 } | 151 } |
| 152 static ZoneList<ZoneType*>* AsUnion(ZoneType* t) { | 152 static ZoneList<ZoneType*>* AsUnion(ZoneType* t) { |
| 153 return reinterpret_cast<ZoneList<ZoneType*>*>(AsTagged(t)); | 153 return reinterpret_cast<ZoneList<ZoneType*>*>(AsTagged(t)); |
| 154 } | 154 } |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 ZoneTests().Union(); | 799 ZoneTests().Union(); |
| 800 HeapTests().Union(); | 800 HeapTests().Union(); |
| 801 } | 801 } |
| 802 | 802 |
| 803 | 803 |
| 804 TEST(Intersect) { | 804 TEST(Intersect) { |
| 805 CcTest::InitializeVM(); | 805 CcTest::InitializeVM(); |
| 806 ZoneTests().Intersect(); | 806 ZoneTests().Intersect(); |
| 807 HeapTests().Intersect(); | 807 HeapTests().Intersect(); |
| 808 } | 808 } |
| OLD | NEW |