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 5791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5802 ScriptOriginOptions Script::origin_options() { | 5802 ScriptOriginOptions Script::origin_options() { |
5803 return ScriptOriginOptions((flags() & kOriginOptionsMask) >> | 5803 return ScriptOriginOptions((flags() & kOriginOptionsMask) >> |
5804 kOriginOptionsShift); | 5804 kOriginOptionsShift); |
5805 } | 5805 } |
5806 void Script::set_origin_options(ScriptOriginOptions origin_options) { | 5806 void Script::set_origin_options(ScriptOriginOptions origin_options) { |
5807 DCHECK(!(origin_options.Flags() & ~((1 << kOriginOptionsSize) - 1))); | 5807 DCHECK(!(origin_options.Flags() & ~((1 << kOriginOptionsSize) - 1))); |
5808 set_flags((flags() & ~kOriginOptionsMask) | | 5808 set_flags((flags() & ~kOriginOptionsMask) | |
5809 (origin_options.Flags() << kOriginOptionsShift)); | 5809 (origin_options.Flags() << kOriginOptionsShift)); |
5810 } | 5810 } |
5811 | 5811 |
5812 SMI_ACCESSORS(StackTraceFrame, flags, kFlagsOffset) | |
5813 ACCESSORS(StackTraceFrame, abstract_code, AbstractCode, kAbstractCodeOffset) | |
5814 SMI_ACCESSORS(StackTraceFrame, offset, kOffsetOffset) | |
5815 ACCESSORS_CHECKED(StackTraceFrame, receiver, Object, kReceiverOffset, | |
5816 !IsWasmFrame()) | |
5817 ACCESSORS_CHECKED(StackTraceFrame, function, JSFunction, kFunctionOffset, | |
5818 !IsWasmFrame()) | |
5819 ACCESSORS_CHECKED(StackTraceFrame, wasm_object, Object, kWasmObjectOffset, | |
5820 IsWasmFrame()) | |
5821 SMI_ACCESSORS_CHECKED(StackTraceFrame, wasm_function_index, | |
5822 kWasmFunctionIndexOffset, IsWasmFrame()) | |
5823 | |
5824 bool StackTraceFrame::IsWasmFrame() const { | |
5825 return ((flags() & kIsWasmFrame) != 0); | |
5826 } | |
5827 | |
5828 bool StackTraceFrame::IsJavaScriptFrame() const { return !IsWasmFrame(); } | |
5829 | |
5830 bool StackTraceFrame::IsStrict() const { return ((flags() & kIsStrict) != 0); } | |
5831 | |
5832 bool StackTraceFrame::ForceConstructor() const { | |
5833 return ((flags() & kForceConstructor) != 0); | |
5834 } | |
5835 | 5812 |
5836 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) | 5813 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) |
5837 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex) | 5814 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex) |
5838 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 5815 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
5839 | 5816 |
5840 bool DebugInfo::HasDebugBytecodeArray() { | 5817 bool DebugInfo::HasDebugBytecodeArray() { |
5841 return debug_bytecode_array()->IsBytecodeArray(); | 5818 return debug_bytecode_array()->IsBytecodeArray(); |
5842 } | 5819 } |
5843 | 5820 |
5844 bool DebugInfo::HasDebugCode() { | 5821 bool DebugInfo::HasDebugCode() { |
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8231 #undef WRITE_INT64_FIELD | 8208 #undef WRITE_INT64_FIELD |
8232 #undef READ_BYTE_FIELD | 8209 #undef READ_BYTE_FIELD |
8233 #undef WRITE_BYTE_FIELD | 8210 #undef WRITE_BYTE_FIELD |
8234 #undef NOBARRIER_READ_BYTE_FIELD | 8211 #undef NOBARRIER_READ_BYTE_FIELD |
8235 #undef NOBARRIER_WRITE_BYTE_FIELD | 8212 #undef NOBARRIER_WRITE_BYTE_FIELD |
8236 | 8213 |
8237 } // namespace internal | 8214 } // namespace internal |
8238 } // namespace v8 | 8215 } // namespace v8 |
8239 | 8216 |
8240 #endif // V8_OBJECTS_INL_H_ | 8217 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |