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

Unified Diff: src/objects-inl.h

Issue 19749004: With >= 64 non-string instance types, I removed an optimization (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A couple fixes Created 7 years, 5 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
« src/objects.h ('K') | « src/objects.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 0a5215cb405164a8df8044ac986fb5dda4288796..fa8476d1d77aba785ed2ac4bd58a63dd2b754d41 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -221,9 +221,8 @@ bool Object::IsSpecFunction() {
bool Object::IsInternalizedString() {
if (!this->IsHeapObject()) return false;
uint32_t type = HeapObject::cast(this)->map()->instance_type();
- STATIC_ASSERT(kInternalizedTag != 0);
- return (type & (kIsNotStringMask | kIsInternalizedMask)) ==
- (kInternalizedTag | kStringTag);
+ STATIC_ASSERT(kNotInternalizedTag != 0);
+ return type < kNotInternalizedTag;
Yang 2013/07/19 09:52:18 I kinda prefer the bit-masking way, since it doesn
mvstanton 2013/07/19 11:07:42 I wondered about that too, it's better to be symme
}
@@ -319,9 +318,8 @@ StringShape::StringShape(InstanceType t)
bool StringShape::IsInternalized() {
ASSERT(valid());
- STATIC_ASSERT(kInternalizedTag != 0);
- return (type_ & (kIsNotStringMask | kIsInternalizedMask)) ==
- (kInternalizedTag | kStringTag);
+ STATIC_ASSERT(kNotInternalizedTag != 0);
+ return type_ < kNotInternalizedTag;
mvstanton 2013/07/19 11:07:42 I restored this one too.
}
« src/objects.h ('K') | « src/objects.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698