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

Side by Side Diff: src/heap.cc

Issue 14888: Code regions (Closed)
Patch Set: Created 12 years 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
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 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 if (self_reference != NULL) { 1656 if (self_reference != NULL) {
1657 *self_reference = code; 1657 *self_reference = code;
1658 } 1658 }
1659 // Migrate generated code. 1659 // Migrate generated code.
1660 // The generated code can contain Object** values (typically from handles) 1660 // The generated code can contain Object** values (typically from handles)
1661 // that are dereferenced during the copy to point directly to the actual heap 1661 // that are dereferenced during the copy to point directly to the actual heap
1662 // objects. These pointers can include references to the code object itself, 1662 // objects. These pointers can include references to the code object itself,
1663 // through the self_reference parameter. 1663 // through the self_reference parameter.
1664 code->CopyFrom(desc); 1664 code->CopyFrom(desc);
1665 if (sinfo != NULL) sinfo->Serialize(code); // write scope info 1665 if (sinfo != NULL) sinfo->Serialize(code); // write scope info
1666 LOG(CodeAllocateEvent(code, desc.origin));
1666 1667
1667 #ifdef DEBUG 1668 #ifdef DEBUG
1668 code->Verify(); 1669 code->Verify();
1669 #endif 1670 #endif
1670 return code; 1671 return code;
1671 } 1672 }
1672 1673
1673 1674
1674 Object* Heap::CopyCode(Code* code) { 1675 Object* Heap::CopyCode(Code* code) {
1675 // Allocate an object the same size as the code object. 1676 // Allocate an object the same size as the code object.
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 #ifdef DEBUG 3356 #ifdef DEBUG
3356 bool Heap::GarbageCollectionGreedyCheck() { 3357 bool Heap::GarbageCollectionGreedyCheck() {
3357 ASSERT(FLAG_gc_greedy); 3358 ASSERT(FLAG_gc_greedy);
3358 if (Bootstrapper::IsActive()) return true; 3359 if (Bootstrapper::IsActive()) return true;
3359 if (disallow_allocation_failure()) return true; 3360 if (disallow_allocation_failure()) return true;
3360 return CollectGarbage(0, NEW_SPACE); 3361 return CollectGarbage(0, NEW_SPACE);
3361 } 3362 }
3362 #endif 3363 #endif
3363 3364
3364 } } // namespace v8::internal 3365 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698