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

Unified Diff: src/objects-inl.h

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" 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-debug.cc ('k') | src/objects-printer.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 e14c1af6db83bbb880df0768ed2c5fe726cf0a23..5ef23c5789f121c957f98a5853450a98475ff716 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -731,10 +731,19 @@ bool Object::IsDeoptimizationInputData() const {
// the entry size.
int length = FixedArray::cast(this)->length();
if (length == 0) return true;
+ if (length < DeoptimizationInputData::kFirstDeoptEntryIndex) return false;
- length -= DeoptimizationInputData::kFirstDeoptEntryIndex;
- return length >= 0 &&
- length % DeoptimizationInputData::kDeoptEntrySize == 0;
+ FixedArray* self = FixedArray::cast(const_cast<Object*>(this));
+ int deopt_count =
+ Smi::cast(self->get(DeoptimizationInputData::kDeoptEntryCountIndex))
+ ->value();
+ int patch_count =
+ Smi::cast(
+ self->get(
+ DeoptimizationInputData::kReturnAddressPatchEntryCountIndex))
+ ->value();
+
+ return length == DeoptimizationInputData::LengthFor(deopt_count, patch_count);
}
@@ -1082,6 +1091,12 @@ bool Object::IsNaN() const {
}
+bool Object::IsMinusZero() const {
+ return this->IsHeapNumber() &&
+ i::IsMinusZero(HeapNumber::cast(this)->value());
+}
+
+
MaybeHandle<Smi> Object::ToSmi(Isolate* isolate, Handle<Object> object) {
if (object->IsSmi()) return Handle<Smi>::cast(object);
if (object->IsHeapNumber()) {
@@ -4703,6 +4718,21 @@ inline void Code::set_is_crankshafted(bool value) {
}
+inline bool Code::is_turbofanned() {
+ ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
+ return IsTurbofannedField::decode(
+ READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
+}
+
+
+inline void Code::set_is_turbofanned(bool value) {
+ ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
+ int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
+ int updated = IsTurbofannedField::update(previous, value);
+ WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
+}
+
+
bool Code::optimizable() {
ASSERT_EQ(FUNCTION, kind());
return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698