Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: src/objects.h

Issue 1620253003: Implement the function.sent proposal. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/messages.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 7185 matching lines...) Expand 10 before | Expand all | Expand 10 after
7196 public: 7196 public:
7197 // [function]: The function corresponding to this generator object. 7197 // [function]: The function corresponding to this generator object.
7198 DECL_ACCESSORS(function, JSFunction) 7198 DECL_ACCESSORS(function, JSFunction)
7199 7199
7200 // [context]: The context of the suspended computation. 7200 // [context]: The context of the suspended computation.
7201 DECL_ACCESSORS(context, Context) 7201 DECL_ACCESSORS(context, Context)
7202 7202
7203 // [receiver]: The receiver of the suspended computation. 7203 // [receiver]: The receiver of the suspended computation.
7204 DECL_ACCESSORS(receiver, Object) 7204 DECL_ACCESSORS(receiver, Object)
7205 7205
7206 // [input]: The most recent input value.
7207 DECL_ACCESSORS(input, Object)
7208
7206 // [continuation]: Offset into code of continuation. 7209 // [continuation]: Offset into code of continuation.
7207 // 7210 //
7208 // A positive offset indicates a suspended generator. The special 7211 // A positive offset indicates a suspended generator. The special
7209 // kGeneratorExecuting and kGeneratorClosed values indicate that a generator 7212 // kGeneratorExecuting and kGeneratorClosed values indicate that a generator
7210 // cannot be resumed. 7213 // cannot be resumed.
7211 inline int continuation() const; 7214 inline int continuation() const;
7212 inline void set_continuation(int continuation); 7215 inline void set_continuation(int continuation);
7213 inline bool is_closed(); 7216 inline bool is_closed();
7214 inline bool is_executing(); 7217 inline bool is_executing();
7215 inline bool is_suspended(); 7218 inline bool is_suspended();
7216 7219
7217 // [operand_stack]: Saved operand stack. 7220 // [operand_stack]: Saved operand stack.
7218 DECL_ACCESSORS(operand_stack, FixedArray) 7221 DECL_ACCESSORS(operand_stack, FixedArray)
7219 7222
7220 DECLARE_CAST(JSGeneratorObject) 7223 DECLARE_CAST(JSGeneratorObject)
7221 7224
7222 // Dispatched behavior. 7225 // Dispatched behavior.
7223 DECLARE_PRINTER(JSGeneratorObject) 7226 DECLARE_PRINTER(JSGeneratorObject)
7224 DECLARE_VERIFIER(JSGeneratorObject) 7227 DECLARE_VERIFIER(JSGeneratorObject)
7225 7228
7226 // Magic sentinel values for the continuation. 7229 // Magic sentinel values for the continuation.
7227 static const int kGeneratorExecuting = -1; 7230 static const int kGeneratorExecuting = -1;
7228 static const int kGeneratorClosed = 0; 7231 static const int kGeneratorClosed = 0;
7229 7232
7230 // Layout description. 7233 // Layout description.
7231 static const int kFunctionOffset = JSObject::kHeaderSize; 7234 static const int kFunctionOffset = JSObject::kHeaderSize;
7232 static const int kContextOffset = kFunctionOffset + kPointerSize; 7235 static const int kContextOffset = kFunctionOffset + kPointerSize;
7233 static const int kReceiverOffset = kContextOffset + kPointerSize; 7236 static const int kReceiverOffset = kContextOffset + kPointerSize;
7234 static const int kContinuationOffset = kReceiverOffset + kPointerSize; 7237 static const int kInputOffset = kReceiverOffset + kPointerSize;
7238 static const int kContinuationOffset = kInputOffset + kPointerSize;
7235 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; 7239 static const int kOperandStackOffset = kContinuationOffset + kPointerSize;
7236 static const int kSize = kOperandStackOffset + kPointerSize; 7240 static const int kSize = kOperandStackOffset + kPointerSize;
7237 7241
7238 // Resume mode, for use by runtime functions. 7242 // Resume mode, for use by runtime functions.
7239 enum ResumeMode { NEXT, THROW }; 7243 enum ResumeMode { NEXT, THROW };
7240 7244
7241 private: 7245 private:
7242 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); 7246 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
7243 }; 7247 };
7244 7248
(...skipping 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after
10779 } 10783 }
10780 return value; 10784 return value;
10781 } 10785 }
10782 }; 10786 };
10783 10787
10784 10788
10785 } // NOLINT, false-positive due to second-order macros. 10789 } // NOLINT, false-positive due to second-order macros.
10786 } // NOLINT, false-positive due to second-order macros. 10790 } // NOLINT, false-positive due to second-order macros.
10787 10791
10788 #endif // V8_OBJECTS_H_ 10792 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698