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

Side by Side Diff: src/objects-inl.h

Issue 2230953002: Use a custom Struct for stack trace storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 4 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/objects-debug.cc ('k') | src/objects-printer.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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 5800 matching lines...) Expand 10 before | Expand all | Expand 10 after
5811 ScriptOriginOptions Script::origin_options() { 5811 ScriptOriginOptions Script::origin_options() {
5812 return ScriptOriginOptions((flags() & kOriginOptionsMask) >> 5812 return ScriptOriginOptions((flags() & kOriginOptionsMask) >>
5813 kOriginOptionsShift); 5813 kOriginOptionsShift);
5814 } 5814 }
5815 void Script::set_origin_options(ScriptOriginOptions origin_options) { 5815 void Script::set_origin_options(ScriptOriginOptions origin_options) {
5816 DCHECK(!(origin_options.Flags() & ~((1 << kOriginOptionsSize) - 1))); 5816 DCHECK(!(origin_options.Flags() & ~((1 << kOriginOptionsSize) - 1)));
5817 set_flags((flags() & ~kOriginOptionsMask) | 5817 set_flags((flags() & ~kOriginOptionsMask) |
5818 (origin_options.Flags() << kOriginOptionsShift)); 5818 (origin_options.Flags() << kOriginOptionsShift));
5819 } 5819 }
5820 5820
5821 SMI_ACCESSORS(StackTraceFrame, flags, kFlagsOffset)
5822 ACCESSORS(StackTraceFrame, abstract_code, AbstractCode, kAbstractCodeOffset)
5823 SMI_ACCESSORS(StackTraceFrame, offset, kOffsetOffset)
5824 ACCESSORS_CHECKED(StackTraceFrame, receiver, Object, kReceiverOffset,
5825 !IsWasmFrame())
5826 ACCESSORS_CHECKED(StackTraceFrame, function, JSFunction, kFunctionOffset,
5827 !IsWasmFrame())
5828 ACCESSORS_CHECKED(StackTraceFrame, wasm_object, Object, kWasmObjectOffset,
5829 IsWasmFrame())
5830 SMI_ACCESSORS_CHECKED(StackTraceFrame, wasm_function_index,
5831 kWasmFunctionIndexOffset, IsWasmFrame())
5832
5833 bool StackTraceFrame::IsWasmFrame() const {
5834 return ((flags() & kIsWasmFrame) != 0);
5835 }
5836
5837 bool StackTraceFrame::IsJavaScriptFrame() const { return !IsWasmFrame(); }
5838
5839 bool StackTraceFrame::IsStrict() const { return ((flags() & kIsStrict) != 0); }
5840
5841 bool StackTraceFrame::ForceConstructor() const {
5842 return ((flags() & kForceConstructor) != 0);
5843 }
5821 5844
5822 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) 5845 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex)
5823 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex) 5846 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex)
5824 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) 5847 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex)
5825 5848
5826 bool DebugInfo::HasDebugBytecodeArray() { 5849 bool DebugInfo::HasDebugBytecodeArray() {
5827 return debug_bytecode_array()->IsBytecodeArray(); 5850 return debug_bytecode_array()->IsBytecodeArray();
5828 } 5851 }
5829 5852
5830 bool DebugInfo::HasDebugCode() { 5853 bool DebugInfo::HasDebugCode() {
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
8219 #undef WRITE_INT64_FIELD 8242 #undef WRITE_INT64_FIELD
8220 #undef READ_BYTE_FIELD 8243 #undef READ_BYTE_FIELD
8221 #undef WRITE_BYTE_FIELD 8244 #undef WRITE_BYTE_FIELD
8222 #undef NOBARRIER_READ_BYTE_FIELD 8245 #undef NOBARRIER_READ_BYTE_FIELD
8223 #undef NOBARRIER_WRITE_BYTE_FIELD 8246 #undef NOBARRIER_WRITE_BYTE_FIELD
8224 8247
8225 } // namespace internal 8248 } // namespace internal
8226 } // namespace v8 8249 } // namespace v8
8227 8250
8228 #endif // V8_OBJECTS_INL_H_ 8251 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698