OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 if (result->IsMap() && CheckHit(Map::cast(result), fast, mode)) { | 2119 if (result->IsMap() && CheckHit(Map::cast(result), fast, mode)) { |
2120 #ifdef DEBUG | 2120 #ifdef DEBUG |
2121 if (FLAG_enable_slow_asserts) { | 2121 if (FLAG_enable_slow_asserts) { |
2122 // Make sure that the new slow map has exactly the same hash as the | 2122 // Make sure that the new slow map has exactly the same hash as the |
2123 // original fast map. This way we can use hash to check if a slow map | 2123 // original fast map. This way we can use hash to check if a slow map |
2124 // is already in the hash (see Contains method). | 2124 // is already in the hash (see Contains method). |
2125 ASSERT(Hash(fast) == Hash(Map::cast(result))); | 2125 ASSERT(Hash(fast) == Hash(Map::cast(result))); |
2126 // The cached map should match newly created normalized map bit-by-bit. | 2126 // The cached map should match newly created normalized map bit-by-bit. |
2127 Object* fresh = fast->CopyNormalized(mode); | 2127 Object* fresh = fast->CopyNormalized(mode); |
2128 if (!fresh->IsFailure()) { | 2128 if (!fresh->IsFailure()) { |
2129 // Copy the unused byte so that the assertion below works. | |
2130 Map::cast(fresh)->address()[Map::kUnusedOffset] = | |
2131 Map::cast(result)->address()[Map::kUnusedOffset]; | |
2132 ASSERT(memcmp(Map::cast(fresh)->address(), | 2129 ASSERT(memcmp(Map::cast(fresh)->address(), |
2133 Map::cast(result)->address(), | 2130 Map::cast(result)->address(), |
2134 Map::kSize) == 0); | 2131 Map::kSize) == 0); |
2135 } | 2132 } |
2136 } | 2133 } |
2137 #endif | 2134 #endif |
2138 return result; | 2135 return result; |
2139 } | 2136 } |
2140 | 2137 |
2141 result = fast->CopyNormalized(mode); | 2138 result = fast->CopyNormalized(mode); |
(...skipping 6747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8889 if (break_point_objects()->IsUndefined()) return 0; | 8886 if (break_point_objects()->IsUndefined()) return 0; |
8890 // Single beak point. | 8887 // Single beak point. |
8891 if (!break_point_objects()->IsFixedArray()) return 1; | 8888 if (!break_point_objects()->IsFixedArray()) return 1; |
8892 // Multiple break points. | 8889 // Multiple break points. |
8893 return FixedArray::cast(break_point_objects())->length(); | 8890 return FixedArray::cast(break_point_objects())->length(); |
8894 } | 8891 } |
8895 #endif | 8892 #endif |
8896 | 8893 |
8897 | 8894 |
8898 } } // namespace v8::internal | 8895 } } // namespace v8::internal |
OLD | NEW |