Index: src/code-stubs.h |
diff --git a/src/code-stubs.h b/src/code-stubs.h |
index 76f29f082f44b92aee35334a53a80b5edcbf12e3..bc7516a3fe3e6a18e54f68b5dacd81be250567d8 100644 |
--- a/src/code-stubs.h |
+++ b/src/code-stubs.h |
@@ -273,20 +273,21 @@ class FastNewClosureStub : public CodeStub { |
class FastNewContextStub : public CodeStub { |
public: |
- static const int kMaximumSlots = 64; |
+ // We want no more than 64 different stubs. |
+ static const int kMaximumSlots = Context::MIN_CONTEXT_SLOTS + 63; |
explicit FastNewContextStub(int slots) : slots_(slots) { |
- ASSERT(slots_ > 0 && slots <= kMaximumSlots); |
+ ASSERT(slots_ >= Context::MIN_CONTEXT_SLOTS && slots_ <= kMaximumSlots); |
} |
void Generate(MacroAssembler* masm); |
private: |
- int slots_; |
+ virtual const char* GetName() { return "FastNewContextStub"; } |
+ virtual Major MajorKey() { return FastNewContext; } |
+ virtual int MinorKey() { return slots_; } |
- const char* GetName() { return "FastNewContextStub"; } |
- Major MajorKey() { return FastNewContext; } |
- int MinorKey() { return slots_; } |
+ int slots_; |
}; |