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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 // when shortening objects. | 1075 // when shortening objects. |
1076 void CreateFillerObjectAt(Address addr, int size); | 1076 void CreateFillerObjectAt(Address addr, int size); |
1077 | 1077 |
1078 bool CanMoveObjectStart(HeapObject* object); | 1078 bool CanMoveObjectStart(HeapObject* object); |
1079 | 1079 |
1080 enum InvocationMode { FROM_GC, FROM_MUTATOR }; | 1080 enum InvocationMode { FROM_GC, FROM_MUTATOR }; |
1081 | 1081 |
1082 // Maintain marking consistency for IncrementalMarking. | 1082 // Maintain marking consistency for IncrementalMarking. |
1083 void AdjustLiveBytes(Address address, int by, InvocationMode mode); | 1083 void AdjustLiveBytes(Address address, int by, InvocationMode mode); |
1084 | 1084 |
1085 // Makes a new native code object | 1085 MUST_USE_RESULT MaybeObject* AllocateCode(int object_size, bool immovable); |
1086 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | |
1087 // failed. On success, the pointer to the Code object is stored in the | |
1088 // self_reference. This allows generated code to reference its own Code | |
1089 // object by containing this pointer. | |
1090 // Please note this function does not perform a garbage collection. | |
1091 MUST_USE_RESULT MaybeObject* CreateCode( | |
1092 const CodeDesc& desc, | |
1093 Code::Flags flags, | |
1094 Handle<Object> self_reference, | |
1095 bool immovable = false, | |
1096 bool crankshafted = false, | |
1097 int prologue_offset = Code::kPrologueOffsetNotSet); | |
1098 | 1086 |
1099 MUST_USE_RESULT MaybeObject* CopyCode(Code* code); | 1087 MUST_USE_RESULT MaybeObject* CopyCode(Code* code); |
1100 | 1088 |
1101 // Copy the code and scope info part of the code object, but insert | 1089 // Copy the code and scope info part of the code object, but insert |
1102 // the provided data as the relocation information. | 1090 // the provided data as the relocation information. |
1103 MUST_USE_RESULT MaybeObject* CopyCode(Code* code, Vector<byte> reloc_info); | 1091 MUST_USE_RESULT MaybeObject* CopyCode(Code* code, Vector<byte> reloc_info); |
1104 | 1092 |
1105 // Finds the internalized copy for string in the string table. | 1093 // Finds the internalized copy for string in the string table. |
1106 // If not found, a new string is added to the table and returned. | 1094 // If not found, a new string is added to the table and returned. |
1107 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation | 1095 // Returns Failure::RetryAfterGC(requested_bytes, space) if allocation |
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2998 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2986 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2999 | 2987 |
3000 private: | 2988 private: |
3001 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2989 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3002 }; | 2990 }; |
3003 #endif // DEBUG | 2991 #endif // DEBUG |
3004 | 2992 |
3005 } } // namespace v8::internal | 2993 } } // namespace v8::internal |
3006 | 2994 |
3007 #endif // V8_HEAP_H_ | 2995 #endif // V8_HEAP_H_ |
OLD | NEW |