| OLD | NEW |
| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 560 |
| 561 // Makes a new native code object | 561 // Makes a new native code object |
| 562 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 562 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 563 // failed. On success, the pointer to the Code object is stored in the | 563 // failed. On success, the pointer to the Code object is stored in the |
| 564 // self_reference. This allows generated code to reference its own Code | 564 // self_reference. This allows generated code to reference its own Code |
| 565 // object by containing this pointer. | 565 // object by containing this pointer. |
| 566 // Please note this function does not perform a garbage collection. | 566 // Please note this function does not perform a garbage collection. |
| 567 static Object* CreateCode(const CodeDesc& desc, | 567 static Object* CreateCode(const CodeDesc& desc, |
| 568 ScopeInfo<>* sinfo, | 568 ScopeInfo<>* sinfo, |
| 569 Code::Flags flags, | 569 Code::Flags flags, |
| 570 Code** self_reference = NULL); | 570 Handle<Object> self_reference); |
| 571 | 571 |
| 572 static Object* CopyCode(Code* code); | 572 static Object* CopyCode(Code* code); |
| 573 // Finds the symbol for string in the symbol table. | 573 // Finds the symbol for string in the symbol table. |
| 574 // If not found, a new symbol is added to the table and returned. | 574 // If not found, a new symbol is added to the table and returned. |
| 575 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation | 575 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation |
| 576 // failed. | 576 // failed. |
| 577 // Please note this function does not perform a garbage collection. | 577 // Please note this function does not perform a garbage collection. |
| 578 static Object* LookupSymbol(Vector<const char> str); | 578 static Object* LookupSymbol(Vector<const char> str); |
| 579 static Object* LookupAsciiSymbol(const char* str) { | 579 static Object* LookupAsciiSymbol(const char* str) { |
| 580 return LookupSymbol(CStrVector(str)); | 580 return LookupSymbol(CStrVector(str)); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 // Allocate empty fixed array. | 916 // Allocate empty fixed array. |
| 917 static Object* AllocateEmptyFixedArray(); | 917 static Object* AllocateEmptyFixedArray(); |
| 918 | 918 |
| 919 // Performs a minor collection in new generation. | 919 // Performs a minor collection in new generation. |
| 920 static void Scavenge(); | 920 static void Scavenge(); |
| 921 | 921 |
| 922 // Performs a major collection in the whole heap. | 922 // Performs a major collection in the whole heap. |
| 923 static void MarkCompact(GCTracer* tracer); | 923 static void MarkCompact(GCTracer* tracer); |
| 924 | 924 |
| 925 // Code to be run before and after mark-compact. | 925 // Code to be run before and after mark-compact. |
| 926 static void MarkCompactPrologue(); | 926 static void MarkCompactPrologue(bool is_compacting); |
| 927 static void MarkCompactEpilogue(); | 927 static void MarkCompactEpilogue(bool is_compacting); |
| 928 | 928 |
| 929 // Helper function used by CopyObject to copy a source object to an | 929 // Helper function used by CopyObject to copy a source object to an |
| 930 // allocated target object and update the forwarding pointer in the source | 930 // allocated target object and update the forwarding pointer in the source |
| 931 // object. Returns the target object. | 931 // object. Returns the target object. |
| 932 static HeapObject* MigrateObject(HeapObject* source, | 932 static HeapObject* MigrateObject(HeapObject* source, |
| 933 HeapObject* target, | 933 HeapObject* target, |
| 934 int size); | 934 int size); |
| 935 | 935 |
| 936 // Helper function that governs the promotion policy from new space to | 936 // Helper function that governs the promotion policy from new space to |
| 937 // old. If the object's old address lies below the new space's age | 937 // old. If the object's old address lies below the new space's age |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 int marked_count_; | 1280 int marked_count_; |
| 1281 | 1281 |
| 1282 // The count from the end of the previous full GC. Will be zero if there | 1282 // The count from the end of the previous full GC. Will be zero if there |
| 1283 // was no previous full GC. | 1283 // was no previous full GC. |
| 1284 int previous_marked_count_; | 1284 int previous_marked_count_; |
| 1285 }; | 1285 }; |
| 1286 | 1286 |
| 1287 } } // namespace v8::internal | 1287 } } // namespace v8::internal |
| 1288 | 1288 |
| 1289 #endif // V8_HEAP_H_ | 1289 #endif // V8_HEAP_H_ |
| OLD | NEW |