Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index deb33653f7844c70ae9d848f5a59e62cbbe43989..2acbe70a8295f15cde8a5b5db2ad5a4cbaf2ae07 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5320,23 +5320,18 @@ INT_ACCESSORS(Code, prologue_offset, kPrologueOffset) |
ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset) |
ACCESSORS(Code, handler_table, FixedArray, kHandlerTableOffset) |
ACCESSORS(Code, deoptimization_data, FixedArray, kDeoptimizationDataOffset) |
- |
- |
-// Type feedback slot: type_feedback_info for FUNCTIONs, stub_info for STUBs. |
-void Code::InitializeTypeFeedbackInfoNoWriteBarrier(Object* value) { |
- WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |
-} |
+ACCESSORS(Code, raw_type_feedback_info, Object, kTypeFeedbackInfoOffset) |
Object* Code::type_feedback_info() { |
ASSERT(kind() == FUNCTION); |
- return Object::cast(READ_FIELD(this, kTypeFeedbackInfoOffset)); |
+ return raw_type_feedback_info(); |
} |
void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { |
ASSERT(kind() == FUNCTION); |
- WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |
+ set_raw_type_feedback_info(value, mode); |
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |
value, mode); |
} |
@@ -5344,13 +5339,13 @@ void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { |
Object* Code::next_code_link() { |
CHECK(kind() == OPTIMIZED_FUNCTION); |
- return Object::cast(READ_FIELD(this, kTypeFeedbackInfoOffset)); |
+ return raw_type_feedback_info(); |
} |
void Code::set_next_code_link(Object* value, WriteBarrierMode mode) { |
CHECK(kind() == OPTIMIZED_FUNCTION); |
- WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |
+ set_raw_type_feedback_info(value); |
CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |
value, mode); |
} |
@@ -5359,8 +5354,7 @@ void Code::set_next_code_link(Object* value, WriteBarrierMode mode) { |
int Code::stub_info() { |
ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || |
kind() == BINARY_OP_IC || kind() == LOAD_IC); |
- Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); |
- return Smi::cast(value)->value(); |
+ return Smi::cast(raw_type_feedback_info())->value(); |
} |
@@ -5373,7 +5367,7 @@ void Code::set_stub_info(int value) { |
kind() == KEYED_LOAD_IC || |
kind() == STORE_IC || |
kind() == KEYED_STORE_IC); |
- WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); |
+ set_raw_type_feedback_info(Smi::FromInt(value)); |
} |