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

Side by Side Diff: src/heap.cc

Issue 239113002: Handlifying clients of StringTable, step 1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 8 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/heap.h ('k') | src/objects.h » ('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 // 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 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 if (!maybe_result->To(&site)) return maybe_result; 2752 if (!maybe_result->To(&site)) return maybe_result;
2753 site->Initialize(); 2753 site->Initialize();
2754 2754
2755 // Link the site 2755 // Link the site
2756 site->set_weak_next(allocation_sites_list()); 2756 site->set_weak_next(allocation_sites_list());
2757 set_allocation_sites_list(site); 2757 set_allocation_sites_list(site);
2758 return site; 2758 return site;
2759 } 2759 }
2760 2760
2761 2761
2762 MaybeObject* Heap::CreateOddball(Map* map,
2763 const char* to_string,
2764 Object* to_number,
2765 byte kind) {
2766 Object* result;
2767 { MaybeObject* maybe_result = Allocate(map, OLD_POINTER_SPACE);
2768 if (!maybe_result->ToObject(&result)) return maybe_result;
2769 }
2770 return Oddball::cast(result)->Initialize(this, to_string, to_number, kind);
2771 }
2772
2773
2774 bool Heap::CreateApiObjects() { 2762 bool Heap::CreateApiObjects() {
2775 Object* obj; 2763 Object* obj;
2776 2764
2777 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 2765 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
2778 if (!maybe_obj->ToObject(&obj)) return false; 2766 if (!maybe_obj->ToObject(&obj)) return false;
2779 } 2767 }
2780 // Don't use Smi-only elements optimizations for objects with the neander 2768 // Don't use Smi-only elements optimizations for objects with the neander
2781 // map. There are too many cases where element values are set directly with a 2769 // map. There are too many cases where element values are set directly with a
2782 // bottleneck to trap the Smi-only -> fast elements transition, and there 2770 // bottleneck to trap the Smi-only -> fast elements transition, and there
2783 // appears to be no benefit for optimize this case. 2771 // appears to be no benefit for optimize this case.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2836 // { JSConstructEntryStub stub; 2824 // { JSConstructEntryStub stub;
2837 // js_construct_entry_code_ = *stub.GetCode(); 2825 // js_construct_entry_code_ = *stub.GetCode();
2838 // } 2826 // }
2839 // To workaround the problem, make separate functions without inlining. 2827 // To workaround the problem, make separate functions without inlining.
2840 Heap::CreateJSEntryStub(); 2828 Heap::CreateJSEntryStub();
2841 Heap::CreateJSConstructEntryStub(); 2829 Heap::CreateJSConstructEntryStub();
2842 } 2830 }
2843 2831
2844 2832
2845 bool Heap::CreateInitialObjects() { 2833 bool Heap::CreateInitialObjects() {
2846 Object* obj; 2834 HandleScope scope(isolate());
2835 Factory* factory = isolate()->factory();
2847 2836
2848 // The -0 value must be set before NumberFromDouble works. 2837 // The -0 value must be set before NumberFromDouble works.
2849 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); 2838 set_minus_zero_value(*factory->NewHeapNumber(-0.0, TENURED));
2850 if (!maybe_obj->ToObject(&obj)) return false;
2851 }
2852 set_minus_zero_value(HeapNumber::cast(obj));
2853 ASSERT(std::signbit(minus_zero_value()->Number()) != 0); 2839 ASSERT(std::signbit(minus_zero_value()->Number()) != 0);
2854 2840
2855 { MaybeObject* maybe_obj = AllocateHeapNumber(OS::nan_value(), TENURED); 2841 set_nan_value(*factory->NewHeapNumber(OS::nan_value(), TENURED));
2856 if (!maybe_obj->ToObject(&obj)) return false; 2842 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, TENURED));
2857 }
2858 set_nan_value(HeapNumber::cast(obj));
2859
2860 { MaybeObject* maybe_obj = AllocateHeapNumber(V8_INFINITY, TENURED);
2861 if (!maybe_obj->ToObject(&obj)) return false;
2862 }
2863 set_infinity_value(HeapNumber::cast(obj));
2864 2843
2865 // The hole has not been created yet, but we want to put something 2844 // The hole has not been created yet, but we want to put something
2866 // predictable in the gaps in the string table, so lets make that Smi zero. 2845 // predictable in the gaps in the string table, so lets make that Smi zero.
2867 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0))); 2846 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0)));
2868 2847
2869 // Allocate initial string table. 2848 // Allocate initial string table.
2870 { MaybeObject* maybe_obj = 2849 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize));
2871 StringTable::Allocate(this, kInitialStringTableSize);
2872 if (!maybe_obj->ToObject(&obj)) return false;
2873 }
2874 // Don't use set_string_table() due to asserts.
2875 roots_[kStringTableRootIndex] = obj;
2876 2850
2877 // Finish initializing oddballs after creating the string table. 2851 // Finish initializing oddballs after creating the string table.
2878 { MaybeObject* maybe_obj = 2852 Oddball::Initialize(isolate(),
2879 undefined_value()->Initialize(this, 2853 factory->undefined_value(),
2880 "undefined", 2854 "undefined",
2881 nan_value(), 2855 factory->nan_value(),
2882 Oddball::kUndefined); 2856 Oddball::kUndefined);
2883 if (!maybe_obj->ToObject(&obj)) return false; 2857
2858 // Initialize the null_value.
2859 Oddball::Initialize(isolate(),
2860 factory->null_value(),
2861 "null",
2862 handle(Smi::FromInt(0), isolate()),
2863 Oddball::kNull);
2864
2865 set_true_value(*factory->NewOddball(factory->boolean_map(),
2866 "true",
2867 handle(Smi::FromInt(1), isolate()),
2868 Oddball::kTrue));
2869
2870 set_false_value(*factory->NewOddball(factory->boolean_map(),
2871 "false",
2872 handle(Smi::FromInt(0), isolate()),
2873 Oddball::kFalse));
2874
2875 set_the_hole_value(*factory->NewOddball(factory->the_hole_map(),
2876 "hole",
2877 handle(Smi::FromInt(-1), isolate()),
2878 Oddball::kTheHole));
2879
2880 set_uninitialized_value(
2881 *factory->NewOddball(factory->uninitialized_map(),
2882 "uninitialized",
2883 handle(Smi::FromInt(-1), isolate()),
2884 Oddball::kUninitialized));
2885
2886 set_arguments_marker(*factory->NewOddball(factory->arguments_marker_map(),
2887 "arguments_marker",
2888 handle(Smi::FromInt(-4), isolate()),
2889 Oddball::kArgumentMarker));
2890
2891 set_no_interceptor_result_sentinel(
2892 *factory->NewOddball(factory->no_interceptor_result_sentinel_map(),
2893 "no_interceptor_result_sentinel",
2894 handle(Smi::FromInt(-2), isolate()),
2895 Oddball::kOther));
2896
2897 set_termination_exception(
2898 *factory->NewOddball(factory->termination_exception_map(),
2899 "termination_exception",
2900 handle(Smi::FromInt(-3), isolate()),
2901 Oddball::kOther));
2902
2903 for (unsigned i = 0; i < ARRAY_SIZE(constant_string_table); i++) {
2904 Handle<String> str =
2905 factory->InternalizeUtf8String(constant_string_table[i].contents);
2906 roots_[constant_string_table[i].index] = *str;
2884 } 2907 }
2885 2908
2886 // Initialize the null_value. 2909 Object* obj;
2887 { MaybeObject* maybe_obj = null_value()->Initialize(
2888 this, "null", Smi::FromInt(0), Oddball::kNull);
2889 if (!maybe_obj->ToObject(&obj)) return false;
2890 }
2891
2892 { MaybeObject* maybe_obj = CreateOddball(boolean_map(),
2893 "true",
2894 Smi::FromInt(1),
2895 Oddball::kTrue);
2896 if (!maybe_obj->ToObject(&obj)) return false;
2897 }
2898 set_true_value(Oddball::cast(obj));
2899
2900 { MaybeObject* maybe_obj = CreateOddball(boolean_map(),
2901 "false",
2902 Smi::FromInt(0),
2903 Oddball::kFalse);
2904 if (!maybe_obj->ToObject(&obj)) return false;
2905 }
2906 set_false_value(Oddball::cast(obj));
2907
2908 { MaybeObject* maybe_obj = CreateOddball(the_hole_map(),
2909 "hole",
2910 Smi::FromInt(-1),
2911 Oddball::kTheHole);
2912 if (!maybe_obj->ToObject(&obj)) return false;
2913 }
2914 set_the_hole_value(Oddball::cast(obj));
2915
2916 { MaybeObject* maybe_obj = CreateOddball(uninitialized_map(),
2917 "uninitialized",
2918 Smi::FromInt(-1),
2919 Oddball::kUninitialized);
2920 if (!maybe_obj->ToObject(&obj)) return false;
2921 }
2922 set_uninitialized_value(Oddball::cast(obj));
2923
2924 { MaybeObject* maybe_obj = CreateOddball(arguments_marker_map(),
2925 "arguments_marker",
2926 Smi::FromInt(-4),
2927 Oddball::kArgumentMarker);
2928 if (!maybe_obj->ToObject(&obj)) return false;
2929 }
2930 set_arguments_marker(Oddball::cast(obj));
2931
2932 { MaybeObject* maybe_obj = CreateOddball(no_interceptor_result_sentinel_map(),
2933 "no_interceptor_result_sentinel",
2934 Smi::FromInt(-2),
2935 Oddball::kOther);
2936 if (!maybe_obj->ToObject(&obj)) return false;
2937 }
2938 set_no_interceptor_result_sentinel(Oddball::cast(obj));
2939
2940 { MaybeObject* maybe_obj = CreateOddball(termination_exception_map(),
2941 "termination_exception",
2942 Smi::FromInt(-3),
2943 Oddball::kOther);
2944 if (!maybe_obj->ToObject(&obj)) return false;
2945 }
2946 set_termination_exception(Oddball::cast(obj));
2947
2948 for (unsigned i = 0; i < ARRAY_SIZE(constant_string_table); i++) {
2949 { MaybeObject* maybe_obj =
2950 InternalizeUtf8String(constant_string_table[i].contents);
2951 if (!maybe_obj->ToObject(&obj)) return false;
2952 }
2953 roots_[constant_string_table[i].index] = String::cast(obj);
2954 }
2955 2910
2956 // Allocate the hidden string which is used to identify the hidden properties 2911 // Allocate the hidden string which is used to identify the hidden properties
2957 // in JSObjects. The hash code has a special value so that it will not match 2912 // in JSObjects. The hash code has a special value so that it will not match
2958 // the empty string when searching for the property. It cannot be part of the 2913 // the empty string when searching for the property. It cannot be part of the
2959 // loop above because it needs to be allocated manually with the special 2914 // loop above because it needs to be allocated manually with the special
2960 // hash code in place. The hash code for the hidden_string is zero to ensure 2915 // hash code in place. The hash code for the hidden_string is zero to ensure
2961 // that it will always be at the first entry in property descriptors. 2916 // that it will always be at the first entry in property descriptors.
2962 { MaybeObject* maybe_obj = AllocateOneByteInternalizedString( 2917 { MaybeObject* maybe_obj = AllocateOneByteInternalizedString(
2963 OneByteVector("", 0), String::kEmptyStringHash); 2918 OneByteVector("", 0), String::kEmptyStringHash);
2964 if (!maybe_obj->ToObject(&obj)) return false; 2919 if (!maybe_obj->ToObject(&obj)) return false;
(...skipping 20 matching lines...) Expand all
2985 } 2940 }
2986 set_polymorphic_code_cache(PolymorphicCodeCache::cast(obj)); 2941 set_polymorphic_code_cache(PolymorphicCodeCache::cast(obj));
2987 2942
2988 set_instanceof_cache_function(Smi::FromInt(0)); 2943 set_instanceof_cache_function(Smi::FromInt(0));
2989 set_instanceof_cache_map(Smi::FromInt(0)); 2944 set_instanceof_cache_map(Smi::FromInt(0));
2990 set_instanceof_cache_answer(Smi::FromInt(0)); 2945 set_instanceof_cache_answer(Smi::FromInt(0));
2991 2946
2992 CreateFixedStubs(); 2947 CreateFixedStubs();
2993 2948
2994 // Allocate the dictionary of intrinsic function names. 2949 // Allocate the dictionary of intrinsic function names.
2995 { MaybeObject* maybe_obj = 2950 {
2996 NameDictionary::Allocate(this, Runtime::kNumFunctions); 2951 Handle<NameDictionary> function_names =
2997 if (!maybe_obj->ToObject(&obj)) return false; 2952 NameDictionary::New(isolate(), Runtime::kNumFunctions);
2953 Runtime::InitializeIntrinsicFunctionNames(isolate(), function_names);
2954 set_intrinsic_function_names(*function_names);
2998 } 2955 }
2999 set_intrinsic_function_names(NameDictionary::cast(obj));
3000 2956
3001 { MaybeObject* maybe_obj = AllocateInitialNumberStringCache(); 2957 { MaybeObject* maybe_obj = AllocateInitialNumberStringCache();
3002 if (!maybe_obj->ToObject(&obj)) return false; 2958 if (!maybe_obj->ToObject(&obj)) return false;
3003 } 2959 }
3004 set_number_string_cache(FixedArray::cast(obj)); 2960 set_number_string_cache(FixedArray::cast(obj));
3005 2961
3006 // Allocate cache for single character one byte strings. 2962 // Allocate cache for single character one byte strings.
3007 { MaybeObject* maybe_obj = 2963 { MaybeObject* maybe_obj =
3008 AllocateFixedArray(String::kMaxOneByteCharCode + 1, TENURED); 2964 AllocateFixedArray(String::kMaxOneByteCharCode + 1, TENURED);
3009 if (!maybe_obj->ToObject(&obj)) return false; 2965 if (!maybe_obj->ToObject(&obj)) return false;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3188 index = 3144 index =
3189 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1)); 3145 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1));
3190 if (cache->get(index + kStringOffset) == key_string && 3146 if (cache->get(index + kStringOffset) == key_string &&
3191 cache->get(index + kPatternOffset) == key_pattern) { 3147 cache->get(index + kPatternOffset) == key_pattern) {
3192 return cache->get(index + kArrayOffset); 3148 return cache->get(index + kArrayOffset);
3193 } 3149 }
3194 return Smi::FromInt(0); 3150 return Smi::FromInt(0);
3195 } 3151 }
3196 3152
3197 3153
3198 void RegExpResultsCache::Enter(Heap* heap, 3154 void RegExpResultsCache::Enter(Isolate* isolate,
3199 String* key_string, 3155 Handle<String> key_string,
3200 Object* key_pattern, 3156 Handle<Object> key_pattern,
3201 FixedArray* value_array, 3157 Handle<FixedArray> value_array,
3202 ResultsCacheType type) { 3158 ResultsCacheType type) {
3203 FixedArray* cache; 3159 Factory* factory = isolate->factory();
3160 Handle<FixedArray> cache;
3204 if (!key_string->IsInternalizedString()) return; 3161 if (!key_string->IsInternalizedString()) return;
3205 if (type == STRING_SPLIT_SUBSTRINGS) { 3162 if (type == STRING_SPLIT_SUBSTRINGS) {
3206 ASSERT(key_pattern->IsString()); 3163 ASSERT(key_pattern->IsString());
3207 if (!key_pattern->IsInternalizedString()) return; 3164 if (!key_pattern->IsInternalizedString()) return;
3208 cache = heap->string_split_cache(); 3165 cache = factory->string_split_cache();
3209 } else { 3166 } else {
3210 ASSERT(type == REGEXP_MULTIPLE_INDICES); 3167 ASSERT(type == REGEXP_MULTIPLE_INDICES);
3211 ASSERT(key_pattern->IsFixedArray()); 3168 ASSERT(key_pattern->IsFixedArray());
3212 cache = heap->regexp_multiple_cache(); 3169 cache = factory->regexp_multiple_cache();
3213 } 3170 }
3214 3171
3215 uint32_t hash = key_string->Hash(); 3172 uint32_t hash = key_string->Hash();
3216 uint32_t index = ((hash & (kRegExpResultsCacheSize - 1)) & 3173 uint32_t index = ((hash & (kRegExpResultsCacheSize - 1)) &
3217 ~(kArrayEntriesPerCacheEntry - 1)); 3174 ~(kArrayEntriesPerCacheEntry - 1));
3218 if (cache->get(index + kStringOffset) == Smi::FromInt(0)) { 3175 if (cache->get(index + kStringOffset) == Smi::FromInt(0)) {
3219 cache->set(index + kStringOffset, key_string); 3176 cache->set(index + kStringOffset, *key_string);
3220 cache->set(index + kPatternOffset, key_pattern); 3177 cache->set(index + kPatternOffset, *key_pattern);
3221 cache->set(index + kArrayOffset, value_array); 3178 cache->set(index + kArrayOffset, *value_array);
3222 } else { 3179 } else {
3223 uint32_t index2 = 3180 uint32_t index2 =
3224 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1)); 3181 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1));
3225 if (cache->get(index2 + kStringOffset) == Smi::FromInt(0)) { 3182 if (cache->get(index2 + kStringOffset) == Smi::FromInt(0)) {
3226 cache->set(index2 + kStringOffset, key_string); 3183 cache->set(index2 + kStringOffset, *key_string);
3227 cache->set(index2 + kPatternOffset, key_pattern); 3184 cache->set(index2 + kPatternOffset, *key_pattern);
3228 cache->set(index2 + kArrayOffset, value_array); 3185 cache->set(index2 + kArrayOffset, *value_array);
3229 } else { 3186 } else {
3230 cache->set(index2 + kStringOffset, Smi::FromInt(0)); 3187 cache->set(index2 + kStringOffset, Smi::FromInt(0));
3231 cache->set(index2 + kPatternOffset, Smi::FromInt(0)); 3188 cache->set(index2 + kPatternOffset, Smi::FromInt(0));
3232 cache->set(index2 + kArrayOffset, Smi::FromInt(0)); 3189 cache->set(index2 + kArrayOffset, Smi::FromInt(0));
3233 cache->set(index + kStringOffset, key_string); 3190 cache->set(index + kStringOffset, *key_string);
3234 cache->set(index + kPatternOffset, key_pattern); 3191 cache->set(index + kPatternOffset, *key_pattern);
3235 cache->set(index + kArrayOffset, value_array); 3192 cache->set(index + kArrayOffset, *value_array);
3236 } 3193 }
3237 } 3194 }
3238 // If the array is a reasonably short list of substrings, convert it into a 3195 // If the array is a reasonably short list of substrings, convert it into a
3239 // list of internalized strings. 3196 // list of internalized strings.
3240 if (type == STRING_SPLIT_SUBSTRINGS && value_array->length() < 100) { 3197 if (type == STRING_SPLIT_SUBSTRINGS && value_array->length() < 100) {
3241 for (int i = 0; i < value_array->length(); i++) { 3198 for (int i = 0; i < value_array->length(); i++) {
3242 String* str = String::cast(value_array->get(i)); 3199 Handle<String> str(String::cast(value_array->get(i)), isolate);
3243 Object* internalized_str; 3200 Handle<String> internalized_str = factory->InternalizeString(str);
3244 MaybeObject* maybe_string = heap->InternalizeString(str); 3201 value_array->set(i, *internalized_str);
3245 if (maybe_string->ToObject(&internalized_str)) {
3246 value_array->set(i, internalized_str);
3247 }
3248 } 3202 }
3249 } 3203 }
3250 // Convert backing store to a copy-on-write array. 3204 // Convert backing store to a copy-on-write array.
3251 value_array->set_map_no_write_barrier(heap->fixed_cow_array_map()); 3205 value_array->set_map_no_write_barrier(*factory->fixed_cow_array_map());
3252 } 3206 }
3253 3207
3254 3208
3255 void RegExpResultsCache::Clear(FixedArray* cache) { 3209 void RegExpResultsCache::Clear(FixedArray* cache) {
3256 for (int i = 0; i < kRegExpResultsCacheSize; i++) { 3210 for (int i = 0; i < kRegExpResultsCacheSize; i++) {
3257 cache->set(i, Smi::FromInt(0)); 3211 cache->set(i, Smi::FromInt(0));
3258 } 3212 }
3259 } 3213 }
3260 3214
3261 3215
(...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after
5980 } 5934 }
5981 5935
5982 5936
5983 bool Heap::CreateHeapObjects() { 5937 bool Heap::CreateHeapObjects() {
5984 // Create initial maps. 5938 // Create initial maps.
5985 if (!CreateInitialMaps()) return false; 5939 if (!CreateInitialMaps()) return false;
5986 if (!CreateApiObjects()) return false; 5940 if (!CreateApiObjects()) return false;
5987 5941
5988 // Create initial objects 5942 // Create initial objects
5989 if (!CreateInitialObjects()) return false; 5943 if (!CreateInitialObjects()) return false;
5944 CHECK_EQ(0, gc_count_);
5990 5945
5991 native_contexts_list_ = undefined_value(); 5946 native_contexts_list_ = undefined_value();
5992 array_buffers_list_ = undefined_value(); 5947 array_buffers_list_ = undefined_value();
5993 allocation_sites_list_ = undefined_value(); 5948 allocation_sites_list_ = undefined_value();
5994 weak_object_to_code_table_ = undefined_value(); 5949 weak_object_to_code_table_ = undefined_value();
5995
5996 HandleScope scope(isolate());
5997 Runtime::InitializeIntrinsicFunctionNames(
5998 isolate(), handle(intrinsic_function_names(), isolate()));
5999
6000 return true; 5950 return true;
6001 } 5951 }
6002 5952
6003 5953
6004 void Heap::SetStackLimits() { 5954 void Heap::SetStackLimits() {
6005 ASSERT(isolate_ != NULL); 5955 ASSERT(isolate_ != NULL);
6006 ASSERT(isolate_ == isolate()); 5956 ASSERT(isolate_ == isolate());
6007 // On 64 bit machines, pointers are generally out of range of Smis. We write 5957 // On 64 bit machines, pointers are generally out of range of Smis. We write
6008 // something that looks like an out of range Smi to the GC. 5958 // something that looks like an out of range Smi to the GC.
6009 5959
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
7173 static_cast<int>(object_sizes_last_time_[index])); 7123 static_cast<int>(object_sizes_last_time_[index]));
7174 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7124 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7175 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7125 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7176 7126
7177 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7127 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7178 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7128 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7179 ClearObjectStats(); 7129 ClearObjectStats();
7180 } 7130 }
7181 7131
7182 } } // namespace v8::internal 7132 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698