OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |