OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2530 bool Map::is_shared() { | 2530 bool Map::is_shared() { |
2531 return ((1 << kIsShared) & bit_field2()) != 0; | 2531 return ((1 << kIsShared) & bit_field2()) != 0; |
2532 } | 2532 } |
2533 | 2533 |
2534 | 2534 |
2535 JSFunction* Map::unchecked_constructor() { | 2535 JSFunction* Map::unchecked_constructor() { |
2536 return reinterpret_cast<JSFunction*>(READ_FIELD(this, kConstructorOffset)); | 2536 return reinterpret_cast<JSFunction*>(READ_FIELD(this, kConstructorOffset)); |
2537 } | 2537 } |
2538 | 2538 |
2539 | 2539 |
| 2540 FixedArray* Map::unchecked_prototype_transitions() { |
| 2541 return reinterpret_cast<FixedArray*>( |
| 2542 READ_FIELD(this, kPrototypeTransitionsOffset)); |
| 2543 } |
| 2544 |
| 2545 |
2540 Code::Flags Code::flags() { | 2546 Code::Flags Code::flags() { |
2541 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); | 2547 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); |
2542 } | 2548 } |
2543 | 2549 |
2544 | 2550 |
2545 void Code::set_flags(Code::Flags flags) { | 2551 void Code::set_flags(Code::Flags flags) { |
2546 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); | 2552 STATIC_ASSERT(Code::NUMBER_OF_KINDS <= (kFlagsKindMask >> kFlagsKindShift)+1); |
2547 // Make sure that all call stubs have an arguments count. | 2553 // Make sure that all call stubs have an arguments count. |
2548 ASSERT((ExtractKindFromFlags(flags) != CALL_IC && | 2554 ASSERT((ExtractKindFromFlags(flags) != CALL_IC && |
2549 ExtractKindFromFlags(flags) != KEYED_CALL_IC) || | 2555 ExtractKindFromFlags(flags) != KEYED_CALL_IC) || |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2938 Map* new_map = Map::cast(obj); | 2944 Map* new_map = Map::cast(obj); |
2939 new_map->set_has_fast_elements(false); | 2945 new_map->set_has_fast_elements(false); |
2940 isolate()->counters()->map_fast_to_slow_elements()->Increment(); | 2946 isolate()->counters()->map_fast_to_slow_elements()->Increment(); |
2941 return new_map; | 2947 return new_map; |
2942 } | 2948 } |
2943 | 2949 |
2944 | 2950 |
2945 ACCESSORS(Map, instance_descriptors, DescriptorArray, | 2951 ACCESSORS(Map, instance_descriptors, DescriptorArray, |
2946 kInstanceDescriptorsOffset) | 2952 kInstanceDescriptorsOffset) |
2947 ACCESSORS(Map, code_cache, Object, kCodeCacheOffset) | 2953 ACCESSORS(Map, code_cache, Object, kCodeCacheOffset) |
| 2954 ACCESSORS(Map, prototype_transitions, FixedArray, kPrototypeTransitionsOffset) |
2948 ACCESSORS(Map, constructor, Object, kConstructorOffset) | 2955 ACCESSORS(Map, constructor, Object, kConstructorOffset) |
2949 | 2956 |
2950 ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) | 2957 ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) |
2951 ACCESSORS(JSFunction, literals, FixedArray, kLiteralsOffset) | 2958 ACCESSORS(JSFunction, literals, FixedArray, kLiteralsOffset) |
2952 ACCESSORS_GCSAFE(JSFunction, next_function_link, Object, | 2959 ACCESSORS_GCSAFE(JSFunction, next_function_link, Object, |
2953 kNextFunctionLinkOffset) | 2960 kNextFunctionLinkOffset) |
2954 | 2961 |
2955 ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) | 2962 ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) |
2956 ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) | 2963 ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) |
2957 ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset) | 2964 ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset) |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4185 #undef WRITE_INT_FIELD | 4192 #undef WRITE_INT_FIELD |
4186 #undef READ_SHORT_FIELD | 4193 #undef READ_SHORT_FIELD |
4187 #undef WRITE_SHORT_FIELD | 4194 #undef WRITE_SHORT_FIELD |
4188 #undef READ_BYTE_FIELD | 4195 #undef READ_BYTE_FIELD |
4189 #undef WRITE_BYTE_FIELD | 4196 #undef WRITE_BYTE_FIELD |
4190 | 4197 |
4191 | 4198 |
4192 } } // namespace v8::internal | 4199 } } // namespace v8::internal |
4193 | 4200 |
4194 #endif // V8_OBJECTS_INL_H_ | 4201 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |