| 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 18 matching lines...) Expand all Loading... |
| 29 #define V8_HEAP_H_ | 29 #define V8_HEAP_H_ |
| 30 | 30 |
| 31 #include <math.h> | 31 #include <math.h> |
| 32 | 32 |
| 33 #include "splay-tree-inl.h" | 33 #include "splay-tree-inl.h" |
| 34 #include "v8-counters.h" | 34 #include "v8-counters.h" |
| 35 | 35 |
| 36 namespace v8 { | 36 namespace v8 { |
| 37 namespace internal { | 37 namespace internal { |
| 38 | 38 |
| 39 // Forward declarations. | |
| 40 class ZoneScopeInfo; | |
| 41 | 39 |
| 42 // Defines all the roots in Heap. | 40 // Defines all the roots in Heap. |
| 43 #define UNCONDITIONAL_STRONG_ROOT_LIST(V) \ | 41 #define UNCONDITIONAL_STRONG_ROOT_LIST(V) \ |
| 44 /* Put the byte array map early. We need it to be in place by the time */ \ | 42 /* Put the byte array map early. We need it to be in place by the time */ \ |
| 45 /* the deserializer hits the next page, since it wants to put a byte */ \ | 43 /* the deserializer hits the next page, since it wants to put a byte */ \ |
| 46 /* array in the unused space at the end of the page. */ \ | 44 /* array in the unused space at the end of the page. */ \ |
| 47 V(Map, byte_array_map, ByteArrayMap) \ | 45 V(Map, byte_array_map, ByteArrayMap) \ |
| 48 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ | 46 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ |
| 49 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ | 47 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ |
| 50 /* Cluster the most popular ones in a few cache lines here at the top. */ \ | 48 /* Cluster the most popular ones in a few cache lines here at the top. */ \ |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 // when shortening objects. | 617 // when shortening objects. |
| 620 static void CreateFillerObjectAt(Address addr, int size); | 618 static void CreateFillerObjectAt(Address addr, int size); |
| 621 | 619 |
| 622 // Makes a new native code object | 620 // Makes a new native code object |
| 623 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 621 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 624 // failed. On success, the pointer to the Code object is stored in the | 622 // failed. On success, the pointer to the Code object is stored in the |
| 625 // self_reference. This allows generated code to reference its own Code | 623 // self_reference. This allows generated code to reference its own Code |
| 626 // object by containing this pointer. | 624 // object by containing this pointer. |
| 627 // Please note this function does not perform a garbage collection. | 625 // Please note this function does not perform a garbage collection. |
| 628 static Object* CreateCode(const CodeDesc& desc, | 626 static Object* CreateCode(const CodeDesc& desc, |
| 629 ZoneScopeInfo* sinfo, | |
| 630 Code::Flags flags, | 627 Code::Flags flags, |
| 631 Handle<Object> self_reference); | 628 Handle<Object> self_reference); |
| 632 | 629 |
| 633 static Object* CopyCode(Code* code); | 630 static Object* CopyCode(Code* code); |
| 634 | 631 |
| 635 // Copy the code and scope info part of the code object, but insert | 632 // Copy the code and scope info part of the code object, but insert |
| 636 // the provided data as the relocation information. | 633 // the provided data as the relocation information. |
| 637 static Object* CopyCode(Code* code, Vector<byte> reloc_info); | 634 static Object* CopyCode(Code* code, Vector<byte> reloc_info); |
| 638 | 635 |
| 639 // Finds the symbol for string in the symbol table. | 636 // Finds the symbol for string in the symbol table. |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 | 1981 |
| 1985 // To speed up scavenge collections new space string are kept | 1982 // To speed up scavenge collections new space string are kept |
| 1986 // separate from old space strings. | 1983 // separate from old space strings. |
| 1987 static List<Object*> new_space_strings_; | 1984 static List<Object*> new_space_strings_; |
| 1988 static List<Object*> old_space_strings_; | 1985 static List<Object*> old_space_strings_; |
| 1989 }; | 1986 }; |
| 1990 | 1987 |
| 1991 } } // namespace v8::internal | 1988 } } // namespace v8::internal |
| 1992 | 1989 |
| 1993 #endif // V8_HEAP_H_ | 1990 #endif // V8_HEAP_H_ |
| OLD | NEW |