Reviewers: Hannes Payer,
Description:
Deprecate several unchecked accessors.
[email protected]
BUG=v8:1490
Please review this at https://codereview.chromium.org/16663009/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mark-compact.cc
M src/objects-inl.h
M src/objects.h
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
0501ccf5805a0c752a01c4876895ba2b7863bf53..c4f6f1330864853328dacd01e59859c0a62aad0f
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2448,7 +2448,7 @@ void MarkCompactCollector::ClearNonLiveReferences() {
// This map is used for inobject slack tracking and has been detached
// from SharedFunctionInfo during the mark phase.
// Since it survived the GC, reattach it now.
- map->unchecked_constructor()->shared()->AttachInitialMap(map);
+
JSFunction::cast(map->constructor())->shared()->AttachInitialMap(map);
}
ClearNonLivePrototypeTransitions(map);
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index
24af123da677f3a7193ba5658cdc80d6be5251e2..e06b28c56c42622e3e1672e14beef502dd2b244f
100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2108,13 +2108,6 @@ void FixedArray::set_unchecked(Heap* heap,
}
-void FixedArray::set_null_unchecked(Heap* heap, int index) {
- ASSERT(index >= 0 && index < this->length());
- ASSERT(!heap->InNewSpace(heap->null_value()));
- WRITE_FIELD(this, kHeaderSize + index * kPointerSize,
heap->null_value());
-}
-
-
double* FixedDoubleArray::data_start() {
return reinterpret_cast<double*>(FIELD_ADDR(this, kHeaderSize));
}
@@ -3577,11 +3570,6 @@ bool Map::is_dictionary_map() {
}
-JSFunction* Map::unchecked_constructor() {
- return reinterpret_cast<JSFunction*>(READ_FIELD(this,
kConstructorOffset));
-}
-
-
Code::Flags Code::flags() {
return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset));
}
@@ -4744,11 +4732,6 @@ Code* SharedFunctionInfo::code() {
}
-Code* SharedFunctionInfo::unchecked_code() {
- return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset));
-}
-
-
void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
WRITE_FIELD(this, kCodeOffset, value);
CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value,
mode);
@@ -5285,12 +5268,6 @@ int Code::body_size() {
}
-FixedArray* Code::unchecked_deoptimization_data() {
- return reinterpret_cast<FixedArray*>(
- READ_FIELD(this, kDeoptimizationDataOffset));
-}
-
-
ByteArray* Code::unchecked_relocation_info() {
return reinterpret_cast<ByteArray*>(READ_FIELD(this,
kRelocationInfoOffset));
}
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index
5ff345072539de8de3528492c96898fd6541de6e..0edba9c5f04d622e013fcc21488faf802c50ba71
100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2587,7 +2587,6 @@ class FixedArray: public FixedArrayBase {
// Setters with less debug checks for the GC to use.
inline void set_unchecked(int index, Smi* value);
- inline void set_null_unchecked(Heap* heap, int index);
inline void set_unchecked(Heap* heap, int index, Object* value,
WriteBarrierMode mode);
@@ -4553,7 +4552,6 @@ class Code: public HeapObject {
// Unchecked accessors to be used during GC.
inline ByteArray* unchecked_relocation_info();
- inline FixedArray* unchecked_deoptimization_data();
inline int relocation_size();
@@ -5320,8 +5318,6 @@ class Map: public HeapObject {
// [constructor]: points back to the function responsible for this map.
DECL_ACCESSORS(constructor, Object)
- inline JSFunction* unchecked_constructor();
-
// [instance descriptors]: describes the object.
DECL_ACCESSORS(instance_descriptors, DescriptorArray)
inline void InitializeDescriptors(DescriptorArray* descriptors);
@@ -5940,8 +5936,6 @@ class SharedFunctionInfo: public HeapObject {
// [construct stub]: Code stub for constructing instances of this
function.
DECL_ACCESSORS(construct_stub, Code)
- inline Code* unchecked_code();
-
// Returns if this function has been compiled to native code yet.
inline bool is_compiled();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.