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 6262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6273 | 6273 |
6274 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) | 6274 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) |
6275 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) | 6275 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) |
6276 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) | 6276 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) |
6277 ACCESSORS(JSGeneratorObject, input, Object, kInputOffset) | 6277 ACCESSORS(JSGeneratorObject, input, Object, kInputOffset) |
6278 SMI_ACCESSORS(JSGeneratorObject, resume_mode, kResumeModeOffset) | 6278 SMI_ACCESSORS(JSGeneratorObject, resume_mode, kResumeModeOffset) |
6279 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) | 6279 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) |
6280 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) | 6280 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) |
6281 | 6281 |
6282 bool JSGeneratorObject::is_suspended() { | 6282 bool JSGeneratorObject::is_suspended() { |
6283 DCHECK_LT(kGeneratorExecuting, kGeneratorClosed); | 6283 DCHECK_LT(kGeneratorExecuting, 0); |
6284 DCHECK_EQ(kGeneratorClosed, 0); | 6284 DCHECK_LT(kGeneratorClosed, 0); |
6285 return continuation() > 0; | 6285 return continuation() >= 0; |
6286 } | 6286 } |
6287 | 6287 |
6288 bool JSGeneratorObject::is_closed() { | 6288 bool JSGeneratorObject::is_closed() { |
6289 return continuation() == kGeneratorClosed; | 6289 return continuation() == kGeneratorClosed; |
6290 } | 6290 } |
6291 | 6291 |
6292 bool JSGeneratorObject::is_executing() { | 6292 bool JSGeneratorObject::is_executing() { |
6293 return continuation() == kGeneratorExecuting; | 6293 return continuation() == kGeneratorExecuting; |
6294 } | 6294 } |
6295 | 6295 |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7807 #undef WRITE_INT64_FIELD | 7807 #undef WRITE_INT64_FIELD |
7808 #undef READ_BYTE_FIELD | 7808 #undef READ_BYTE_FIELD |
7809 #undef WRITE_BYTE_FIELD | 7809 #undef WRITE_BYTE_FIELD |
7810 #undef NOBARRIER_READ_BYTE_FIELD | 7810 #undef NOBARRIER_READ_BYTE_FIELD |
7811 #undef NOBARRIER_WRITE_BYTE_FIELD | 7811 #undef NOBARRIER_WRITE_BYTE_FIELD |
7812 | 7812 |
7813 } // namespace internal | 7813 } // namespace internal |
7814 } // namespace v8 | 7814 } // namespace v8 |
7815 | 7815 |
7816 #endif // V8_OBJECTS_INL_H_ | 7816 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |