| OLD | NEW |
| 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> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 class AllocationSiteCreationContext; | 853 class AllocationSiteCreationContext; |
| 854 class AllocationSiteUsageContext; | 854 class AllocationSiteUsageContext; |
| 855 class DictionaryElementsAccessor; | 855 class DictionaryElementsAccessor; |
| 856 class ElementsAccessor; | 856 class ElementsAccessor; |
| 857 class FixedArrayBase; | 857 class FixedArrayBase; |
| 858 class GlobalObject; | 858 class GlobalObject; |
| 859 class ObjectVisitor; | 859 class ObjectVisitor; |
| 860 class LookupIterator; | 860 class LookupIterator; |
| 861 class StringStream; | 861 class StringStream; |
| 862 class TypeFeedbackVector; | 862 class TypeFeedbackVector; |
| 863 class WeakCell; |
| 863 // We cannot just say "class HeapType;" if it is created from a template... =8-? | 864 // We cannot just say "class HeapType;" if it is created from a template... =8-? |
| 864 template<class> class TypeImpl; | 865 template<class> class TypeImpl; |
| 865 struct HeapTypeConfig; | 866 struct HeapTypeConfig; |
| 866 typedef TypeImpl<HeapTypeConfig> HeapType; | 867 typedef TypeImpl<HeapTypeConfig> HeapType; |
| 867 | 868 |
| 868 | 869 |
| 869 // A template-ized version of the IsXXX functions. | 870 // A template-ized version of the IsXXX functions. |
| 870 template <class C> inline bool Is(Object* obj); | 871 template <class C> inline bool Is(Object* obj); |
| 871 | 872 |
| 872 #ifdef VERIFY_HEAP | 873 #ifdef VERIFY_HEAP |
| (...skipping 5565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6438 // [line_offset]: script line offset in resource from where it was extracted. | 6439 // [line_offset]: script line offset in resource from where it was extracted. |
| 6439 DECL_ACCESSORS(line_offset, Smi) | 6440 DECL_ACCESSORS(line_offset, Smi) |
| 6440 | 6441 |
| 6441 // [column_offset]: script column offset in resource from where it was | 6442 // [column_offset]: script column offset in resource from where it was |
| 6442 // extracted. | 6443 // extracted. |
| 6443 DECL_ACCESSORS(column_offset, Smi) | 6444 DECL_ACCESSORS(column_offset, Smi) |
| 6444 | 6445 |
| 6445 // [context_data]: context data for the context this script was compiled in. | 6446 // [context_data]: context data for the context this script was compiled in. |
| 6446 DECL_ACCESSORS(context_data, Object) | 6447 DECL_ACCESSORS(context_data, Object) |
| 6447 | 6448 |
| 6448 // [wrapper]: the wrapper cache. | 6449 // [wrapper]: the wrapper cache. This is either undefined or a WeakCell. |
| 6449 DECL_ACCESSORS(wrapper, Foreign) | 6450 DECL_ACCESSORS(wrapper, HeapObject) |
| 6450 | 6451 |
| 6451 // [type]: the script type. | 6452 // [type]: the script type. |
| 6452 DECL_ACCESSORS(type, Smi) | 6453 DECL_ACCESSORS(type, Smi) |
| 6453 | 6454 |
| 6454 // [line_ends]: FixedArray of line ends positions. | 6455 // [line_ends]: FixedArray of line ends positions. |
| 6455 DECL_ACCESSORS(line_ends, Object) | 6456 DECL_ACCESSORS(line_ends, Object) |
| 6456 | 6457 |
| 6457 // [eval_from_shared]: for eval scripts the shared funcion info for the | 6458 // [eval_from_shared]: for eval scripts the shared funcion info for the |
| 6458 // function from which eval was called. | 6459 // function from which eval was called. |
| 6459 DECL_ACCESSORS(eval_from_shared, Object) | 6460 DECL_ACCESSORS(eval_from_shared, Object) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6501 static int GetLineNumber(Handle<Script> script, int code_pos); | 6502 static int GetLineNumber(Handle<Script> script, int code_pos); |
| 6502 int GetLineNumber(int code_pos); | 6503 int GetLineNumber(int code_pos); |
| 6503 | 6504 |
| 6504 static Handle<Object> GetNameOrSourceURL(Handle<Script> script); | 6505 static Handle<Object> GetNameOrSourceURL(Handle<Script> script); |
| 6505 | 6506 |
| 6506 // Init line_ends array with code positions of line ends inside script source. | 6507 // Init line_ends array with code positions of line ends inside script source. |
| 6507 static void InitLineEnds(Handle<Script> script); | 6508 static void InitLineEnds(Handle<Script> script); |
| 6508 | 6509 |
| 6509 // Get the JS object wrapping the given script; create it if none exists. | 6510 // Get the JS object wrapping the given script; create it if none exists. |
| 6510 static Handle<JSObject> GetWrapper(Handle<Script> script); | 6511 static Handle<JSObject> GetWrapper(Handle<Script> script); |
| 6511 void ClearWrapperCache(); | |
| 6512 | 6512 |
| 6513 // Dispatched behavior. | 6513 // Dispatched behavior. |
| 6514 DECLARE_PRINTER(Script) | 6514 DECLARE_PRINTER(Script) |
| 6515 DECLARE_VERIFIER(Script) | 6515 DECLARE_VERIFIER(Script) |
| 6516 | 6516 |
| 6517 static const int kSourceOffset = HeapObject::kHeaderSize; | 6517 static const int kSourceOffset = HeapObject::kHeaderSize; |
| 6518 static const int kNameOffset = kSourceOffset + kPointerSize; | 6518 static const int kNameOffset = kSourceOffset + kPointerSize; |
| 6519 static const int kLineOffsetOffset = kNameOffset + kPointerSize; | 6519 static const int kLineOffsetOffset = kNameOffset + kPointerSize; |
| 6520 static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize; | 6520 static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize; |
| 6521 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; | 6521 static const int kContextOffset = kColumnOffsetOffset + kPointerSize; |
| (...skipping 4375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10897 } else { | 10897 } else { |
| 10898 value &= ~(1 << bit_position); | 10898 value &= ~(1 << bit_position); |
| 10899 } | 10899 } |
| 10900 return value; | 10900 return value; |
| 10901 } | 10901 } |
| 10902 }; | 10902 }; |
| 10903 | 10903 |
| 10904 } } // namespace v8::internal | 10904 } } // namespace v8::internal |
| 10905 | 10905 |
| 10906 #endif // V8_OBJECTS_H_ | 10906 #endif // V8_OBJECTS_H_ |
| OLD | NEW |