| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 6378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6389 DECL_ACCESSORS(receiver, Object) | 6389 DECL_ACCESSORS(receiver, Object) |
| 6390 | 6390 |
| 6391 // [continuation]: Offset into code of continuation. | 6391 // [continuation]: Offset into code of continuation. |
| 6392 // | 6392 // |
| 6393 // A positive offset indicates a suspended generator. The special | 6393 // A positive offset indicates a suspended generator. The special |
| 6394 // kGeneratorExecuting and kGeneratorClosed values indicate that a generator | 6394 // kGeneratorExecuting and kGeneratorClosed values indicate that a generator |
| 6395 // cannot be resumed. | 6395 // cannot be resumed. |
| 6396 inline int continuation(); | 6396 inline int continuation(); |
| 6397 inline void set_continuation(int continuation); | 6397 inline void set_continuation(int continuation); |
| 6398 | 6398 |
| 6399 // [operands]: Saved operand stack. | 6399 // [operand_stack]: Saved operand stack. |
| 6400 DECL_ACCESSORS(operand_stack, FixedArray) | 6400 DECL_ACCESSORS(operand_stack, FixedArray) |
| 6401 | 6401 |
| 6402 // [stack_handler_index]: Index of first stack handler in operand_stack, or -1 |
| 6403 // if the captured activation had no stack handler. |
| 6404 inline int stack_handler_index(); |
| 6405 inline void set_stack_handler_index(int stack_handler_index); |
| 6406 |
| 6402 // Casting. | 6407 // Casting. |
| 6403 static inline JSGeneratorObject* cast(Object* obj); | 6408 static inline JSGeneratorObject* cast(Object* obj); |
| 6404 | 6409 |
| 6405 // Dispatched behavior. | 6410 // Dispatched behavior. |
| 6406 DECLARE_PRINTER(JSGeneratorObject) | 6411 DECLARE_PRINTER(JSGeneratorObject) |
| 6407 DECLARE_VERIFIER(JSGeneratorObject) | 6412 DECLARE_VERIFIER(JSGeneratorObject) |
| 6408 | 6413 |
| 6409 // Magic sentinel values for the continuation. | 6414 // Magic sentinel values for the continuation. |
| 6410 static const int kGeneratorExecuting = -1; | 6415 static const int kGeneratorExecuting = -1; |
| 6411 static const int kGeneratorClosed = 0; | 6416 static const int kGeneratorClosed = 0; |
| 6412 | 6417 |
| 6413 // Layout description. | 6418 // Layout description. |
| 6414 static const int kFunctionOffset = JSObject::kHeaderSize; | 6419 static const int kFunctionOffset = JSObject::kHeaderSize; |
| 6415 static const int kContextOffset = kFunctionOffset + kPointerSize; | 6420 static const int kContextOffset = kFunctionOffset + kPointerSize; |
| 6416 static const int kReceiverOffset = kContextOffset + kPointerSize; | 6421 static const int kReceiverOffset = kContextOffset + kPointerSize; |
| 6417 static const int kContinuationOffset = kReceiverOffset + kPointerSize; | 6422 static const int kContinuationOffset = kReceiverOffset + kPointerSize; |
| 6418 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; | 6423 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; |
| 6419 static const int kSize = kOperandStackOffset + kPointerSize; | 6424 static const int kStackHandlerIndexOffset = |
| 6425 kOperandStackOffset + kPointerSize; |
| 6426 static const int kSize = kStackHandlerIndexOffset + kPointerSize; |
| 6420 | 6427 |
| 6421 // Resume mode, for use by runtime functions. | 6428 // Resume mode, for use by runtime functions. |
| 6422 enum ResumeMode { SEND, THROW }; | 6429 enum ResumeMode { SEND, THROW }; |
| 6423 | 6430 |
| 6424 // Yielding from a generator returns an object with the following inobject | 6431 // Yielding from a generator returns an object with the following inobject |
| 6425 // properties. See Context::iterator_result_map() for the map. | 6432 // properties. See Context::iterator_result_map() for the map. |
| 6426 static const int kResultValuePropertyIndex = 0; | 6433 static const int kResultValuePropertyIndex = 0; |
| 6427 static const int kResultDonePropertyIndex = 1; | 6434 static const int kResultDonePropertyIndex = 1; |
| 6428 static const int kResultPropertyCount = 2; | 6435 static const int kResultPropertyCount = 2; |
| 6429 | 6436 |
| (...skipping 3101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9531 } else { | 9538 } else { |
| 9532 value &= ~(1 << bit_position); | 9539 value &= ~(1 << bit_position); |
| 9533 } | 9540 } |
| 9534 return value; | 9541 return value; |
| 9535 } | 9542 } |
| 9536 }; | 9543 }; |
| 9537 | 9544 |
| 9538 } } // namespace v8::internal | 9545 } } // namespace v8::internal |
| 9539 | 9546 |
| 9540 #endif // V8_OBJECTS_H_ | 9547 #endif // V8_OBJECTS_H_ |
| OLD | NEW |