34 using namespace v8::internal;
44 weakmap->set_table(table);
56 weakmap->set_table(*table);
59 static int NumberOfWeakCalls = 0;
61 ASSERT(
id == reinterpret_cast<void*>(1234));
68 FLAG_incremental_marking =
false;
72 GlobalHandles* global_handles = Isolate::Current()->global_handles();
80 key = global_handles->
Create(*
object);
87 PutIntoWeakMap(weakmap,
94 HEAP->CollectAllGarbage(
false);
104 reinterpret_cast<void*
>(1234),
105 &WeakPointerCallback);
112 HEAP->CollectAllGarbage(
false);
117 HEAP->CollectAllGarbage(
false);
137 for (
int i = 0; i < 32; i++) {
150 HEAP->CollectAllGarbage(
false);
163 FLAG_always_compact =
true;
172 Page* first_page =
HEAP->old_pointer_space()->anchor()->next_page();
178 for (
int i = 0; i < 32; i++) {
180 CHECK(!
HEAP->InNewSpace(object->address()));
182 PutIntoWeakMap(weakmap, key,
object);
187 CHECK(FLAG_always_compact);
195 FLAG_always_compact =
true;
197 FLAG_verify_heap =
true;
205 Page* first_page =
HEAP->old_pointer_space()->anchor()->next_page();
210 for (
int i = 0; i < 32; i++) {
212 CHECK(!
HEAP->InNewSpace(keys[i]->address()));
216 for (
int i = 0; i < 32; i++) {
222 CHECK(FLAG_always_compact);
#define CHECK_EQ(expected, value)
bool Contains(Address addr)
static Smi * FromInt(int value)
static MUST_USE_RESULT MaybeObject * Allocate(int at_least_space_for, PretenureFlag pretenure=NOT_TENURED)
#define ASSERT(condition)
Handle< Object > Create(Object *value)
static const int kNoGCFlags
Handle< ObjectHashTable > PutIntoObjectHashTable(Handle< ObjectHashTable > table, Handle< Object > key, Handle< Object > value)
static ObjectHashTable * cast(Object *obj)
static JSWeakMap * cast(Object *obj)
static bool IsWeak(Object **location)
static const int kHeaderSize
void MakeWeak(Object **location, void *parameter, WeakReferenceCallback callback)
static JSObject * cast(Object *obj)