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

Unified Diff: src/objects-inl.h

Issue 278883002: [Sheriff] This reverts commits r21225 and r21226 for breaking Linux64 build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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.cc ('k') | src/x64/full-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 00cd62e818346c16b60fcddb03c6fef5d1ca200f..029e80d9bb96e075f39c14c7d9d93566fc5d4321 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4033,12 +4033,12 @@ bool Map::has_non_instance_prototype() {
void Map::set_function_with_prototype(bool value) {
- set_bit_field(FunctionWithPrototype::update(bit_field(), value));
+ set_bit_field3(FunctionWithPrototype::update(bit_field3(), value));
}
bool Map::function_with_prototype() {
- return FunctionWithPrototype::decode(bit_field());
+ return FunctionWithPrototype::decode(bit_field3());
}
@@ -4753,15 +4753,16 @@ ACCESSORS(Map, instance_descriptors, DescriptorArray, kDescriptorsOffset)
void Map::set_bit_field3(uint32_t bits) {
- if (kInt32Size != kPointerSize) {
- WRITE_UINT32_FIELD(this, kBitField3Offset + kInt32Size, 0);
- }
- WRITE_UINT32_FIELD(this, kBitField3Offset, bits);
+ // Ensure the upper 2 bits have the same value by sign extending it. This is
+ // necessary to be able to use the 31st bit.
+ int value = bits << 1;
+ WRITE_FIELD(this, kBitField3Offset, Smi::FromInt(value >> 1));
}
uint32_t Map::bit_field3() {
- return READ_UINT32_FIELD(this, kBitField3Offset);
+ Object* value = READ_FIELD(this, kBitField3Offset);
+ return Smi::cast(value)->value();
}
« no previous file with comments | « src/objects.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698