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

Side by Side Diff: src/objects.h

Issue 13870007: Generators return boxed values (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Fix x64 thinko; add result map test Created 7 years, 7 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/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('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 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 6403 matching lines...) Expand 10 before | Expand all | Expand 10 after
6414 static const int kFunctionOffset = JSObject::kHeaderSize; 6414 static const int kFunctionOffset = JSObject::kHeaderSize;
6415 static const int kContextOffset = kFunctionOffset + kPointerSize; 6415 static const int kContextOffset = kFunctionOffset + kPointerSize;
6416 static const int kReceiverOffset = kContextOffset + kPointerSize; 6416 static const int kReceiverOffset = kContextOffset + kPointerSize;
6417 static const int kContinuationOffset = kReceiverOffset + kPointerSize; 6417 static const int kContinuationOffset = kReceiverOffset + kPointerSize;
6418 static const int kOperandStackOffset = kContinuationOffset + kPointerSize; 6418 static const int kOperandStackOffset = kContinuationOffset + kPointerSize;
6419 static const int kSize = kOperandStackOffset + kPointerSize; 6419 static const int kSize = kOperandStackOffset + kPointerSize;
6420 6420
6421 // Resume mode, for use by runtime functions. 6421 // Resume mode, for use by runtime functions.
6422 enum ResumeMode { SEND, THROW }; 6422 enum ResumeMode { SEND, THROW };
6423 6423
6424 // Yielding from a generator returns an object with the following inobject
6425 // properties. See Context::generator_result_map() for the map.
6426 static const int kResultValuePropertyIndex = 0;
6427 static const int kResultDonePropertyIndex = 1;
6428 static const int kResultPropertyCount = 2;
6429
6430 static const int kResultValuePropertyOffset = JSObject::kHeaderSize;
6431 static const int kResultDonePropertyOffset =
6432 kResultValuePropertyOffset + kPointerSize;
6433 static const int kResultSize = kResultDonePropertyOffset + kPointerSize;
6434
6424 private: 6435 private:
6425 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject); 6436 DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
6426 }; 6437 };
6427 6438
6428 6439
6429 // Representation for module instance objects. 6440 // Representation for module instance objects.
6430 class JSModule: public JSObject { 6441 class JSModule: public JSObject {
6431 public: 6442 public:
6432 // [context]: the context holding the module's locals, or undefined if none. 6443 // [context]: the context holding the module's locals, or undefined if none.
6433 DECL_ACCESSORS(context, Object) 6444 DECL_ACCESSORS(context, Object)
(...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after
9525 } else { 9536 } else {
9526 value &= ~(1 << bit_position); 9537 value &= ~(1 << bit_position);
9527 } 9538 }
9528 return value; 9539 return value;
9529 } 9540 }
9530 }; 9541 };
9531 9542
9532 } } // namespace v8::internal 9543 } } // namespace v8::internal
9533 9544
9534 #endif // V8_OBJECTS_H_ 9545 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698