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 6330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6341 | 6341 |
6342 | 6342 |
6343 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) | 6343 ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) |
6344 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) | 6344 ACCESSORS(JSGeneratorObject, context, Context, kContextOffset) |
6345 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) | 6345 ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset) |
6346 ACCESSORS(JSGeneratorObject, input, Object, kInputOffset) | 6346 ACCESSORS(JSGeneratorObject, input, Object, kInputOffset) |
6347 SMI_ACCESSORS(JSGeneratorObject, resume_mode, kResumeModeOffset) | 6347 SMI_ACCESSORS(JSGeneratorObject, resume_mode, kResumeModeOffset) |
6348 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) | 6348 SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) |
6349 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) | 6349 ACCESSORS(JSGeneratorObject, operand_stack, FixedArray, kOperandStackOffset) |
6350 | 6350 |
6351 bool JSGeneratorObject::is_suspended() { | 6351 bool JSGeneratorObject::is_suspended() const { |
6352 DCHECK_LT(kGeneratorExecuting, 0); | 6352 DCHECK_LT(kGeneratorExecuting, 0); |
6353 DCHECK_LT(kGeneratorClosed, 0); | 6353 DCHECK_LT(kGeneratorClosed, 0); |
6354 return continuation() >= 0; | 6354 return continuation() >= 0; |
6355 } | 6355 } |
6356 | 6356 |
6357 bool JSGeneratorObject::is_closed() { | 6357 bool JSGeneratorObject::is_closed() const { |
6358 return continuation() == kGeneratorClosed; | 6358 return continuation() == kGeneratorClosed; |
6359 } | 6359 } |
6360 | 6360 |
6361 bool JSGeneratorObject::is_executing() { | 6361 bool JSGeneratorObject::is_executing() const { |
6362 return continuation() == kGeneratorExecuting; | 6362 return continuation() == kGeneratorExecuting; |
6363 } | 6363 } |
6364 | 6364 |
6365 ACCESSORS(JSModule, context, Object, kContextOffset) | 6365 ACCESSORS(JSModule, context, Object, kContextOffset) |
6366 ACCESSORS(JSModule, scope_info, ScopeInfo, kScopeInfoOffset) | 6366 ACCESSORS(JSModule, scope_info, ScopeInfo, kScopeInfoOffset) |
6367 | 6367 |
6368 | 6368 |
6369 ACCESSORS(JSValue, value, Object, kValueOffset) | 6369 ACCESSORS(JSValue, value, Object, kValueOffset) |
6370 | 6370 |
6371 | 6371 |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7909 #undef WRITE_INT64_FIELD | 7909 #undef WRITE_INT64_FIELD |
7910 #undef READ_BYTE_FIELD | 7910 #undef READ_BYTE_FIELD |
7911 #undef WRITE_BYTE_FIELD | 7911 #undef WRITE_BYTE_FIELD |
7912 #undef NOBARRIER_READ_BYTE_FIELD | 7912 #undef NOBARRIER_READ_BYTE_FIELD |
7913 #undef NOBARRIER_WRITE_BYTE_FIELD | 7913 #undef NOBARRIER_WRITE_BYTE_FIELD |
7914 | 7914 |
7915 } // namespace internal | 7915 } // namespace internal |
7916 } // namespace v8 | 7916 } // namespace v8 |
7917 | 7917 |
7918 #endif // V8_OBJECTS_INL_H_ | 7918 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |