Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: src/heap/heap.h

Issue 1230753004: [Interpreter] Add BytecodeArray class and add to SharedFunctionInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix pedantic build (take2). Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 V(FixedArray, keyed_load_dummy_vector, KeyedLoadDummyVector) \ 191 V(FixedArray, keyed_load_dummy_vector, KeyedLoadDummyVector) \
192 V(FixedArray, keyed_store_dummy_vector, KeyedStoreDummyVector) \ 192 V(FixedArray, keyed_store_dummy_vector, KeyedStoreDummyVector) \
193 V(FixedArray, detached_contexts, DetachedContexts) \ 193 V(FixedArray, detached_contexts, DetachedContexts) \
194 V(ArrayList, retained_maps, RetainedMaps) \ 194 V(ArrayList, retained_maps, RetainedMaps) \
195 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \ 195 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \
196 V(PropertyCell, array_protector, ArrayProtector) \ 196 V(PropertyCell, array_protector, ArrayProtector) \
197 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \ 197 V(PropertyCell, empty_property_cell, EmptyPropertyCell) \
198 V(Object, weak_stack_trace_list, WeakStackTraceList) \ 198 V(Object, weak_stack_trace_list, WeakStackTraceList) \
199 V(Object, code_stub_context, CodeStubContext) \ 199 V(Object, code_stub_context, CodeStubContext) \
200 V(JSObject, code_stub_exports_object, CodeStubExportsObject) \ 200 V(JSObject, code_stub_exports_object, CodeStubExportsObject) \
201 V(FixedArray, interpreter_table, InterpreterTable) 201 V(FixedArray, interpreter_table, InterpreterTable) \
202 V(Map, bytecode_array_map, BytecodeArrayMap) \
203 V(BytecodeArray, empty_bytecode_array, EmptyBytecodeArray)
204
202 205
203 // Entries in this list are limited to Smis and are not visited during GC. 206 // Entries in this list are limited to Smis and are not visited during GC.
204 #define SMI_ROOT_LIST(V) \ 207 #define SMI_ROOT_LIST(V) \
205 V(Smi, stack_limit, StackLimit) \ 208 V(Smi, stack_limit, StackLimit) \
206 V(Smi, real_stack_limit, RealStackLimit) \ 209 V(Smi, real_stack_limit, RealStackLimit) \
207 V(Smi, last_script_id, LastScriptId) \ 210 V(Smi, last_script_id, LastScriptId) \
208 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ 211 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \
209 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ 212 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \
210 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ 213 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \
211 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) 214 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 Symbol.isConcatSpreadable) \ 334 Symbol.isConcatSpreadable) \
332 V(is_regexp_symbol, symbolIsRegExp, Symbol.isRegExp) \ 335 V(is_regexp_symbol, symbolIsRegExp, Symbol.isRegExp) \
333 V(iterator_symbol, symbolIterator, Symbol.iterator) \ 336 V(iterator_symbol, symbolIterator, Symbol.iterator) \
334 V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \ 337 V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \
335 V(unscopables_symbol, symbolUnscopables, Symbol.unscopables) 338 V(unscopables_symbol, symbolUnscopables, Symbol.unscopables)
336 339
337 // Heap roots that are known to be immortal immovable, for which we can safely 340 // Heap roots that are known to be immortal immovable, for which we can safely
338 // skip write barriers. This list is not complete and has omissions. 341 // skip write barriers. This list is not complete and has omissions.
339 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ 342 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
340 V(ByteArrayMap) \ 343 V(ByteArrayMap) \
344 V(BytecodeArrayMap) \
341 V(FreeSpaceMap) \ 345 V(FreeSpaceMap) \
342 V(OnePointerFillerMap) \ 346 V(OnePointerFillerMap) \
343 V(TwoPointerFillerMap) \ 347 V(TwoPointerFillerMap) \
344 V(UndefinedValue) \ 348 V(UndefinedValue) \
345 V(TheHoleValue) \ 349 V(TheHoleValue) \
346 V(NullValue) \ 350 V(NullValue) \
347 V(TrueValue) \ 351 V(TrueValue) \
348 V(FalseValue) \ 352 V(FalseValue) \
349 V(UninitializedValue) \ 353 V(UninitializedValue) \
350 V(CellMap) \ 354 V(CellMap) \
351 V(GlobalPropertyCellMap) \ 355 V(GlobalPropertyCellMap) \
352 V(SharedFunctionInfoMap) \ 356 V(SharedFunctionInfoMap) \
353 V(MetaMap) \ 357 V(MetaMap) \
354 V(HeapNumberMap) \ 358 V(HeapNumberMap) \
355 V(MutableHeapNumberMap) \ 359 V(MutableHeapNumberMap) \
356 V(Float32x4Map) \ 360 V(Float32x4Map) \
357 V(NativeContextMap) \ 361 V(NativeContextMap) \
358 V(FixedArrayMap) \ 362 V(FixedArrayMap) \
359 V(CodeMap) \ 363 V(CodeMap) \
360 V(ScopeInfoMap) \ 364 V(ScopeInfoMap) \
361 V(FixedCOWArrayMap) \ 365 V(FixedCOWArrayMap) \
362 V(FixedDoubleArrayMap) \ 366 V(FixedDoubleArrayMap) \
363 V(WeakCellMap) \ 367 V(WeakCellMap) \
364 V(NoInterceptorResultSentinel) \ 368 V(NoInterceptorResultSentinel) \
365 V(HashTableMap) \ 369 V(HashTableMap) \
366 V(OrderedHashTableMap) \ 370 V(OrderedHashTableMap) \
367 V(EmptyFixedArray) \ 371 V(EmptyFixedArray) \
368 V(EmptyByteArray) \ 372 V(EmptyByteArray) \
373 V(EmptyBytecodeArray) \
369 V(EmptyDescriptorArray) \ 374 V(EmptyDescriptorArray) \
370 V(ArgumentsMarker) \ 375 V(ArgumentsMarker) \
371 V(SymbolMap) \ 376 V(SymbolMap) \
372 V(SloppyArgumentsElementsMap) \ 377 V(SloppyArgumentsElementsMap) \
373 V(FunctionContextMap) \ 378 V(FunctionContextMap) \
374 V(CatchContextMap) \ 379 V(CatchContextMap) \
375 V(WithContextMap) \ 380 V(WithContextMap) \
376 V(BlockContextMap) \ 381 V(BlockContextMap) \
377 V(ModuleContextMap) \ 382 V(ModuleContextMap) \
378 V(ScriptContextMap) \ 383 V(ScriptContextMap) \
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 1673
1669 // Allocates a Float32x4 from the given lane values. 1674 // Allocates a Float32x4 from the given lane values.
1670 MUST_USE_RESULT AllocationResult 1675 MUST_USE_RESULT AllocationResult
1671 AllocateFloat32x4(float w, float x, float y, float z, 1676 AllocateFloat32x4(float w, float x, float y, float z,
1672 PretenureFlag pretenure = NOT_TENURED); 1677 PretenureFlag pretenure = NOT_TENURED);
1673 1678
1674 // Allocates a byte array of the specified length 1679 // Allocates a byte array of the specified length
1675 MUST_USE_RESULT AllocationResult 1680 MUST_USE_RESULT AllocationResult
1676 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); 1681 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED);
1677 1682
1683 // Allocates a bytecode array with given contents.
1684 MUST_USE_RESULT AllocationResult
1685 AllocateBytecodeArray(int length, const byte* raw_bytecodes);
1686
1678 // Copy the code and scope info part of the code object, but insert 1687 // Copy the code and scope info part of the code object, but insert
1679 // the provided data as the relocation information. 1688 // the provided data as the relocation information.
1680 MUST_USE_RESULT AllocationResult 1689 MUST_USE_RESULT AllocationResult
1681 CopyCode(Code* code, Vector<byte> reloc_info); 1690 CopyCode(Code* code, Vector<byte> reloc_info);
1682 1691
1683 MUST_USE_RESULT AllocationResult CopyCode(Code* code); 1692 MUST_USE_RESULT AllocationResult CopyCode(Code* code);
1684 1693
1685 // Allocates a fixed array initialized with undefined values 1694 // Allocates a fixed array initialized with undefined values
1686 MUST_USE_RESULT AllocationResult 1695 MUST_USE_RESULT AllocationResult
1687 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED); 1696 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED);
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2886 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2878 2887
2879 private: 2888 private:
2880 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2889 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2881 }; 2890 };
2882 #endif // DEBUG 2891 #endif // DEBUG
2883 } 2892 }
2884 } // namespace v8::internal 2893 } // namespace v8::internal
2885 2894
2886 #endif // V8_HEAP_HEAP_H_ 2895 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698