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_; |
}; |