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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 int mem_size = 20 * kPointerSize; | 52 int mem_size = 20 * kPointerSize; |
53 byte* mem = NewArray<byte>(20*kPointerSize); | 53 byte* mem = NewArray<byte>(20*kPointerSize); |
54 Address low = reinterpret_cast<Address>(mem); | 54 Address low = reinterpret_cast<Address>(mem); |
55 Address high = low + mem_size; | 55 Address high = low + mem_size; |
56 MarkingDeque s; | 56 MarkingDeque s; |
57 s.Initialize(low, high); | 57 s.Initialize(low, high); |
58 | 58 |
59 Address original_address = reinterpret_cast<Address>(&s); | 59 Address original_address = reinterpret_cast<Address>(&s); |
60 Address current_address = original_address; | 60 Address current_address = original_address; |
61 while (!s.IsFull()) { | 61 while (!s.IsFull()) { |
62 s.PushBlack(HeapObject::FromAddress(current_address)); | 62 s.Push(HeapObject::FromAddress(current_address)); |
63 current_address += kPointerSize; | 63 current_address += kPointerSize; |
64 } | 64 } |
65 | 65 |
66 while (!s.IsEmpty()) { | 66 while (!s.IsEmpty()) { |
67 Address value = s.Pop()->address(); | 67 Address value = s.Pop()->address(); |
68 current_address -= kPointerSize; | 68 current_address -= kPointerSize; |
69 CHECK_EQ(current_address, value); | 69 CHECK_EQ(current_address, value); |
70 } | 70 } |
71 | 71 |
72 CHECK_EQ(original_address, current_address); | 72 CHECK_EQ(original_address, current_address); |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 485 |
486 | 486 |
487 TEST(RegressJoinThreadsOnIsolateDeinit) { | 487 TEST(RegressJoinThreadsOnIsolateDeinit) { |
488 intptr_t size_limit = ShortLivingIsolate() * 2; | 488 intptr_t size_limit = ShortLivingIsolate() * 2; |
489 for (int i = 0; i < 10; i++) { | 489 for (int i = 0; i < 10; i++) { |
490 CHECK_GT(size_limit, ShortLivingIsolate()); | 490 CHECK_GT(size_limit, ShortLivingIsolate()); |
491 } | 491 } |
492 } | 492 } |
493 | 493 |
494 #endif // __linux__ and !USE_SIMULATOR | 494 #endif // __linux__ and !USE_SIMULATOR |
OLD | NEW |