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

Unified Diff: src/objects-inl.h

Issue 1857001: Revert "Changing string length field type from int to SMI." (Closed)
Patch Set: Created 10 years, 8 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/objects.h ('k') | src/x64/codegen-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 f011a23e9c7de2a88d2cf697b3c9823c7895dbdf..621a3f84a31b6727f4bf05115d77d6db9053b8ab 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1651,7 +1651,7 @@ HashTable<Shape, Key>* HashTable<Shape, Key>::cast(Object* obj) {
INT_ACCESSORS(Array, length, kLengthOffset)
-SMI_ACCESSORS(String, length, kLengthOffset)
+INT_ACCESSORS(String, length, kLengthOffset)
uint32_t String::hash_field() {
@@ -1773,12 +1773,14 @@ void SeqTwoByteString::SeqTwoByteStringSet(int index, uint16_t value) {
int SeqTwoByteString::SeqTwoByteStringSize(InstanceType instance_type) {
- return SizeFor(length());
+ uint32_t length = READ_INT_FIELD(this, kLengthOffset);
+ return SizeFor(length);
}
int SeqAsciiString::SeqAsciiStringSize(InstanceType instance_type) {
- return SizeFor(length());
+ uint32_t length = READ_INT_FIELD(this, kLengthOffset);
+ return SizeFor(length);
}
« no previous file with comments | « src/objects.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698