OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 6952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6963 | 6963 |
6964 | 6964 |
6965 void HandleScopeImplementer::IterateThis(ObjectVisitor* v) { | 6965 void HandleScopeImplementer::IterateThis(ObjectVisitor* v) { |
6966 #ifdef DEBUG | 6966 #ifdef DEBUG |
6967 bool found_block_before_deferred = false; | 6967 bool found_block_before_deferred = false; |
6968 #endif | 6968 #endif |
6969 // Iterate over all handles in the blocks except for the last. | 6969 // Iterate over all handles in the blocks except for the last. |
6970 for (int i = blocks()->length() - 2; i >= 0; --i) { | 6970 for (int i = blocks()->length() - 2; i >= 0; --i) { |
6971 Object** block = blocks()->at(i); | 6971 Object** block = blocks()->at(i); |
6972 if (last_handle_before_deferred_block_ != NULL && | 6972 if (last_handle_before_deferred_block_ != NULL && |
6973 (last_handle_before_deferred_block_ < &block[kHandleBlockSize]) && | 6973 (last_handle_before_deferred_block_ <= &block[kHandleBlockSize]) && |
6974 (last_handle_before_deferred_block_ >= block)) { | 6974 (last_handle_before_deferred_block_ >= block)) { |
6975 v->VisitPointers(block, last_handle_before_deferred_block_); | 6975 v->VisitPointers(block, last_handle_before_deferred_block_); |
6976 ASSERT(!found_block_before_deferred); | 6976 ASSERT(!found_block_before_deferred); |
6977 #ifdef DEBUG | 6977 #ifdef DEBUG |
6978 found_block_before_deferred = true; | 6978 found_block_before_deferred = true; |
6979 #endif | 6979 #endif |
6980 } else { | 6980 } else { |
6981 v->VisitPointers(block, &block[kHandleBlockSize]); | 6981 v->VisitPointers(block, &block[kHandleBlockSize]); |
6982 } | 6982 } |
6983 } | 6983 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7068 | 7068 |
7069 v->VisitPointers(blocks_.first(), first_block_limit_); | 7069 v->VisitPointers(blocks_.first(), first_block_limit_); |
7070 | 7070 |
7071 for (int i = 1; i < blocks_.length(); i++) { | 7071 for (int i = 1; i < blocks_.length(); i++) { |
7072 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 7072 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
7073 } | 7073 } |
7074 } | 7074 } |
7075 | 7075 |
7076 | 7076 |
7077 } } // namespace v8::internal | 7077 } } // namespace v8::internal |
OLD | NEW |