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

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 MIPs changes, and found a bug. COPY_ON_WRITE shallow array stub didn't track allocation inf… 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
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index a02a9598d7dd6d0d348253b8a18c43558225114f..866deddcda4d93c259618a663298767ee2d83d2f 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -424,8 +424,11 @@ class FastCloneShallowArrayStub : public PlatformCodeStub {
static const int kMaximumClonedLength = 8;
enum Mode {
CLONE_ELEMENTS,
+ CLONE_ELEMENTS_WITH_ALLOCATION_SITE_INFO,
mvstanton 2013/01/11 16:56:06 Instead, use a bitfield that combines the Allocati
mvstanton 2013/01/15 15:23:15 Done.
CLONE_DOUBLE_ELEMENTS,
+ CLONE_DOUBLE_ELEMENTS_WITH_ALLOCATION_SITE_INFO,
COPY_ON_WRITE_ELEMENTS,
+ COPY_ON_WRITE_ELEMENTS_WITH_ALLOCATION_SITE_INFO,
CLONE_ANY_ELEMENTS,
CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO,
LAST_CLONE_MODE = CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO
@@ -442,6 +445,33 @@ class FastCloneShallowArrayStub : public PlatformCodeStub {
void Generate(MacroAssembler* masm);
+ static inline bool TrackAllocationSiteInfo(Mode mode) {
danno 2013/01/11 16:14:40 nit: "Track" is a command, but you use it a query.
mvstanton 2013/01/15 15:23:15 Good point, thanks. I took Toon's advice and ended
+ return mode == CLONE_ELEMENTS_WITH_ALLOCATION_SITE_INFO ||
+ mode == CLONE_DOUBLE_ELEMENTS_WITH_ALLOCATION_SITE_INFO ||
+ mode == CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO ||
+ mode == COPY_ON_WRITE_ELEMENTS_WITH_ALLOCATION_SITE_INFO;
+ }
+
+ static inline bool IsCloneElementsMode(Mode mode) {
+ return mode == CLONE_ELEMENTS ||
+ mode == CLONE_ELEMENTS_WITH_ALLOCATION_SITE_INFO;
+ }
+
+ static inline bool IsCloneDoubleElementsMode(Mode mode) {
+ return mode == CLONE_DOUBLE_ELEMENTS ||
+ mode == CLONE_DOUBLE_ELEMENTS_WITH_ALLOCATION_SITE_INFO;
+ }
+
+ static inline bool IsCopyOnWriteElementsMode(Mode mode) {
+ return mode == COPY_ON_WRITE_ELEMENTS ||
+ mode == COPY_ON_WRITE_ELEMENTS_WITH_ALLOCATION_SITE_INFO;
+ }
+
+ static inline bool IsCloneAnyElementsMode(Mode mode) {
+ return mode == CLONE_ANY_ELEMENTS ||
+ mode == CLONE_ANY_ELEMENTS_WITH_ALLOCATION_SITE_INFO;
+ }
+
private:
Mode mode_;
int length_;

Powered by Google App Engine
This is Rietveld 408576698