OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 // failed. | 1164 // failed. |
1165 // Please note this function does not perform a garbage collection. | 1165 // Please note this function does not perform a garbage collection. |
1166 MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes, | 1166 MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes, |
1167 AllocationSpace space, | 1167 AllocationSpace space, |
1168 AllocationSpace retry_space); | 1168 AllocationSpace retry_space); |
1169 | 1169 |
1170 // Initialize a filler object to keep the ability to iterate over the heap | 1170 // Initialize a filler object to keep the ability to iterate over the heap |
1171 // when shortening objects. | 1171 // when shortening objects. |
1172 void CreateFillerObjectAt(Address addr, int size); | 1172 void CreateFillerObjectAt(Address addr, int size); |
1173 | 1173 |
| 1174 enum InvocationMode { FROM_GC, FROM_MUTATOR }; |
| 1175 |
| 1176 // Maintain marking consistency for IncrementalMarking. |
| 1177 void AdjustLiveBytes(Address address, int by, InvocationMode mode); |
| 1178 |
1174 // Makes a new native code object | 1179 // Makes a new native code object |
1175 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1180 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
1176 // failed. On success, the pointer to the Code object is stored in the | 1181 // failed. On success, the pointer to the Code object is stored in the |
1177 // self_reference. This allows generated code to reference its own Code | 1182 // self_reference. This allows generated code to reference its own Code |
1178 // object by containing this pointer. | 1183 // object by containing this pointer. |
1179 // Please note this function does not perform a garbage collection. | 1184 // Please note this function does not perform a garbage collection. |
1180 MUST_USE_RESULT MaybeObject* CreateCode( | 1185 MUST_USE_RESULT MaybeObject* CreateCode( |
1181 const CodeDesc& desc, | 1186 const CodeDesc& desc, |
1182 Code::Flags flags, | 1187 Code::Flags flags, |
1183 Handle<Object> self_reference, | 1188 Handle<Object> self_reference, |
(...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3139 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3144 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3140 | 3145 |
3141 private: | 3146 private: |
3142 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3147 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3143 }; | 3148 }; |
3144 #endif // DEBUG | 3149 #endif // DEBUG |
3145 | 3150 |
3146 } } // namespace v8::internal | 3151 } } // namespace v8::internal |
3147 | 3152 |
3148 #endif // V8_HEAP_H_ | 3153 #endif // V8_HEAP_H_ |
OLD | NEW |