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

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: Use BytecodeArray in bytecode emission path in interpreter. 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 V(Map, code_map, CodeMap) \ 53 V(Map, code_map, CodeMap) \
54 V(Map, scope_info_map, ScopeInfoMap) \ 54 V(Map, scope_info_map, ScopeInfoMap) \
55 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 55 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
56 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 56 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
57 V(Map, weak_cell_map, WeakCellMap) \ 57 V(Map, weak_cell_map, WeakCellMap) \
58 V(Map, one_byte_string_map, OneByteStringMap) \ 58 V(Map, one_byte_string_map, OneByteStringMap) \
59 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ 59 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \
60 V(Map, function_context_map, FunctionContextMap) \ 60 V(Map, function_context_map, FunctionContextMap) \
61 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ 61 V(FixedArray, empty_fixed_array, EmptyFixedArray) \
62 V(ByteArray, empty_byte_array, EmptyByteArray) \ 62 V(ByteArray, empty_byte_array, EmptyByteArray) \
63 V(BytecodeArray, empty_bytecode_array, EmptyBytecodeArray) \
63 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ 64 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \
64 /* The roots above this line should be boring from a GC point of view. */ \ 65 /* The roots above this line should be boring from a GC point of view. */ \
65 /* This means they are never in new space and never on a page that is */ \ 66 /* This means they are never in new space and never on a page that is */ \
66 /* being compacted. */ \ 67 /* being compacted. */ \
67 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ 68 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
68 V(Oddball, arguments_marker, ArgumentsMarker) \ 69 V(Oddball, arguments_marker, ArgumentsMarker) \
69 V(Oddball, exception, Exception) \ 70 V(Oddball, exception, Exception) \
70 V(Oddball, termination_exception, TerminationException) \ 71 V(Oddball, termination_exception, TerminationException) \
71 V(FixedArray, number_string_cache, NumberStringCache) \ 72 V(FixedArray, number_string_cache, NumberStringCache) \
72 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ 73 V(Object, instanceof_cache_function, InstanceofCacheFunction) \
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 1665
1665 // Allocates a Float32x4 from the given lane values. 1666 // Allocates a Float32x4 from the given lane values.
1666 MUST_USE_RESULT AllocationResult 1667 MUST_USE_RESULT AllocationResult
1667 AllocateFloat32x4(float w, float x, float y, float z, 1668 AllocateFloat32x4(float w, float x, float y, float z,
1668 PretenureFlag pretenure = NOT_TENURED); 1669 PretenureFlag pretenure = NOT_TENURED);
1669 1670
1670 // Allocates a byte array of the specified length 1671 // Allocates a byte array of the specified length
1671 MUST_USE_RESULT AllocationResult 1672 MUST_USE_RESULT AllocationResult
1672 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED); 1673 AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED);
1673 1674
1675 // Allocates a bytecode array with given contents
rmcilroy 2015/07/15 13:33:38 nit - fullstop at the end of the comment.
oth 2015/07/16 09:15:50 Done and renamed 'start' to 'raw_bytecodes'.
1676 MUST_USE_RESULT AllocationResult
1677 AllocateBytecodeArray(int length, const byte* start,
1678 PretenureFlag pretenure = NOT_TENURED);
1679
1674 // Copy the code and scope info part of the code object, but insert 1680 // Copy the code and scope info part of the code object, but insert
1675 // the provided data as the relocation information. 1681 // the provided data as the relocation information.
1676 MUST_USE_RESULT AllocationResult 1682 MUST_USE_RESULT AllocationResult
1677 CopyCode(Code* code, Vector<byte> reloc_info); 1683 CopyCode(Code* code, Vector<byte> reloc_info);
1678 1684
1679 MUST_USE_RESULT AllocationResult CopyCode(Code* code); 1685 MUST_USE_RESULT AllocationResult CopyCode(Code* code);
1680 1686
1681 // Allocates a fixed array initialized with undefined values 1687 // Allocates a fixed array initialized with undefined values
1682 MUST_USE_RESULT AllocationResult 1688 MUST_USE_RESULT AllocationResult
1683 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED); 1689 AllocateFixedArray(int length, PretenureFlag pretenure = NOT_TENURED);
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2872 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2878 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2873 2879
2874 private: 2880 private:
2875 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2881 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2876 }; 2882 };
2877 #endif // DEBUG 2883 #endif // DEBUG
2878 } 2884 }
2879 } // namespace v8::internal 2885 } // namespace v8::internal
2880 2886
2881 #endif // V8_HEAP_HEAP_H_ 2887 #endif // V8_HEAP_HEAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698