Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 16826db9e8e819a1be2f9ef41955ec799463ba20..8ee694f25f97799accc726f24816bd7b3e777f89 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -58,6 +58,7 @@ namespace internal { |
| V(FastNewContext) \ |
| V(FastNewBlockContext) \ |
| V(FastCloneShallowArray) \ |
| + V(FastCloneShallowObject) \ |
| V(ToBoolean) \ |
| V(ToNumber) \ |
| V(ArgumentsAccess) \ |
| @@ -380,6 +381,26 @@ class FastCloneShallowArrayStub : public CodeStub { |
| }; |
| +class FastCloneShallowObjectStub : public CodeStub { |
| + public: |
| + // Maximum number of properties in copied object. |
| + static const int kMaximumClonedProperties = 6; |
| + |
| + FastCloneShallowObjectStub(int length) : length_(length) { |
| + ASSERT(length_ >= 0); |
|
fschneider
2011/11/21 12:27:03
Maybe use ASSERT_GE / ASSERT_LE instead of ASSERT.
Michael Starzinger
2011/11/21 13:28:15
Done.
|
| + ASSERT(length_ <= kMaximumClonedProperties); |
| + } |
| + |
| + void Generate(MacroAssembler* masm); |
| + |
| + private: |
| + int length_; |
| + |
| + Major MajorKey() { return FastCloneShallowObject; } |
| + int MinorKey() { return length_; } |
| +}; |
| + |
| + |
| class InstanceofStub: public CodeStub { |
| public: |
| enum Flags { |