Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 527abde958843aa2bbaa255949b43c0a4316efb8..959754d30da61a6c2b29edf39da97fb87d455626 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -422,14 +422,23 @@ class FastCloneShallowArrayStub : public PlatformCodeStub { |
| public: |
| // Maximum length of copied elements array. |
| static const int kMaximumClonedLength = 8; |
| - |
| enum Mode { |
| CLONE_ELEMENTS, |
| CLONE_DOUBLE_ELEMENTS, |
| COPY_ON_WRITE_ELEMENTS, |
| - CLONE_ANY_ELEMENTS |
| + CLONE_ANY_ELEMENTS, |
| + CLONE_ANY_ELEMENTS_WITH_ALLOCATION_INFO, |
|
danno
2013/01/04 08:50:55
CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO?
mvstanton
2013/01/04 12:07:52
Done.
|
| + LAST_CLONE_MODE = CLONE_ANY_ELEMENTS_WITH_ALLOCATION_INFO |
| }; |
| + static const int kFastCloneModeCount = LAST_CLONE_MODE + 1; |
| + |
| + // The stub generator likes to treat the allocation info mode separately. |
| + enum AllocationInfoMode { |
|
danno
2013/01/04 08:50:55
AllocationSiteInfoMode?
mvstanton
2013/01/04 12:07:52
Done.
|
| + DONT_TRACK_ALLOCATION_INFO, |
| + TRACK_ALLOCATION_INFO |
| + }; |
|
danno
2013/01/04 08:50:55
Soon this will be used for other things, so I thin
mvstanton
2013/01/04 12:07:52
Done.
|
| + |
| FastCloneShallowArrayStub(Mode mode, int length) |
| : mode_(mode), |
| length_((mode == COPY_ON_WRITE_ELEMENTS) ? 0 : length) { |
| @@ -445,8 +454,8 @@ class FastCloneShallowArrayStub : public PlatformCodeStub { |
| Major MajorKey() { return FastCloneShallowArray; } |
| int MinorKey() { |
| - ASSERT(mode_ == 0 || mode_ == 1 || mode_ == 2 || mode_ == 3); |
| - return length_ * 4 + mode_; |
| + ASSERT(mode_ >= 0 && mode_ <= LAST_CLONE_MODE); |
| + return length_ * kFastCloneModeCount + mode_; |
| } |
| }; |