| 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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 ++next_index_; | 1074 ++next_index_; |
| 1075 if (CheckVisitedAndUnmark(p)) continue; | 1075 if (CheckVisitedAndUnmark(p)) continue; |
| 1076 generator_->SetHiddenReference(parent_obj_, parent_, next_index_, *p); | 1076 generator_->SetHiddenReference(parent_obj_, parent_, next_index_, *p); |
| 1077 } | 1077 } |
| 1078 } | 1078 } |
| 1079 static void MarkVisitedField(HeapObject* obj, int offset) { | 1079 static void MarkVisitedField(HeapObject* obj, int offset) { |
| 1080 if (offset < 0) return; | 1080 if (offset < 0) return; |
| 1081 Address field = obj->address() + offset; | 1081 Address field = obj->address() + offset; |
| 1082 ASSERT(!Memory::Object_at(field)->IsFailure()); | 1082 ASSERT(!Memory::Object_at(field)->IsFailure()); |
| 1083 ASSERT(Memory::Object_at(field)->IsHeapObject()); | 1083 ASSERT(Memory::Object_at(field)->IsHeapObject()); |
| 1084 *field |= kFailureTag; | 1084 Object* untagged = *reinterpret_cast<Object**>(field); |
| 1085 intptr_t tagged = reinterpret_cast<intptr_t>(untagged) | kFailureTag; |
| 1086 *reinterpret_cast<Object**>(field) = reinterpret_cast<Object*>(tagged); |
| 1085 } | 1087 } |
| 1086 | 1088 |
| 1087 private: | 1089 private: |
| 1088 bool CheckVisitedAndUnmark(Object** field) { | 1090 bool CheckVisitedAndUnmark(Object** field) { |
| 1089 if ((*field)->IsFailure()) { | 1091 if ((*field)->IsFailure()) { |
| 1090 intptr_t untagged = reinterpret_cast<intptr_t>(*field) & ~kFailureTagMask; | 1092 intptr_t untagged = reinterpret_cast<intptr_t>(*field) & ~kFailureTagMask; |
| 1091 *field = reinterpret_cast<Object*>(untagged | kHeapObjectTag); | 1093 *field = reinterpret_cast<Object*>(untagged | kHeapObjectTag); |
| 1092 ASSERT((*field)->IsHeapObject()); | 1094 ASSERT((*field)->IsHeapObject()); |
| 1093 return true; | 1095 return true; |
| 1094 } | 1096 } |
| (...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3160 writer_->AddString("\"<dummy>\""); | 3162 writer_->AddString("\"<dummy>\""); |
| 3161 for (int i = 1; i < sorted_strings.length(); ++i) { | 3163 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3162 writer_->AddCharacter(','); | 3164 writer_->AddCharacter(','); |
| 3163 SerializeString(sorted_strings[i]); | 3165 SerializeString(sorted_strings[i]); |
| 3164 if (writer_->aborted()) return; | 3166 if (writer_->aborted()) return; |
| 3165 } | 3167 } |
| 3166 } | 3168 } |
| 3167 | 3169 |
| 3168 | 3170 |
| 3169 } } // namespace v8::internal | 3171 } } // namespace v8::internal |
| OLD | NEW |