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

Unified Diff: src/objects.h

Issue 141363005: A64: Synchronize with r15204. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/mksnapshot.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 4b78c95193a6d7d0421c49eaa993f1ee5d47c958..6f84a38dc28bc38d8a6eafd88ca76cd8cbc3af6c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -121,6 +121,8 @@
// - ExternalTwoByteInternalizedString
// - Symbol
// - HeapNumber
+// - Cell
+// - PropertyCell
// - Code
// - Map
// - Oddball
@@ -350,7 +352,8 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;
V(MAP_TYPE) \
V(CODE_TYPE) \
V(ODDBALL_TYPE) \
- V(JS_GLOBAL_PROPERTY_CELL_TYPE) \
+ V(CELL_TYPE) \
+ V(PROPERTY_CELL_TYPE) \
V(BOX_TYPE) \
\
V(HEAP_NUMBER_TYPE) \
@@ -671,7 +674,8 @@ enum InstanceType {
MAP_TYPE,
CODE_TYPE,
ODDBALL_TYPE,
- JS_GLOBAL_PROPERTY_CELL_TYPE,
+ CELL_TYPE,
+ PROPERTY_CELL_TYPE,
BOX_TYPE,
// "Data", objects that cannot contain non-map-word pointers to heap
@@ -843,6 +847,7 @@ class Failure;
class FixedArrayBase;
class ObjectVisitor;
class StringStream;
+class Type;
struct ValueInfo : public Malloced {
ValueInfo() : type(FIRST_TYPE), ptr(NULL), str(NULL), number(0) { }
@@ -1013,7 +1018,8 @@ class MaybeObject BASE_EMBEDDED {
V(JSGlobalProxy) \
V(UndetectableObject) \
V(AccessCheckNeeded) \
- V(JSGlobalPropertyCell) \
+ V(Cell) \
+ V(PropertyCell) \
V(ObjectHashTable) \
@@ -2567,7 +2573,7 @@ class FixedArray: public FixedArrayBase {
inline void set(int index, Object* value);
inline bool is_the_hole(int index);
- // Setter that doesn't need write barrier).
+ // Setter that doesn't need write barrier.
inline void set(int index, Smi* value);
// Setter with explicit barrier mode.
inline void set(int index, Object* value, WriteBarrierMode mode);
@@ -2581,12 +2587,6 @@ class FixedArray: public FixedArrayBase {
inline void set_null(Heap* heap, int index);
inline void set_the_hole(int index);
- // 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);
-
inline Object** GetFirstElementAddress();
inline bool ContainsOnlySmisOrHoles();
@@ -4380,7 +4380,8 @@ class DeoptimizationOutputData: public FixedArray {
// Forward declaration.
-class JSGlobalPropertyCell;
+class Cell;
+class PropertyCell;
// TypeFeedbackCells is a fixed array used to hold the association between
// cache cells and AST ids for code generated by the full compiler.
@@ -4397,8 +4398,8 @@ class TypeFeedbackCells: public FixedArray {
inline void SetAstId(int index, TypeFeedbackId id);
// Accessors for global property cells holding the cache values.
- inline JSGlobalPropertyCell* Cell(int index);
- inline void SetCell(int index, JSGlobalPropertyCell* cell);
+ inline Cell* GetCell(int index);
+ inline void SetCell(int index, Cell* cell);
// The object that indicates an uninitialized cache.
static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
@@ -4548,7 +4549,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();
@@ -4664,7 +4664,7 @@ class Code: public HeapObject {
inline byte to_boolean_state();
// [compare_nil]: For kind COMPARE_NIL_IC tells what state the stub is in.
- byte compare_nil_types();
+ byte compare_nil_state();
// [has_function_cache]: For kind STUB tells whether there is a function
// cache is passed to the stub.
@@ -4827,6 +4827,7 @@ class Code: public HeapObject {
void MakeOlder(MarkingParity);
static bool IsYoungSequence(byte* sequence);
bool IsOld();
+ int GetAge();
void PrintDeoptLocation(int bailout_id);
@@ -4968,8 +4969,8 @@ class Code: public HeapObject {
// Code aging
byte* FindCodeAgeSequence();
- static void GetCodeAgeAndParity(Code* code, Age* age,
- MarkingParity* parity);
+ static void GetCodeAgeAndParity(Code* code, Age* age,
+ MarkingParity* parity);
static void GetCodeAgeAndParity(byte* sequence, Age* age,
MarkingParity* parity);
static Code* GetCodeAgeStub(Age age, MarkingParity parity);
@@ -5314,8 +5315,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);
@@ -5367,8 +5366,7 @@ class Map: public HeapObject {
inline void SetNumberOfProtoTransitions(int value) {
FixedArray* cache = GetPrototypeTransitions();
ASSERT(cache->length() != 0);
- cache->set_unchecked(kProtoTransitionNumberOfEntriesOffset,
- Smi::FromInt(value));
+ cache->set(kProtoTransitionNumberOfEntriesOffset, Smi::FromInt(value));
}
// Lookup in the map's instance descriptors and fill out the result
@@ -5402,7 +5400,7 @@ class Map: public HeapObject {
set_bit_field3(NumberOfOwnDescriptorsBits::update(bit_field3(), number));
}
- inline JSGlobalPropertyCell* RetrieveDescriptorsPointer();
+ inline Cell* RetrieveDescriptorsPointer();
int EnumLength() {
return EnumLengthBits::decode(bit_field3());
@@ -5864,8 +5862,8 @@ class Script: public Struct {
V(Math, min, MathMin) \
V(Math, imul, MathImul)
-
enum BuiltinFunctionId {
+ kArrayCode,
#define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
k##name,
FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID)
@@ -5934,8 +5932,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();
@@ -6582,8 +6578,6 @@ class JSFunction: public JSObject {
// can be shared by instances.
DECL_ACCESSORS(shared, SharedFunctionInfo)
- inline SharedFunctionInfo* unchecked_shared();
-
// [context]: The context for this function.
inline Context* context();
inline Object* unchecked_context();
@@ -6817,7 +6811,7 @@ class GlobalObject: public JSObject {
DECL_ACCESSORS(global_receiver, JSObject)
// Retrieve the property cell used to store a property.
- JSGlobalPropertyCell* GetPropertyCell(LookupResult* result);
+ PropertyCell* GetPropertyCell(LookupResult* result);
// This is like GetProperty, but is used when you know the lookup won't fail
// by throwing an exception. This is for the debug and builtins global
@@ -6829,7 +6823,7 @@ class GlobalObject: public JSObject {
}
// Ensure that the global object has a cell for the given property name.
- static Handle<JSGlobalPropertyCell> EnsurePropertyCell(
+ static Handle<PropertyCell> EnsurePropertyCell(
Handle<GlobalObject> global,
Handle<Name> name);
// TODO(kmillikin): This function can be eliminated once the stub cache is
@@ -7128,11 +7122,6 @@ class JSRegExp: public JSObject {
// Set implementation data after the object has been prepared.
inline void SetDataAt(int index, Object* value);
- // Used during GC when flushing code or setting age.
- inline Object* DataAtUnchecked(int index);
- inline void SetDataAtUnchecked(int index, Object* value, Heap* heap);
- inline Type TypeTagUnchecked();
-
static int code_index(bool is_ascii) {
if (is_ascii) {
return kIrregexpASCIICodeIndex;
@@ -8556,16 +8545,18 @@ class Oddball: public HeapObject {
};
-class JSGlobalPropertyCell: public HeapObject {
+class Cell: public HeapObject {
public:
// [value]: value of the global property.
DECL_ACCESSORS(value, Object)
// Casting.
- static inline JSGlobalPropertyCell* cast(Object* obj);
+ static inline Cell* cast(Object* obj);
- static inline JSGlobalPropertyCell* FromValueAddress(Address value) {
- return cast(FromAddress(value - kValueOffset));
+ static inline Cell* FromValueAddress(Address value) {
+ Object* result = FromAddress(value - kValueOffset);
+ ASSERT(result->IsCell() || result->IsPropertyCell());
+ return static_cast<Cell*>(result);
}
inline Address ValueAddress() {
@@ -8573,8 +8564,8 @@ class JSGlobalPropertyCell: public HeapObject {
}
// Dispatched behavior.
- DECLARE_PRINTER(JSGlobalPropertyCell)
- DECLARE_VERIFIER(JSGlobalPropertyCell)
+ DECLARE_PRINTER(Cell)
+ DECLARE_VERIFIER(Cell)
// Layout description.
static const int kValueOffset = HeapObject::kHeaderSize;
@@ -8585,7 +8576,38 @@ class JSGlobalPropertyCell: public HeapObject {
kSize> BodyDescriptor;
private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(JSGlobalPropertyCell);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Cell);
+};
+
+
+class PropertyCell: public Cell {
+ public:
+ Type* type();
+ void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
+
+ // Casting.
+ static inline PropertyCell* cast(Object* obj);
+
+ inline Address TypeAddress() {
+ return address() + kTypeOffset;
+ }
+
+ // Dispatched behavior.
+ DECLARE_PRINTER(PropertyCell)
+ DECLARE_VERIFIER(PropertyCell)
+
+ // Layout description.
+ static const int kTypeOffset = kValueOffset + kPointerSize;
+ static const int kSize = kTypeOffset + kPointerSize;
+
+ typedef FixedBodyDescriptor<
+ kValueOffset,
+ kTypeOffset + kPointerSize,
+ PropertyCell::kSize> BodyDescriptor;
+
+ private:
+ DECL_ACCESSORS(type_raw, Object)
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell);
};
@@ -9604,7 +9626,7 @@ class ObjectVisitor BASE_EMBEDDED {
virtual void VisitCodeEntry(Address entry_address);
// Visits a global property cell reference in the instruction stream.
- virtual void VisitGlobalPropertyCell(RelocInfo* rinfo);
+ virtual void VisitCell(RelocInfo* rinfo);
// Visits a runtime entry in the instruction stream.
virtual void VisitRuntimeEntry(RelocInfo* rinfo) {}
« no previous file with comments | « src/mksnapshot.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698