| 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 5622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5633 ScriptOriginOptions Script::origin_options() { | 5633 ScriptOriginOptions Script::origin_options() { |
| 5634 return ScriptOriginOptions((flags() & kOriginOptionsMask) >> | 5634 return ScriptOriginOptions((flags() & kOriginOptionsMask) >> |
| 5635 kOriginOptionsShift); | 5635 kOriginOptionsShift); |
| 5636 } | 5636 } |
| 5637 void Script::set_origin_options(ScriptOriginOptions origin_options) { | 5637 void Script::set_origin_options(ScriptOriginOptions origin_options) { |
| 5638 DCHECK(!(origin_options.Flags() & ~((1 << kOriginOptionsSize) - 1))); | 5638 DCHECK(!(origin_options.Flags() & ~((1 << kOriginOptionsSize) - 1))); |
| 5639 set_flags((flags() & ~kOriginOptionsMask) | | 5639 set_flags((flags() & ~kOriginOptionsMask) | |
| 5640 (origin_options.Flags() << kOriginOptionsShift)); | 5640 (origin_options.Flags() << kOriginOptionsShift)); |
| 5641 } | 5641 } |
| 5642 | 5642 |
| 5643 SharedFunctionInfo* DebugInfo::shared() const { |
| 5644 DCHECK(has_shared()); |
| 5645 return SharedFunctionInfo::cast(READ_FIELD(this, kSharedFunctionInfoIndex)); |
| 5646 } |
| 5647 void DebugInfo::set_shared(SharedFunctionInfo* shared, WriteBarrierMode mode) { |
| 5648 WRITE_FIELD(this, kSharedFunctionInfoIndex, shared); |
| 5649 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kSharedFunctionInfoIndex, shared, |
| 5650 mode); |
| 5651 } |
| 5652 bool DebugInfo::has_shared() const { |
| 5653 return !READ_FIELD(this, kSharedFunctionInfoIndex)->IsUndefined(GetIsolate()); |
| 5654 } |
| 5643 | 5655 |
| 5644 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) | |
| 5645 ACCESSORS(DebugInfo, abstract_code, AbstractCode, kAbstractCodeIndex) | 5656 ACCESSORS(DebugInfo, abstract_code, AbstractCode, kAbstractCodeIndex) |
| 5646 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 5657 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
| 5647 | 5658 |
| 5648 BytecodeArray* DebugInfo::original_bytecode_array() { | 5659 BytecodeArray* DebugInfo::original_bytecode_array() { |
| 5649 return shared()->bytecode_array(); | 5660 return shared()->bytecode_array(); |
| 5650 } | 5661 } |
| 5651 | 5662 |
| 5652 SMI_ACCESSORS(BreakPointInfo, code_offset, kCodeOffsetIndex) | 5663 SMI_ACCESSORS(BreakPointInfo, code_offset, kCodeOffsetIndex) |
| 5653 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex) | 5664 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex) |
| 5654 SMI_ACCESSORS(BreakPointInfo, statement_position, kStatementPositionIndex) | 5665 SMI_ACCESSORS(BreakPointInfo, statement_position, kStatementPositionIndex) |
| (...skipping 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7967 #undef WRITE_INT64_FIELD | 7978 #undef WRITE_INT64_FIELD |
| 7968 #undef READ_BYTE_FIELD | 7979 #undef READ_BYTE_FIELD |
| 7969 #undef WRITE_BYTE_FIELD | 7980 #undef WRITE_BYTE_FIELD |
| 7970 #undef NOBARRIER_READ_BYTE_FIELD | 7981 #undef NOBARRIER_READ_BYTE_FIELD |
| 7971 #undef NOBARRIER_WRITE_BYTE_FIELD | 7982 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7972 | 7983 |
| 7973 } // namespace internal | 7984 } // namespace internal |
| 7974 } // namespace v8 | 7985 } // namespace v8 |
| 7975 | 7986 |
| 7976 #endif // V8_OBJECTS_INL_H_ | 7987 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |