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

Side by Side Diff: src/objects.h

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips64/lithium-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd>
9
8 #include "src/allocation.h" 10 #include "src/allocation.h"
9 #include "src/assert-scope.h" 11 #include "src/assert-scope.h"
10 #include "src/bailout-reason.h" 12 #include "src/bailout-reason.h"
11 #include "src/base/bits.h" 13 #include "src/base/bits.h"
12 #include "src/builtins.h" 14 #include "src/builtins.h"
13 #include "src/checks.h" 15 #include "src/checks.h"
14 #include "src/elements-kind.h" 16 #include "src/elements-kind.h"
15 #include "src/field-index.h" 17 #include "src/field-index.h"
16 #include "src/flags.h" 18 #include "src/flags.h"
17 #include "src/list.h" 19 #include "src/list.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // - BreakPointInfo 143 // - BreakPointInfo
142 // - CodeCache 144 // - CodeCache
143 // 145 //
144 // Formats of Object*: 146 // Formats of Object*:
145 // Smi: [31 bit signed int] 0 147 // Smi: [31 bit signed int] 0
146 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01 148 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01
147 149
148 namespace v8 { 150 namespace v8 {
149 namespace internal { 151 namespace internal {
150 152
151 class OStream;
152
153 enum KeyedAccessStoreMode { 153 enum KeyedAccessStoreMode {
154 STANDARD_STORE, 154 STANDARD_STORE,
155 STORE_TRANSITION_SMI_TO_OBJECT, 155 STORE_TRANSITION_SMI_TO_OBJECT,
156 STORE_TRANSITION_SMI_TO_DOUBLE, 156 STORE_TRANSITION_SMI_TO_DOUBLE,
157 STORE_TRANSITION_DOUBLE_TO_OBJECT, 157 STORE_TRANSITION_DOUBLE_TO_OBJECT,
158 STORE_TRANSITION_HOLEY_SMI_TO_OBJECT, 158 STORE_TRANSITION_HOLEY_SMI_TO_OBJECT,
159 STORE_TRANSITION_HOLEY_SMI_TO_DOUBLE, 159 STORE_TRANSITION_HOLEY_SMI_TO_DOUBLE,
160 STORE_TRANSITION_HOLEY_DOUBLE_TO_OBJECT, 160 STORE_TRANSITION_HOLEY_DOUBLE_TO_OBJECT,
161 STORE_AND_GROW_NO_TRANSITION, 161 STORE_AND_GROW_NO_TRANSITION,
162 STORE_AND_GROW_TRANSITION_SMI_TO_OBJECT, 162 STORE_AND_GROW_TRANSITION_SMI_TO_OBJECT,
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 // A template-ized version of the IsXXX functions. 862 // A template-ized version of the IsXXX functions.
863 template <class C> inline bool Is(Object* obj); 863 template <class C> inline bool Is(Object* obj);
864 864
865 #ifdef VERIFY_HEAP 865 #ifdef VERIFY_HEAP
866 #define DECLARE_VERIFIER(Name) void Name##Verify(); 866 #define DECLARE_VERIFIER(Name) void Name##Verify();
867 #else 867 #else
868 #define DECLARE_VERIFIER(Name) 868 #define DECLARE_VERIFIER(Name)
869 #endif 869 #endif
870 870
871 #ifdef OBJECT_PRINT 871 #ifdef OBJECT_PRINT
872 #define DECLARE_PRINTER(Name) void Name##Print(OStream& os); // NOLINT 872 #define DECLARE_PRINTER(Name) void Name##Print(std::ostream& os); // NOLINT
873 #else 873 #else
874 #define DECLARE_PRINTER(Name) 874 #define DECLARE_PRINTER(Name)
875 #endif 875 #endif
876 876
877 877
878 #define OBJECT_TYPE_LIST(V) \ 878 #define OBJECT_TYPE_LIST(V) \
879 V(Smi) \ 879 V(Smi) \
880 V(HeapObject) \ 880 V(HeapObject) \
881 V(Number) 881 V(Number)
882 882
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 DECLARE_CAST(Object) 1215 DECLARE_CAST(Object)
1216 1216
1217 // Layout description. 1217 // Layout description.
1218 static const int kHeaderSize = 0; // Object does not take up any space. 1218 static const int kHeaderSize = 0; // Object does not take up any space.
1219 1219
1220 #ifdef OBJECT_PRINT 1220 #ifdef OBJECT_PRINT
1221 // For our gdb macros, we should perhaps change these in the future. 1221 // For our gdb macros, we should perhaps change these in the future.
1222 void Print(); 1222 void Print();
1223 1223
1224 // Prints this object with details. 1224 // Prints this object with details.
1225 void Print(OStream& os); // NOLINT 1225 void Print(std::ostream& os); // NOLINT
1226 #endif 1226 #endif
1227 1227
1228 private: 1228 private:
1229 friend class LookupIterator; 1229 friend class LookupIterator;
1230 friend class PrototypeIterator; 1230 friend class PrototypeIterator;
1231 1231
1232 // Return the map of the root of object's prototype chain. 1232 // Return the map of the root of object's prototype chain.
1233 Map* GetRootMap(Isolate* isolate); 1233 Map* GetRootMap(Isolate* isolate);
1234 1234
1235 DISALLOW_IMPLICIT_CONSTRUCTORS(Object); 1235 DISALLOW_IMPLICIT_CONSTRUCTORS(Object);
1236 }; 1236 };
1237 1237
1238 1238
1239 struct Brief { 1239 struct Brief {
1240 explicit Brief(const Object* const v) : value(v) {} 1240 explicit Brief(const Object* const v) : value(v) {}
1241 const Object* value; 1241 const Object* value;
1242 }; 1242 };
1243 1243
1244 1244
1245 OStream& operator<<(OStream& os, const Brief& v); 1245 std::ostream& operator<<(std::ostream& os, const Brief& v);
1246 1246
1247 1247
1248 // Smi represents integer Numbers that can be stored in 31 bits. 1248 // Smi represents integer Numbers that can be stored in 31 bits.
1249 // Smis are immediate which means they are NOT allocated in the heap. 1249 // Smis are immediate which means they are NOT allocated in the heap.
1250 // The this pointer has the following format: [31 bit signed int] 0 1250 // The this pointer has the following format: [31 bit signed int] 0
1251 // For long smis it has the following format: 1251 // For long smis it has the following format:
1252 // [32 bit signed int] [31 bits zero padding] 0 1252 // [32 bit signed int] [31 bits zero padding] 0
1253 // Smi stands for small integer. 1253 // Smi stands for small integer.
1254 class Smi: public Object { 1254 class Smi: public Object {
1255 public: 1255 public:
1256 // Returns the integer value. 1256 // Returns the integer value.
1257 inline int value() const; 1257 inline int value() const;
1258 1258
1259 // Convert a value to a Smi object. 1259 // Convert a value to a Smi object.
1260 static inline Smi* FromInt(int value); 1260 static inline Smi* FromInt(int value);
1261 1261
1262 static inline Smi* FromIntptr(intptr_t value); 1262 static inline Smi* FromIntptr(intptr_t value);
1263 1263
1264 // Returns whether value can be represented in a Smi. 1264 // Returns whether value can be represented in a Smi.
1265 static inline bool IsValid(intptr_t value); 1265 static inline bool IsValid(intptr_t value);
1266 1266
1267 DECLARE_CAST(Smi) 1267 DECLARE_CAST(Smi)
1268 1268
1269 // Dispatched behavior. 1269 // Dispatched behavior.
1270 void SmiPrint(OStream& os) const; // NOLINT 1270 void SmiPrint(std::ostream& os) const; // NOLINT
1271 DECLARE_VERIFIER(Smi) 1271 DECLARE_VERIFIER(Smi)
1272 1272
1273 static const int kMinValue = 1273 static const int kMinValue =
1274 (static_cast<unsigned int>(-1)) << (kSmiValueSize - 1); 1274 (static_cast<unsigned int>(-1)) << (kSmiValueSize - 1);
1275 static const int kMaxValue = -(kMinValue + 1); 1275 static const int kMaxValue = -(kMinValue + 1);
1276 1276
1277 private: 1277 private:
1278 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi); 1278 DISALLOW_IMPLICIT_CONSTRUCTORS(Smi);
1279 }; 1279 };
1280 1280
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 1403
1404 // Return the write barrier mode for this. Callers of this function 1404 // Return the write barrier mode for this. Callers of this function
1405 // must be able to present a reference to an DisallowHeapAllocation 1405 // must be able to present a reference to an DisallowHeapAllocation
1406 // object as a sign that they are not going to use this function 1406 // object as a sign that they are not going to use this function
1407 // from code that allocates and thus invalidates the returned write 1407 // from code that allocates and thus invalidates the returned write
1408 // barrier mode. 1408 // barrier mode.
1409 inline WriteBarrierMode GetWriteBarrierMode( 1409 inline WriteBarrierMode GetWriteBarrierMode(
1410 const DisallowHeapAllocation& promise); 1410 const DisallowHeapAllocation& promise);
1411 1411
1412 // Dispatched behavior. 1412 // Dispatched behavior.
1413 void HeapObjectShortPrint(OStream& os); // NOLINT 1413 void HeapObjectShortPrint(std::ostream& os); // NOLINT
1414 #ifdef OBJECT_PRINT 1414 #ifdef OBJECT_PRINT
1415 void PrintHeader(OStream& os, const char* id); // NOLINT 1415 void PrintHeader(std::ostream& os, const char* id); // NOLINT
1416 #endif 1416 #endif
1417 DECLARE_PRINTER(HeapObject) 1417 DECLARE_PRINTER(HeapObject)
1418 DECLARE_VERIFIER(HeapObject) 1418 DECLARE_VERIFIER(HeapObject)
1419 #ifdef VERIFY_HEAP 1419 #ifdef VERIFY_HEAP
1420 inline void VerifyObjectField(int offset); 1420 inline void VerifyObjectField(int offset);
1421 inline void VerifySmiField(int offset); 1421 inline void VerifySmiField(int offset);
1422 1422
1423 // Verify a pointer is a valid HeapObject pointer that points to object 1423 // Verify a pointer is a valid HeapObject pointer that points to object
1424 // areas in the heap. 1424 // areas in the heap.
1425 static void VerifyHeapPointer(Object* p); 1425 static void VerifyHeapPointer(Object* p);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 public: 1492 public:
1493 // [value]: number value. 1493 // [value]: number value.
1494 inline double value() const; 1494 inline double value() const;
1495 inline void set_value(double value); 1495 inline void set_value(double value);
1496 1496
1497 DECLARE_CAST(HeapNumber) 1497 DECLARE_CAST(HeapNumber)
1498 1498
1499 // Dispatched behavior. 1499 // Dispatched behavior.
1500 bool HeapNumberBooleanValue(); 1500 bool HeapNumberBooleanValue();
1501 1501
1502 void HeapNumberPrint(OStream& os); // NOLINT 1502 void HeapNumberPrint(std::ostream& os); // NOLINT
1503 DECLARE_VERIFIER(HeapNumber) 1503 DECLARE_VERIFIER(HeapNumber)
1504 1504
1505 inline int get_exponent(); 1505 inline int get_exponent();
1506 inline int get_sign(); 1506 inline int get_sign();
1507 1507
1508 // Layout description. 1508 // Layout description.
1509 static const int kValueOffset = HeapObject::kHeaderSize; 1509 static const int kValueOffset = HeapObject::kHeaderSize;
1510 // IEEE doubles are two 32 bit words. The first is just mantissa, the second 1510 // IEEE doubles are two 32 bit words. The first is just mantissa, the second
1511 // is a mixture of sign, exponent and mantissa. The offsets of two 32 bit 1511 // is a mixture of sign, exponent and mantissa. The offsets of two 32 bit
1512 // words within double numbers are endian dependent and they are set 1512 // words within double numbers are endian dependent and they are set
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 Handle<Name> key); 2109 Handle<Name> key);
2110 static Handle<Object> GetDataProperty(LookupIterator* it); 2110 static Handle<Object> GetDataProperty(LookupIterator* it);
2111 2111
2112 DECLARE_CAST(JSObject) 2112 DECLARE_CAST(JSObject)
2113 2113
2114 // Dispatched behavior. 2114 // Dispatched behavior.
2115 void JSObjectShortPrint(StringStream* accumulator); 2115 void JSObjectShortPrint(StringStream* accumulator);
2116 DECLARE_PRINTER(JSObject) 2116 DECLARE_PRINTER(JSObject)
2117 DECLARE_VERIFIER(JSObject) 2117 DECLARE_VERIFIER(JSObject)
2118 #ifdef OBJECT_PRINT 2118 #ifdef OBJECT_PRINT
2119 void PrintProperties(OStream& os); // NOLINT 2119 void PrintProperties(std::ostream& os); // NOLINT
2120 void PrintElements(OStream& os); // NOLINT 2120 void PrintElements(std::ostream& os); // NOLINT
2121 void PrintTransitions(OStream& os); // NOLINT 2121 void PrintTransitions(std::ostream& os); // NOLINT
2122 #endif 2122 #endif
2123 2123
2124 static void PrintElementsTransition( 2124 static void PrintElementsTransition(
2125 FILE* file, Handle<JSObject> object, 2125 FILE* file, Handle<JSObject> object,
2126 ElementsKind from_kind, Handle<FixedArrayBase> from_elements, 2126 ElementsKind from_kind, Handle<FixedArrayBase> from_elements,
2127 ElementsKind to_kind, Handle<FixedArrayBase> to_elements); 2127 ElementsKind to_kind, Handle<FixedArrayBase> to_elements);
2128 2128
2129 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map); 2129 void PrintInstanceMigration(FILE* file, Map* original_map, Map* new_map);
2130 2130
2131 #ifdef DEBUG 2131 #ifdef DEBUG
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize; 3031 static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize;
3032 3032
3033 // Layout of descriptor. 3033 // Layout of descriptor.
3034 static const int kDescriptorKey = 0; 3034 static const int kDescriptorKey = 0;
3035 static const int kDescriptorDetails = 1; 3035 static const int kDescriptorDetails = 1;
3036 static const int kDescriptorValue = 2; 3036 static const int kDescriptorValue = 2;
3037 static const int kDescriptorSize = 3; 3037 static const int kDescriptorSize = 3;
3038 3038
3039 #ifdef OBJECT_PRINT 3039 #ifdef OBJECT_PRINT
3040 // Print all the descriptors. 3040 // Print all the descriptors.
3041 void PrintDescriptors(OStream& os); // NOLINT 3041 void PrintDescriptors(std::ostream& os); // NOLINT
3042 #endif 3042 #endif
3043 3043
3044 #ifdef DEBUG 3044 #ifdef DEBUG
3045 // Is the descriptor array sorted and without duplicates? 3045 // Is the descriptor array sorted and without duplicates?
3046 bool IsSortedNoDuplicates(int valid_descriptors = -1); 3046 bool IsSortedNoDuplicates(int valid_descriptors = -1);
3047 3047
3048 // Is the descriptor array consistent with the back pointers in targets? 3048 // Is the descriptor array consistent with the back pointers in targets?
3049 bool IsConsistentWithBackPointers(Map* current_map); 3049 bool IsConsistentWithBackPointers(Map* current_map);
3050 3050
3051 // Are two DescriptorArrays equal? 3051 // Are two DescriptorArrays equal?
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
3555 // Creates a new dictionary. 3555 // Creates a new dictionary.
3556 MUST_USE_RESULT static Handle<Derived> New( 3556 MUST_USE_RESULT static Handle<Derived> New(
3557 Isolate* isolate, 3557 Isolate* isolate,
3558 int at_least_space_for, 3558 int at_least_space_for,
3559 PretenureFlag pretenure = NOT_TENURED); 3559 PretenureFlag pretenure = NOT_TENURED);
3560 3560
3561 // Ensure enough space for n additional elements. 3561 // Ensure enough space for n additional elements.
3562 static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key); 3562 static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key);
3563 3563
3564 #ifdef OBJECT_PRINT 3564 #ifdef OBJECT_PRINT
3565 void Print(OStream& os); // NOLINT 3565 void Print(std::ostream& os); // NOLINT
3566 #endif 3566 #endif
3567 // Returns the key (slow). 3567 // Returns the key (slow).
3568 Object* SlowReverseLookup(Object* value); 3568 Object* SlowReverseLookup(Object* value);
3569 3569
3570 // Sets the entry to (key, value) pair. 3570 // Sets the entry to (key, value) pair.
3571 inline void SetEntry(int entry, 3571 inline void SetEntry(int entry,
3572 Handle<Object> key, 3572 Handle<Object> key,
3573 Handle<Object> value); 3573 Handle<Object> value);
3574 inline void SetEntry(int entry, 3574 inline void SetEntry(int entry,
3575 Handle<Object> key, 3575 Handle<Object> key,
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4857 } 4857 }
4858 4858
4859 // Allocates a DeoptimizationInputData. 4859 // Allocates a DeoptimizationInputData.
4860 static Handle<DeoptimizationInputData> New(Isolate* isolate, 4860 static Handle<DeoptimizationInputData> New(Isolate* isolate,
4861 int deopt_entry_count, 4861 int deopt_entry_count,
4862 PretenureFlag pretenure); 4862 PretenureFlag pretenure);
4863 4863
4864 DECLARE_CAST(DeoptimizationInputData) 4864 DECLARE_CAST(DeoptimizationInputData)
4865 4865
4866 #ifdef ENABLE_DISASSEMBLER 4866 #ifdef ENABLE_DISASSEMBLER
4867 void DeoptimizationInputDataPrint(OStream& os); // NOLINT 4867 void DeoptimizationInputDataPrint(std::ostream& os); // NOLINT
4868 #endif 4868 #endif
4869 4869
4870 private: 4870 private:
4871 static int IndexForEntry(int i) { 4871 static int IndexForEntry(int i) {
4872 return kFirstDeoptEntryIndex + (i * kDeoptEntrySize); 4872 return kFirstDeoptEntryIndex + (i * kDeoptEntrySize);
4873 } 4873 }
4874 4874
4875 4875
4876 static int LengthFor(int entry_count) { return IndexForEntry(entry_count); } 4876 static int LengthFor(int entry_count) { return IndexForEntry(entry_count); }
4877 }; 4877 };
(...skipping 24 matching lines...) Expand all
4902 } 4902 }
4903 4903
4904 // Allocates a DeoptimizationOutputData. 4904 // Allocates a DeoptimizationOutputData.
4905 static Handle<DeoptimizationOutputData> New(Isolate* isolate, 4905 static Handle<DeoptimizationOutputData> New(Isolate* isolate,
4906 int number_of_deopt_points, 4906 int number_of_deopt_points,
4907 PretenureFlag pretenure); 4907 PretenureFlag pretenure);
4908 4908
4909 DECLARE_CAST(DeoptimizationOutputData) 4909 DECLARE_CAST(DeoptimizationOutputData)
4910 4910
4911 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) 4911 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
4912 void DeoptimizationOutputDataPrint(OStream& os); // NOLINT 4912 void DeoptimizationOutputDataPrint(std::ostream& os); // NOLINT
4913 #endif 4913 #endif
4914 }; 4914 };
4915 4915
4916 4916
4917 // Forward declaration. 4917 // Forward declaration.
4918 class Cell; 4918 class Cell;
4919 class PropertyCell; 4919 class PropertyCell;
4920 class SafepointEntry; 4920 class SafepointEntry;
4921 class TypeFeedbackInfo; 4921 class TypeFeedbackInfo;
4922 4922
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
4968 NORMAL, 4968 NORMAL,
4969 FAST 4969 FAST
4970 }; 4970 };
4971 4971
4972 static const int kPrologueOffsetNotSet = -1; 4972 static const int kPrologueOffsetNotSet = -1;
4973 4973
4974 #ifdef ENABLE_DISASSEMBLER 4974 #ifdef ENABLE_DISASSEMBLER
4975 // Printing 4975 // Printing
4976 static const char* ICState2String(InlineCacheState state); 4976 static const char* ICState2String(InlineCacheState state);
4977 static const char* StubType2String(StubType type); 4977 static const char* StubType2String(StubType type);
4978 static void PrintExtraICState(OStream& os, // NOLINT 4978 static void PrintExtraICState(std::ostream& os, // NOLINT
4979 Kind kind, ExtraICState extra); 4979 Kind kind, ExtraICState extra);
4980 void Disassemble(const char* name, OStream& os); // NOLINT 4980 void Disassemble(const char* name, std::ostream& os); // NOLINT
4981 #endif // ENABLE_DISASSEMBLER 4981 #endif // ENABLE_DISASSEMBLER
4982 4982
4983 // [instruction_size]: Size of the native instructions 4983 // [instruction_size]: Size of the native instructions
4984 inline int instruction_size() const; 4984 inline int instruction_size() const;
4985 inline void set_instruction_size(int value); 4985 inline void set_instruction_size(int value);
4986 4986
4987 // [relocation_info]: Code relocation information 4987 // [relocation_info]: Code relocation information
4988 DECL_ACCESSORS(relocation_info, ByteArray) 4988 DECL_ACCESSORS(relocation_info, ByteArray)
4989 void InvalidateRelocation(); 4989 void InvalidateRelocation();
4990 void InvalidateEmbeddedObjects(); 4990 void InvalidateEmbeddedObjects();
(...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after
7068 7068
7069 // Printing support. 7069 // Printing support.
7070 struct SourceCodeOf { 7070 struct SourceCodeOf {
7071 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) 7071 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1)
7072 : value(v), max_length(max) {} 7072 : value(v), max_length(max) {}
7073 const SharedFunctionInfo* value; 7073 const SharedFunctionInfo* value;
7074 int max_length; 7074 int max_length;
7075 }; 7075 };
7076 7076
7077 7077
7078 OStream& operator<<(OStream& os, const SourceCodeOf& v); 7078 std::ostream& operator<<(std::ostream& os, const SourceCodeOf& v);
7079 7079
7080 7080
7081 class JSGeneratorObject: public JSObject { 7081 class JSGeneratorObject: public JSObject {
7082 public: 7082 public:
7083 // [function]: The function corresponding to this generator object. 7083 // [function]: The function corresponding to this generator object.
7084 DECL_ACCESSORS(function, JSFunction) 7084 DECL_ACCESSORS(function, JSFunction)
7085 7085
7086 // [context]: The context of the suspended computation. 7086 // [context]: The context of the suspended computation.
7087 DECL_ACCESSORS(context, Context) 7087 DECL_ACCESSORS(context, Context)
7088 7088
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
8781 8781
8782 DECLARE_CAST(String) 8782 DECLARE_CAST(String)
8783 8783
8784 void PrintOn(FILE* out); 8784 void PrintOn(FILE* out);
8785 8785
8786 // For use during stack traces. Performs rudimentary sanity check. 8786 // For use during stack traces. Performs rudimentary sanity check.
8787 bool LooksValid(); 8787 bool LooksValid();
8788 8788
8789 // Dispatched behavior. 8789 // Dispatched behavior.
8790 void StringShortPrint(StringStream* accumulator); 8790 void StringShortPrint(StringStream* accumulator);
8791 void PrintUC16(OStream& os, int start = 0, int end = -1); // NOLINT 8791 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT
8792 #ifdef OBJECT_PRINT 8792 #ifdef OBJECT_PRINT
8793 char* ToAsciiArray(); 8793 char* ToAsciiArray();
8794 #endif 8794 #endif
8795 DECLARE_PRINTER(String) 8795 DECLARE_PRINTER(String)
8796 DECLARE_VERIFIER(String) 8796 DECLARE_VERIFIER(String)
8797 8797
8798 inline bool IsFlat(); 8798 inline bool IsFlat();
8799 8799
8800 // Layout description. 8800 // Layout description.
8801 static const int kLengthOffset = Name::kSize; 8801 static const int kLengthOffset = Name::kSize;
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
9706 // [table]: the backing hash table mapping keys to values. 9706 // [table]: the backing hash table mapping keys to values.
9707 DECL_ACCESSORS(table, Object) 9707 DECL_ACCESSORS(table, Object)
9708 9708
9709 // [index]: The index into the data table. 9709 // [index]: The index into the data table.
9710 DECL_ACCESSORS(index, Object) 9710 DECL_ACCESSORS(index, Object)
9711 9711
9712 // [kind]: The kind of iteration this is. One of the [Kind] enum values. 9712 // [kind]: The kind of iteration this is. One of the [Kind] enum values.
9713 DECL_ACCESSORS(kind, Object) 9713 DECL_ACCESSORS(kind, Object)
9714 9714
9715 #ifdef OBJECT_PRINT 9715 #ifdef OBJECT_PRINT
9716 void OrderedHashTableIteratorPrint(OStream& os); // NOLINT 9716 void OrderedHashTableIteratorPrint(std::ostream& os); // NOLINT
9717 #endif 9717 #endif
9718 9718
9719 static const int kTableOffset = JSObject::kHeaderSize; 9719 static const int kTableOffset = JSObject::kHeaderSize;
9720 static const int kIndexOffset = kTableOffset + kPointerSize; 9720 static const int kIndexOffset = kTableOffset + kPointerSize;
9721 static const int kKindOffset = kIndexOffset + kPointerSize; 9721 static const int kKindOffset = kIndexOffset + kPointerSize;
9722 static const int kSize = kKindOffset + kPointerSize; 9722 static const int kSize = kKindOffset + kPointerSize;
9723 9723
9724 enum Kind { 9724 enum Kind {
9725 kKindKeys = 1, 9725 kKindKeys = 1,
9726 kKindValues = 2, 9726 kKindValues = 2,
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
10805 } else { 10805 } else {
10806 value &= ~(1 << bit_position); 10806 value &= ~(1 << bit_position);
10807 } 10807 }
10808 return value; 10808 return value;
10809 } 10809 }
10810 }; 10810 };
10811 10811
10812 } } // namespace v8::internal 10812 } } // namespace v8::internal
10813 10813
10814 #endif // V8_OBJECTS_H_ 10814 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips64/lithium-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698