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

Unified Diff: src/objects-inl.h

Issue 428183003: Fix issue with storing 31-bit bitfield as Smi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reverted v8.h Created 6 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
« no previous file with comments | « src/objects.h ('k') | no next file » | 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 e14c1af6db83bbb880df0768ed2c5fe726cf0a23..fe1e977c141f9f370fb9ace548ad0a8a1ac76be6 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6152,13 +6152,14 @@ void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) {
uint32_t Code::stub_key() {
ASSERT(IsCodeStubOrIC());
- return Smi::cast(raw_type_feedback_info())->value() - Smi::kMinValue;
+ Smi* smi_key = Smi::cast(raw_type_feedback_info());
+ return static_cast<uint32_t>(smi_key->value());
}
void Code::set_stub_key(uint32_t key) {
ASSERT(IsCodeStubOrIC());
- set_raw_type_feedback_info(Smi::FromInt(key + Smi::kMinValue));
+ set_raw_type_feedback_info(Smi::FromInt(key));
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698