OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4995 if (object->IsTransitionArray()) { | 4995 if (object->IsTransitionArray()) { |
4996 TransitionArray::cast(object)->set_back_pointer_storage(value); | 4996 TransitionArray::cast(object)->set_back_pointer_storage(value); |
4997 } else { | 4997 } else { |
4998 WRITE_FIELD(this, kTransitionsOrBackPointerOffset, value); | 4998 WRITE_FIELD(this, kTransitionsOrBackPointerOffset, value); |
4999 CONDITIONAL_WRITE_BARRIER( | 4999 CONDITIONAL_WRITE_BARRIER( |
5000 GetHeap(), this, kTransitionsOrBackPointerOffset, value, mode); | 5000 GetHeap(), this, kTransitionsOrBackPointerOffset, value, mode); |
5001 } | 5001 } |
5002 } | 5002 } |
5003 | 5003 |
5004 | 5004 |
5005 // Can either be Smi (no transitions), normal transition array, or a transition | |
5006 // array with the header overwritten as a Smi (thus iterating). | |
5007 TransitionArray* Map::unchecked_transition_array() { | |
5008 Object* object = *HeapObject::RawField(this, | |
5009 Map::kTransitionsOrBackPointerOffset); | |
5010 TransitionArray* transition_array = static_cast<TransitionArray*>(object); | |
5011 return transition_array; | |
5012 } | |
5013 | |
5014 | |
5015 HeapObject* Map::UncheckedPrototypeTransitions() { | |
5016 ASSERT(HasTransitionArray()); | |
5017 ASSERT(unchecked_transition_array()->HasPrototypeTransitions()); | |
5018 return unchecked_transition_array()->UncheckedPrototypeTransitions(); | |
5019 } | |
5020 | |
5021 | |
5022 ACCESSORS(Map, code_cache, Object, kCodeCacheOffset) | 5005 ACCESSORS(Map, code_cache, Object, kCodeCacheOffset) |
5023 ACCESSORS(Map, dependent_code, DependentCode, kDependentCodeOffset) | 5006 ACCESSORS(Map, dependent_code, DependentCode, kDependentCodeOffset) |
5024 ACCESSORS(Map, constructor, Object, kConstructorOffset) | 5007 ACCESSORS(Map, constructor, Object, kConstructorOffset) |
5025 | 5008 |
5026 ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) | 5009 ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) |
5027 ACCESSORS(JSFunction, literals_or_bindings, FixedArray, kLiteralsOffset) | 5010 ACCESSORS(JSFunction, literals_or_bindings, FixedArray, kLiteralsOffset) |
5028 ACCESSORS(JSFunction, next_function_link, Object, kNextFunctionLinkOffset) | 5011 ACCESSORS(JSFunction, next_function_link, Object, kNextFunctionLinkOffset) |
5029 | 5012 |
5030 ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) | 5013 ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) |
5031 ACCESSORS(GlobalObject, native_context, Context, kNativeContextOffset) | 5014 ACCESSORS(GlobalObject, native_context, Context, kNativeContextOffset) |
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6941 #undef READ_UINT32_FIELD | 6924 #undef READ_UINT32_FIELD |
6942 #undef WRITE_UINT32_FIELD | 6925 #undef WRITE_UINT32_FIELD |
6943 #undef READ_SHORT_FIELD | 6926 #undef READ_SHORT_FIELD |
6944 #undef WRITE_SHORT_FIELD | 6927 #undef WRITE_SHORT_FIELD |
6945 #undef READ_BYTE_FIELD | 6928 #undef READ_BYTE_FIELD |
6946 #undef WRITE_BYTE_FIELD | 6929 #undef WRITE_BYTE_FIELD |
6947 | 6930 |
6948 } } // namespace v8::internal | 6931 } } // namespace v8::internal |
6949 | 6932 |
6950 #endif // V8_OBJECTS_INL_H_ | 6933 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |