| 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 5822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5833 } | 5833 } |
| 5834 | 5834 |
| 5835 | 5835 |
| 5836 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) | 5836 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) |
| 5837 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) | 5837 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) |
| 5838 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) | 5838 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) |
| 5839 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) | 5839 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) |
| 5840 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) | 5840 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) |
| 5841 SMI_ACCESSORS(JSGeneratorObject, stack_handler_index, kStackHandlerIndexOffset) | 5841 SMI_ACCESSORS(JSGeneratorObject, stack_handler_index, kStackHandlerIndexOffset) |
| 5842 | 5842 |
| 5843 bool JSGeneratorObject::is_suspended() { | |
| 5844 ASSERT_LT(kGeneratorExecuting, kGeneratorClosed); | |
| 5845 ASSERT_EQ(kGeneratorClosed, 0); | |
| 5846 return continuation() > 0; | |
| 5847 } | |
| 5848 | 5843 |
| 5849 JSGeneratorObject* JSGeneratorObject::cast(Object* obj) { | 5844 JSGeneratorObject* JSGeneratorObject::cast(Object* obj) { |
| 5850 ASSERT(obj->IsJSGeneratorObject()); | 5845 ASSERT(obj->IsJSGeneratorObject()); |
| 5851 ASSERT(HeapObject::cast(obj)->Size() == JSGeneratorObject::kSize); | 5846 ASSERT(HeapObject::cast(obj)->Size() == JSGeneratorObject::kSize); |
| 5852 return reinterpret_cast<JSGeneratorObject*>(obj); | 5847 return reinterpret_cast<JSGeneratorObject*>(obj); |
| 5853 } | 5848 } |
| 5854 | 5849 |
| 5855 | 5850 |
| 5856 ACCESSORS(JSModule, context, Object, kContextOffset) | 5851 ACCESSORS(JSModule, context, Object, kContextOffset) |
| 5857 ACCESSORS(JSModule, scope_info, ScopeInfo, kScopeInfoOffset) | 5852 ACCESSORS(JSModule, scope_info, ScopeInfo, kScopeInfoOffset) |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6987 #undef READ_SHORT_FIELD | 6982 #undef READ_SHORT_FIELD |
| 6988 #undef WRITE_SHORT_FIELD | 6983 #undef WRITE_SHORT_FIELD |
| 6989 #undef READ_BYTE_FIELD | 6984 #undef READ_BYTE_FIELD |
| 6990 #undef WRITE_BYTE_FIELD | 6985 #undef WRITE_BYTE_FIELD |
| 6991 #undef NOBARRIER_READ_BYTE_FIELD | 6986 #undef NOBARRIER_READ_BYTE_FIELD |
| 6992 #undef NOBARRIER_WRITE_BYTE_FIELD | 6987 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 6993 | 6988 |
| 6994 } } // namespace v8::internal | 6989 } } // namespace v8::internal |
| 6995 | 6990 |
| 6996 #endif // V8_OBJECTS_INL_H_ | 6991 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |