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

Unified Diff: src/code-stubs.h

Issue 13192004: arrange to create prototypes for generators (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Explicitly add constructor properties in generator.js Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | src/generator.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 99ff5154e1e6c11c897f4765d18021723782ac2a..088514ab409be4cdfd8fa1bed10e7142ceb375c1 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -393,17 +393,24 @@ class ToNumberStub: public PlatformCodeStub {
class FastNewClosureStub : public PlatformCodeStub {
public:
- explicit FastNewClosureStub(LanguageMode language_mode)
- : language_mode_(language_mode) { }
+ explicit FastNewClosureStub(LanguageMode language_mode, bool is_generator)
+ : language_mode_(language_mode),
+ is_generator_(is_generator) { }
void Generate(MacroAssembler* masm);
private:
+ class StrictModeBits: public BitField<bool, 0, 1> {};
+ class IsGeneratorBits: public BitField<bool, 1, 1> {};
+
Major MajorKey() { return FastNewClosure; }
- int MinorKey() { return language_mode_ == CLASSIC_MODE
- ? kNonStrictMode : kStrictMode; }
+ int MinorKey() {
+ return StrictModeBits::encode(language_mode_ != CLASSIC_MODE) |
+ IsGeneratorBits::encode(is_generator_);
+ }
LanguageMode language_mode_;
+ bool is_generator_;
};
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.h » ('j') | src/generator.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698