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

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: Additional object methods for BytecodeArray. 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 Symbol.isConcatSpreadable) \ 332 Symbol.isConcatSpreadable) \
330 V(is_regexp_symbol, symbolIsRegExp, Symbol.isRegExp) \ 333 V(is_regexp_symbol, symbolIsRegExp, Symbol.isRegExp) \
331 V(iterator_symbol, symbolIterator, Symbol.iterator) \ 334 V(iterator_symbol, symbolIterator, Symbol.iterator) \
332 V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \ 335 V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \
333 V(unscopables_symbol, symbolUnscopables, Symbol.unscopables) 336 V(unscopables_symbol, symbolUnscopables, Symbol.unscopables)
334 337
335 // Heap roots that are known to be immortal immovable, for which we can safely 338 // Heap roots that are known to be immortal immovable, for which we can safely
336 // skip write barriers. This list is not complete and has omissions. 339 // skip write barriers. This list is not complete and has omissions.
337 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ 340 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
338 V(ByteArrayMap) \ 341 V(ByteArrayMap) \
342 V(BytecodeArrayMap) \
339 V(FreeSpaceMap) \ 343 V(FreeSpaceMap) \
340 V(OnePointerFillerMap) \ 344 V(OnePointerFillerMap) \
341 V(TwoPointerFillerMap) \ 345 V(TwoPointerFillerMap) \
342 V(UndefinedValue) \ 346 V(UndefinedValue) \
343 V(TheHoleValue) \ 347 V(TheHoleValue) \
344 V(NullValue) \ 348 V(NullValue) \
345 V(TrueValue) \ 349 V(TrueValue) \
346 V(FalseValue) \ 350 V(FalseValue) \
347 V(UninitializedValue) \ 351 V(UninitializedValue) \
348 V(CellMap) \ 352 V(CellMap) \
349 V(GlobalPropertyCellMap) \ 353 V(GlobalPropertyCellMap) \
350 V(SharedFunctionInfoMap) \ 354 V(SharedFunctionInfoMap) \
351 V(MetaMap) \ 355 V(MetaMap) \
352 V(HeapNumberMap) \ 356 V(HeapNumberMap) \
353 V(MutableHeapNumberMap) \ 357 V(MutableHeapNumberMap) \
354 V(Float32x4Map) \ 358 V(Float32x4Map) \
355 V(NativeContextMap) \ 359 V(NativeContextMap) \
356 V(FixedArrayMap) \ 360 V(FixedArrayMap) \
357 V(CodeMap) \ 361 V(CodeMap) \
358 V(ScopeInfoMap) \ 362 V(ScopeInfoMap) \
359 V(FixedCOWArrayMap) \ 363 V(FixedCOWArrayMap) \
360 V(FixedDoubleArrayMap) \ 364 V(FixedDoubleArrayMap) \
361 V(WeakCellMap) \ 365 V(WeakCellMap) \
362 V(NoInterceptorResultSentinel) \ 366 V(NoInterceptorResultSentinel) \
363 V(HashTableMap) \ 367 V(HashTableMap) \
364 V(OrderedHashTableMap) \ 368 V(OrderedHashTableMap) \
365 V(EmptyFixedArray) \ 369 V(EmptyFixedArray) \
366 V(EmptyByteArray) \ 370 V(EmptyByteArray) \
371 V(EmptyBytecodeArray) \
367 V(EmptyDescriptorArray) \ 372 V(EmptyDescriptorArray) \
368 V(ArgumentsMarker) \ 373 V(ArgumentsMarker) \
369 V(SymbolMap) \ 374 V(SymbolMap) \
370 V(SloppyArgumentsElementsMap) \ 375 V(SloppyArgumentsElementsMap) \
371 V(FunctionContextMap) \ 376 V(FunctionContextMap) \
372 V(CatchContextMap) \ 377 V(CatchContextMap) \
373 V(WithContextMap) \ 378 V(WithContextMap) \
374 V(BlockContextMap) \ 379 V(BlockContextMap) \
375 V(ModuleContextMap) \ 380 V(ModuleContextMap) \
376 V(ScriptContextMap) \ 381 V(ScriptContextMap) \
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 1671
1667 // Allocates a Float32x4 from the given lane values. 1672 // Allocates a Float32x4 from the given lane values.
1668 MUST_USE_RESULT AllocationResult 1673 MUST_USE_RESULT AllocationResult
1669 AllocateFloat32x4(float w, float x, float y, float z, 1674 AllocateFloat32x4(float w, float x, float y, float z,
1670 PretenureFlag pretenure = NOT_TENURED); 1675 PretenureFlag pretenure = NOT_TENURED);
1671 1676
1672 // Allocates a byte array of the specified length 1677 // Allocates a byte array of the specified length
1673 MUST_USE_RESULT AllocationResult 1678 MUST_USE_RESULT AllocationResult
1674 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); 1679 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED);
1675 1680
1681 // Allocates a bytecode array with given contents.
1682 MUST_USE_RESULT AllocationResult
1683 AllocateBytecodeArray(int length, const byte* raw_bytecodes,
1684 PretenureFlag pretenure = NOT_TENURED);
rmcilroy 2015/07/16 10:29:44 Since this should always be TENURED let's remove t
oth 2015/07/16 13:14:38 Done. Now allocated directly in the OLD_SPACE in h
1685
1676 // Copy the code and scope info part of the code object, but insert 1686 // Copy the code and scope info part of the code object, but insert
1677 // the provided data as the relocation information. 1687 // the provided data as the relocation information.
1678 MUST_USE_RESULT AllocationResult 1688 MUST_USE_RESULT AllocationResult
1679 CopyCode(Code* code, Vector<byte> reloc_info); 1689 CopyCode(Code* code, Vector<byte> reloc_info);
1680 1690
1681 MUST_USE_RESULT AllocationResult CopyCode(Code* code); 1691 MUST_USE_RESULT AllocationResult CopyCode(Code* code);
1682 1692
1683 // Allocates a fixed array initialized with undefined values 1693 // Allocates a fixed array initialized with undefined values
1684 MUST_USE_RESULT AllocationResult 1694 MUST_USE_RESULT AllocationResult
1685 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED); 1695 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED);
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2885 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2876 2886
2877 private: 2887 private:
2878 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2888 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2879 }; 2889 };
2880 #endif // DEBUG 2890 #endif // DEBUG
2881 } 2891 }
2882 } // namespace v8::internal 2892 } // namespace v8::internal
2883 2893
2884 #endif // V8_HEAP_HEAP_H_ 2894 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | src/interpreter/interpreter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698