Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index efc1764ddfc1784019a1ce29c89b3ccb104412a2..f3a029ee340c79b043bbc7d239fb22cb6e4039b9 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3645,9 +3645,21 @@ int Code::arguments_count() { |
} |
+inline bool Code::is_crankshafted() { |
+ return IsCrankshaftedField::decode( |
+ READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |
+} |
+ |
+ |
+inline void Code::set_is_crankshafted(bool value) { |
+ int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
+ int updated = IsCrankshaftedField::update(previous, value); |
+ WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |
+} |
+ |
+ |
int Code::major_key() { |
ASSERT(kind() == STUB || |
- kind() == COMPILED_STUB || |
kind() == UNARY_OP_IC || |
kind() == BINARY_OP_IC || |
kind() == COMPARE_IC || |
@@ -3661,7 +3673,6 @@ int Code::major_key() { |
void Code::set_major_key(int major) { |
ASSERT(kind() == STUB || |
- kind() == COMPILED_STUB || |
kind() == UNARY_OP_IC || |
kind() == BINARY_OP_IC || |
kind() == COMPARE_IC || |
@@ -3774,7 +3785,7 @@ void Code::set_profiler_ticks(int ticks) { |
unsigned Code::stack_slots() { |
- ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB); |
+ ASSERT(is_crankshafted()); |
return StackSlotsField::decode( |
READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); |
} |
@@ -3782,7 +3793,7 @@ unsigned Code::stack_slots() { |
void Code::set_stack_slots(unsigned slots) { |
CHECK(slots <= (1 << kStackSlotsBitCount)); |
- ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB); |
+ ASSERT(is_crankshafted()); |
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); |
int updated = StackSlotsField::update(previous, slots); |
WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); |
@@ -3790,7 +3801,7 @@ void Code::set_stack_slots(unsigned slots) { |
unsigned Code::safepoint_table_offset() { |
- ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB); |
+ ASSERT(is_crankshafted()); |
return SafepointTableOffsetField::decode( |
READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |
} |
@@ -3798,7 +3809,7 @@ unsigned Code::safepoint_table_offset() { |
void Code::set_safepoint_table_offset(unsigned offset) { |
CHECK(offset <= (1 << kSafepointTableOffsetBitCount)); |
- ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB); |
+ ASSERT(is_crankshafted()); |
ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize))); |
int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |
int updated = SafepointTableOffsetField::update(previous, offset); |