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

Unified Diff: src/code-stubs.h

Issue 11817017: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed unnecessary class specifiers Created 7 years, 11 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/arm/stub-cache-arm.cc ('k') | src/code-stubs.cc » ('j') | src/codegen.h » ('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 a02a9598d7dd6d0d348253b8a18c43558225114f..1d0df1b552d7f24e7cca40843cf9ab7a1bbc7288 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -427,14 +427,15 @@ class FastCloneShallowArrayStub : public PlatformCodeStub {
CLONE_DOUBLE_ELEMENTS,
COPY_ON_WRITE_ELEMENTS,
CLONE_ANY_ELEMENTS,
- CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO,
- LAST_CLONE_MODE = CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO
+ LAST_CLONE_MODE = CLONE_ANY_ELEMENTS
};
static const int kFastCloneModeCount = LAST_CLONE_MODE + 1;
Toon Verwaest 2013/01/16 10:53:42 Keep empty line between these lines.
mvstanton 2013/01/16 13:01:56 Done.
-
- FastCloneShallowArrayStub(Mode mode, int length)
+ FastCloneShallowArrayStub(Mode mode,
+ AllocationSiteInfoMode allocation_site_info_mode,
+ int length)
: mode_(mode),
+ allocation_site_info_mode_(allocation_site_info_mode),
length_((mode == COPY_ON_WRITE_ELEMENTS) ? 0 : length) {
ASSERT_GE(length_, 0);
ASSERT_LE(length_, kMaximumClonedLength);
@@ -444,12 +445,19 @@ class FastCloneShallowArrayStub : public PlatformCodeStub {
private:
Mode mode_;
+ AllocationSiteInfoMode allocation_site_info_mode_;
int length_;
+ class ModeBits: public BitField<Mode, 0, 8> {};
+ class AllocationSiteInfoModeBits: public
+ BitField<AllocationSiteInfoMode, 8, 8> {};
Toon Verwaest 2013/01/16 10:53:42 You only need 1 bit for this field.
mvstanton 2013/01/16 13:01:56 Fixed, and added a static assert to support it.
+ class LengthBits: public BitField<int, 16, 16> {};
+ STATIC_ASSERT(kFastCloneModeCount <= 8);
Major MajorKey() { return FastCloneShallowArray; }
int MinorKey() {
- ASSERT(mode_ >= 0 && mode_ <= LAST_CLONE_MODE);
- return length_ * kFastCloneModeCount + mode_;
+ return ModeBits::encode(mode_)
+ | AllocationSiteInfoModeBits::encode(allocation_site_info_mode_)
+ | LengthBits::encode(length_);
}
};
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/code-stubs.cc » ('j') | src/codegen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698