Chromium Code Reviews| Index: src/heap/heap.h |
| diff --git a/src/heap/heap.h b/src/heap/heap.h |
| index 769f53ff58267d2a87e63381cd7604cde0cf055f..decafc3f133714339c6cd52e59a403c7bbd78ca2 100644 |
| --- a/src/heap/heap.h |
| +++ b/src/heap/heap.h |
| @@ -198,7 +198,10 @@ namespace internal { |
| V(Object, weak_stack_trace_list, WeakStackTraceList) \ |
| V(Object, code_stub_context, CodeStubContext) \ |
| V(JSObject, code_stub_exports_object, CodeStubExportsObject) \ |
| - V(FixedArray, interpreter_table, InterpreterTable) |
| + V(FixedArray, interpreter_table, InterpreterTable) \ |
| + V(Map, bytecode_array_map, BytecodeArrayMap) \ |
| + V(BytecodeArray, empty_bytecode_array, EmptyBytecodeArray) |
| + |
| // Entries in this list are limited to Smis and are not visited during GC. |
| #define SMI_ROOT_LIST(V) \ |
| @@ -336,6 +339,7 @@ namespace internal { |
| // skip write barriers. This list is not complete and has omissions. |
| #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ |
| V(ByteArrayMap) \ |
| + V(BytecodeArrayMap) \ |
| V(FreeSpaceMap) \ |
| V(OnePointerFillerMap) \ |
| V(TwoPointerFillerMap) \ |
| @@ -364,6 +368,7 @@ namespace internal { |
| V(OrderedHashTableMap) \ |
| V(EmptyFixedArray) \ |
| V(EmptyByteArray) \ |
| + V(EmptyBytecodeArray) \ |
| V(EmptyDescriptorArray) \ |
| V(ArgumentsMarker) \ |
| V(SymbolMap) \ |
| @@ -1673,6 +1678,11 @@ class Heap { |
| MUST_USE_RESULT AllocationResult |
| AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); |
| + // Allocates a bytecode array with given contents. |
| + MUST_USE_RESULT AllocationResult |
| + AllocateBytecodeArray(int length, const byte* raw_bytecodes); |
| + |
| + |
|
rmcilroy
2015/07/20 11:39:46
nit - drop extra newline
oth
2015/07/20 13:47:30
Done.
|
| // Copy the code and scope info part of the code object, but insert |
| // the provided data as the relocation information. |
| MUST_USE_RESULT AllocationResult |