Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: src/heap-inl.h

Issue 3089005: [Isolates] Add a pointer to Heap to a meta map. (Closed)
Patch Set: review feedback Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } 374 }
375 ASSERT(amount_of_external_allocated_memory_ >= 0); 375 ASSERT(amount_of_external_allocated_memory_ >= 0);
376 return amount_of_external_allocated_memory_; 376 return amount_of_external_allocated_memory_;
377 } 377 }
378 378
379 379
380 void Heap::SetLastScriptId(Object* last_script_id) { 380 void Heap::SetLastScriptId(Object* last_script_id) {
381 roots_[kLastScriptIdRootIndex] = last_script_id; 381 roots_[kLastScriptIdRootIndex] = last_script_id;
382 } 382 }
383 383
384 Isolate* Heap::isolate() {
385 return reinterpret_cast<Isolate*>(reinterpret_cast<intptr_t>(this) -
386 reinterpret_cast<size_t>(reinterpret_cast<Isolate*>(4)->heap()) + 4);
387 }
384 388
385 #define GC_GREEDY_CHECK() \ 389 #define GC_GREEDY_CHECK() \
386 ASSERT(!FLAG_gc_greedy || HEAP->GarbageCollectionGreedyCheck()) 390 ASSERT(!FLAG_gc_greedy || HEAP->GarbageCollectionGreedyCheck())
387 391
388 392
389 // Calls the FUNCTION_CALL function and retries it up to three times 393 // Calls the FUNCTION_CALL function and retries it up to three times
390 // to guarantee that any allocations performed during the call will 394 // to guarantee that any allocations performed during the call will
391 // succeed if there's enough memory. 395 // succeed if there's enough memory.
392 396
393 // Warning: Do not use the identifiers __object__ or __scope__ in a 397 // Warning: Do not use the identifiers __object__ or __scope__ in a
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 #ifdef DEBUG 567 #ifdef DEBUG
564 UpdateLiveObjectCount(obj); 568 UpdateLiveObjectCount(obj);
565 #endif 569 #endif
566 obj->SetMark(); 570 obj->SetMark();
567 } 571 }
568 572
569 573
570 } } // namespace v8::internal 574 } } // namespace v8::internal
571 575
572 #endif // V8_HEAP_INL_H_ 576 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698