| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 2843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2855 | 2855 |
| 2856 Heap* Map::heap() { | 2856 Heap* Map::heap() { |
| 2857 // NOTE: address() helper is not used to save one instruction. | 2857 // NOTE: address() helper is not used to save one instruction. |
| 2858 Heap* heap = Page::FromAddress(reinterpret_cast<Address>(this))->heap_; | 2858 Heap* heap = Page::FromAddress(reinterpret_cast<Address>(this))->heap_; |
| 2859 ASSERT(heap != NULL); | 2859 ASSERT(heap != NULL); |
| 2860 ASSERT(heap->isolate() == Isolate::Current()); | 2860 ASSERT(heap->isolate() == Isolate::Current()); |
| 2861 return heap; | 2861 return heap; |
| 2862 } | 2862 } |
| 2863 | 2863 |
| 2864 | 2864 |
| 2865 Heap* Code::heap() { | |
| 2866 // NOTE: address() helper is not used to save one instruction. | |
| 2867 Heap* heap = Page::FromAddress(reinterpret_cast<Address>(this))->heap_; | |
| 2868 ASSERT(heap != NULL); | |
| 2869 ASSERT(heap->isolate() == Isolate::Current()); | |
| 2870 return heap; | |
| 2871 } | |
| 2872 | |
| 2873 | |
| 2874 Isolate* Code::isolate() { | |
| 2875 return heap()->isolate(); | |
| 2876 } | |
| 2877 | |
| 2878 | |
| 2879 Heap* JSGlobalPropertyCell::heap() { | |
| 2880 // NOTE: address() helper is not used to save one instruction. | |
| 2881 Heap* heap = Page::FromAddress(reinterpret_cast<Address>(this))->heap_; | |
| 2882 ASSERT(heap != NULL); | |
| 2883 ASSERT(heap->isolate() == Isolate::Current()); | |
| 2884 return heap; | |
| 2885 } | |
| 2886 | |
| 2887 | |
| 2888 Isolate* JSGlobalPropertyCell::isolate() { | |
| 2889 return heap()->isolate(); | |
| 2890 } | |
| 2891 | |
| 2892 | |
| 2893 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { | 2865 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { |
| 2894 return HeapObject:: | 2866 return HeapObject:: |
| 2895 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); | 2867 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); |
| 2896 } | 2868 } |
| 2897 | 2869 |
| 2898 | 2870 |
| 2899 Object* Map::prototype() { | 2871 Object* Map::prototype() { |
| 2900 return READ_FIELD(this, kPrototypeOffset); | 2872 return READ_FIELD(this, kPrototypeOffset); |
| 2901 } | 2873 } |
| 2902 | 2874 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3050 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression, | 3022 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression, |
| 3051 kIsExpressionBit) | 3023 kIsExpressionBit) |
| 3052 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_toplevel, | 3024 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_toplevel, |
| 3053 kIsTopLevelBit) | 3025 kIsTopLevelBit) |
| 3054 BOOL_GETTER(SharedFunctionInfo, | 3026 BOOL_GETTER(SharedFunctionInfo, |
| 3055 compiler_hints, | 3027 compiler_hints, |
| 3056 has_only_simple_this_property_assignments, | 3028 has_only_simple_this_property_assignments, |
| 3057 kHasOnlySimpleThisPropertyAssignments) | 3029 kHasOnlySimpleThisPropertyAssignments) |
| 3058 BOOL_ACCESSORS(SharedFunctionInfo, | 3030 BOOL_ACCESSORS(SharedFunctionInfo, |
| 3059 compiler_hints, | 3031 compiler_hints, |
| 3032 try_full_codegen, |
| 3033 kTryFullCodegen) |
| 3034 BOOL_ACCESSORS(SharedFunctionInfo, |
| 3035 compiler_hints, |
| 3060 allows_lazy_compilation, | 3036 allows_lazy_compilation, |
| 3061 kAllowLazyCompilation) | 3037 kAllowLazyCompilation) |
| 3062 BOOL_ACCESSORS(SharedFunctionInfo, | 3038 BOOL_ACCESSORS(SharedFunctionInfo, |
| 3063 compiler_hints, | 3039 compiler_hints, |
| 3064 uses_arguments, | 3040 uses_arguments, |
| 3065 kUsesArguments) | 3041 kUsesArguments) |
| 3066 | 3042 |
| 3067 | 3043 |
| 3068 #if V8_HOST_ARCH_32_BIT | 3044 #if V8_HOST_ARCH_32_BIT |
| 3069 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) | 3045 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4151 #undef WRITE_INT_FIELD | 4127 #undef WRITE_INT_FIELD |
| 4152 #undef READ_SHORT_FIELD | 4128 #undef READ_SHORT_FIELD |
| 4153 #undef WRITE_SHORT_FIELD | 4129 #undef WRITE_SHORT_FIELD |
| 4154 #undef READ_BYTE_FIELD | 4130 #undef READ_BYTE_FIELD |
| 4155 #undef WRITE_BYTE_FIELD | 4131 #undef WRITE_BYTE_FIELD |
| 4156 | 4132 |
| 4157 | 4133 |
| 4158 } } // namespace v8::internal | 4134 } } // namespace v8::internal |
| 4159 | 4135 |
| 4160 #endif // V8_OBJECTS_INL_H_ | 4136 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |