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

Side by Side Diff: src/heap.cc

Issue 238263003: Reland r20772 "Handlifying clients of StringTable, step 1." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The fix 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 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2728 global_property_cell_map()); 2728 global_property_cell_map());
2729 PropertyCell* cell = PropertyCell::cast(result); 2729 PropertyCell* cell = PropertyCell::cast(result);
2730 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), 2730 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()),
2731 SKIP_WRITE_BARRIER); 2731 SKIP_WRITE_BARRIER);
2732 cell->set_value(the_hole_value()); 2732 cell->set_value(the_hole_value());
2733 cell->set_type(HeapType::None()); 2733 cell->set_type(HeapType::None());
2734 return result; 2734 return result;
2735 } 2735 }
2736 2736
2737 2737
2738 MaybeObject* Heap::CreateOddball(Map* map,
2739 const char* to_string,
2740 Object* to_number,
2741 byte kind) {
2742 Object* result;
2743 { MaybeObject* maybe_result = Allocate(map, OLD_POINTER_SPACE);
2744 if (!maybe_result->ToObject(&result)) return maybe_result;
2745 }
2746 return Oddball::cast(result)->Initialize(this, to_string, to_number, kind);
2747 }
2748
2749
2750 bool Heap::CreateApiObjects() { 2738 bool Heap::CreateApiObjects() {
2751 Object* obj; 2739 Object* obj;
2752 2740
2753 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 2741 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
2754 if (!maybe_obj->ToObject(&obj)) return false; 2742 if (!maybe_obj->ToObject(&obj)) return false;
2755 } 2743 }
2756 // Don't use Smi-only elements optimizations for objects with the neander 2744 // Don't use Smi-only elements optimizations for objects with the neander
2757 // map. There are too many cases where element values are set directly with a 2745 // map. There are too many cases where element values are set directly with a
2758 // bottleneck to trap the Smi-only -> fast elements transition, and there 2746 // bottleneck to trap the Smi-only -> fast elements transition, and there
2759 // appears to be no benefit for optimize this case. 2747 // appears to be no benefit for optimize this case.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 // { JSConstructEntryStub stub; 2800 // { JSConstructEntryStub stub;
2813 // js_construct_entry_code_ = *stub.GetCode(); 2801 // js_construct_entry_code_ = *stub.GetCode();
2814 // } 2802 // }
2815 // To workaround the problem, make separate functions without inlining. 2803 // To workaround the problem, make separate functions without inlining.
2816 Heap::CreateJSEntryStub(); 2804 Heap::CreateJSEntryStub();
2817 Heap::CreateJSConstructEntryStub(); 2805 Heap::CreateJSConstructEntryStub();
2818 } 2806 }
2819 2807
2820 2808
2821 bool Heap::CreateInitialObjects() { 2809 bool Heap::CreateInitialObjects() {
2822 Object* obj; 2810 HandleScope scope(isolate());
2811 Factory* factory = isolate()->factory();
2823 2812
2824 // The -0 value must be set before NumberFromDouble works. 2813 // The -0 value must be set before NumberFromDouble works.
2825 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); 2814 set_minus_zero_value(*factory->NewHeapNumber(-0.0, TENURED));
2826 if (!maybe_obj->ToObject(&obj)) return false;
2827 }
2828 set_minus_zero_value(HeapNumber::cast(obj));
2829 ASSERT(std::signbit(minus_zero_value()->Number()) != 0); 2815 ASSERT(std::signbit(minus_zero_value()->Number()) != 0);
2830 2816
2831 { MaybeObject* maybe_obj = AllocateHeapNumber(OS::nan_value(), TENURED); 2817 set_nan_value(*factory->NewHeapNumber(OS::nan_value(), TENURED));
2832 if (!maybe_obj->ToObject(&obj)) return false; 2818 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, TENURED));
2833 }
2834 set_nan_value(HeapNumber::cast(obj));
2835
2836 { MaybeObject* maybe_obj = AllocateHeapNumber(V8_INFINITY, TENURED);
2837 if (!maybe_obj->ToObject(&obj)) return false;
2838 }
2839 set_infinity_value(HeapNumber::cast(obj));
2840 2819
2841 // The hole has not been created yet, but we want to put something 2820 // The hole has not been created yet, but we want to put something
2842 // predictable in the gaps in the string table, so lets make that Smi zero. 2821 // predictable in the gaps in the string table, so lets make that Smi zero.
2843 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0))); 2822 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0)));
2844 2823
2845 // Allocate initial string table. 2824 // Allocate initial string table.
2846 { MaybeObject* maybe_obj = 2825 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize));
2847 StringTable::Allocate(this, kInitialStringTableSize);
2848 if (!maybe_obj->ToObject(&obj)) return false;
2849 }
2850 // Don't use set_string_table() due to asserts.
2851 roots_[kStringTableRootIndex] = obj;
2852 2826
2853 // Finish initializing oddballs after creating the string table. 2827 // Finish initializing oddballs after creating the string table.
2854 { MaybeObject* maybe_obj = 2828 Oddball::Initialize(isolate(),
2855 undefined_value()->Initialize(this, 2829 factory->undefined_value(),
2856 "undefined", 2830 "undefined",
2857 nan_value(), 2831 factory->nan_value(),
2858 Oddball::kUndefined); 2832 Oddball::kUndefined);
2859 if (!maybe_obj->ToObject(&obj)) return false; 2833
2834 // Initialize the null_value.
2835 Oddball::Initialize(isolate(),
2836 factory->null_value(),
2837 "null",
2838 handle(Smi::FromInt(0), isolate()),
2839 Oddball::kNull);
2840
2841 set_true_value(*factory->NewOddball(factory->boolean_map(),
2842 "true",
2843 handle(Smi::FromInt(1), isolate()),
2844 Oddball::kTrue));
2845
2846 set_false_value(*factory->NewOddball(factory->boolean_map(),
2847 "false",
2848 handle(Smi::FromInt(0), isolate()),
2849 Oddball::kFalse));
2850
2851 set_the_hole_value(*factory->NewOddball(factory->the_hole_map(),
2852 "hole",
2853 handle(Smi::FromInt(-1), isolate()),
2854 Oddball::kTheHole));
2855
2856 set_uninitialized_value(
2857 *factory->NewOddball(factory->uninitialized_map(),
2858 "uninitialized",
2859 handle(Smi::FromInt(-1), isolate()),
2860 Oddball::kUninitialized));
2861
2862 set_arguments_marker(*factory->NewOddball(factory->arguments_marker_map(),
2863 "arguments_marker",
2864 handle(Smi::FromInt(-4), isolate()),
2865 Oddball::kArgumentMarker));
2866
2867 set_no_interceptor_result_sentinel(
2868 *factory->NewOddball(factory->no_interceptor_result_sentinel_map(),
2869 "no_interceptor_result_sentinel",
2870 handle(Smi::FromInt(-2), isolate()),
2871 Oddball::kOther));
2872
2873 set_termination_exception(
2874 *factory->NewOddball(factory->termination_exception_map(),
2875 "termination_exception",
2876 handle(Smi::FromInt(-3), isolate()),
2877 Oddball::kOther));
2878
2879 for (unsigned i = 0; i < ARRAY_SIZE(constant_string_table); i++) {
2880 Handle<String> str =
2881 factory->InternalizeUtf8String(constant_string_table[i].contents);
2882 roots_[constant_string_table[i].index] = *str;
2860 } 2883 }
2861 2884
2862 // Initialize the null_value. 2885 Object* obj;
2863 { MaybeObject* maybe_obj = null_value()->Initialize(
2864 this, "null", Smi::FromInt(0), Oddball::kNull);
2865 if (!maybe_obj->ToObject(&obj)) return false;
2866 }
2867
2868 { MaybeObject* maybe_obj = CreateOddball(boolean_map(),
2869 "true",
2870 Smi::FromInt(1),
2871 Oddball::kTrue);
2872 if (!maybe_obj->ToObject(&obj)) return false;
2873 }
2874 set_true_value(Oddball::cast(obj));
2875
2876 { MaybeObject* maybe_obj = CreateOddball(boolean_map(),
2877 "false",
2878 Smi::FromInt(0),
2879 Oddball::kFalse);
2880 if (!maybe_obj->ToObject(&obj)) return false;
2881 }
2882 set_false_value(Oddball::cast(obj));
2883
2884 { MaybeObject* maybe_obj = CreateOddball(the_hole_map(),
2885 "hole",
2886 Smi::FromInt(-1),
2887 Oddball::kTheHole);
2888 if (!maybe_obj->ToObject(&obj)) return false;
2889 }
2890 set_the_hole_value(Oddball::cast(obj));
2891
2892 { MaybeObject* maybe_obj = CreateOddball(uninitialized_map(),
2893 "uninitialized",
2894 Smi::FromInt(-1),
2895 Oddball::kUninitialized);
2896 if (!maybe_obj->ToObject(&obj)) return false;
2897 }
2898 set_uninitialized_value(Oddball::cast(obj));
2899
2900 { MaybeObject* maybe_obj = CreateOddball(arguments_marker_map(),
2901 "arguments_marker",
2902 Smi::FromInt(-4),
2903 Oddball::kArgumentMarker);
2904 if (!maybe_obj->ToObject(&obj)) return false;
2905 }
2906 set_arguments_marker(Oddball::cast(obj));
2907
2908 { MaybeObject* maybe_obj = CreateOddball(no_interceptor_result_sentinel_map(),
2909 "no_interceptor_result_sentinel",
2910 Smi::FromInt(-2),
2911 Oddball::kOther);
2912 if (!maybe_obj->ToObject(&obj)) return false;
2913 }
2914 set_no_interceptor_result_sentinel(Oddball::cast(obj));
2915
2916 { MaybeObject* maybe_obj = CreateOddball(termination_exception_map(),
2917 "termination_exception",
2918 Smi::FromInt(-3),
2919 Oddball::kOther);
2920 if (!maybe_obj->ToObject(&obj)) return false;
2921 }
2922 set_termination_exception(Oddball::cast(obj));
2923
2924 for (unsigned i = 0; i < ARRAY_SIZE(constant_string_table); i++) {
2925 { MaybeObject* maybe_obj =
2926 InternalizeUtf8String(constant_string_table[i].contents);
2927 if (!maybe_obj->ToObject(&obj)) return false;
2928 }
2929 roots_[constant_string_table[i].index] = String::cast(obj);
2930 }
2931 2886
2932 // Allocate the hidden string which is used to identify the hidden properties 2887 // Allocate the hidden string which is used to identify the hidden properties
2933 // in JSObjects. The hash code has a special value so that it will not match 2888 // in JSObjects. The hash code has a special value so that it will not match
2934 // the empty string when searching for the property. It cannot be part of the 2889 // the empty string when searching for the property. It cannot be part of the
2935 // loop above because it needs to be allocated manually with the special 2890 // loop above because it needs to be allocated manually with the special
2936 // hash code in place. The hash code for the hidden_string is zero to ensure 2891 // hash code in place. The hash code for the hidden_string is zero to ensure
2937 // that it will always be at the first entry in property descriptors. 2892 // that it will always be at the first entry in property descriptors.
2938 { MaybeObject* maybe_obj = AllocateOneByteInternalizedString( 2893 { MaybeObject* maybe_obj = AllocateOneByteInternalizedString(
2939 OneByteVector("", 0), String::kEmptyStringHash); 2894 OneByteVector("", 0), String::kEmptyStringHash);
2940 if (!maybe_obj->ToObject(&obj)) return false; 2895 if (!maybe_obj->ToObject(&obj)) return false;
(...skipping 20 matching lines...) Expand all
2961 } 2916 }
2962 set_polymorphic_code_cache(PolymorphicCodeCache::cast(obj)); 2917 set_polymorphic_code_cache(PolymorphicCodeCache::cast(obj));
2963 2918
2964 set_instanceof_cache_function(Smi::FromInt(0)); 2919 set_instanceof_cache_function(Smi::FromInt(0));
2965 set_instanceof_cache_map(Smi::FromInt(0)); 2920 set_instanceof_cache_map(Smi::FromInt(0));
2966 set_instanceof_cache_answer(Smi::FromInt(0)); 2921 set_instanceof_cache_answer(Smi::FromInt(0));
2967 2922
2968 CreateFixedStubs(); 2923 CreateFixedStubs();
2969 2924
2970 // Allocate the dictionary of intrinsic function names. 2925 // Allocate the dictionary of intrinsic function names.
2971 { MaybeObject* maybe_obj = 2926 {
2972 NameDictionary::Allocate(this, Runtime::kNumFunctions); 2927 Handle<NameDictionary> function_names =
2973 if (!maybe_obj->ToObject(&obj)) return false; 2928 NameDictionary::New(isolate(), Runtime::kNumFunctions);
Igor Sheludko 2014/04/16 13:45:17 This change caused the problem. I didn't add Dicti
2929 Runtime::InitializeIntrinsicFunctionNames(isolate(), function_names);
2930 set_intrinsic_function_names(*function_names);
2974 } 2931 }
2975 set_intrinsic_function_names(NameDictionary::cast(obj));
2976 2932
2977 { MaybeObject* maybe_obj = AllocateInitialNumberStringCache(); 2933 { MaybeObject* maybe_obj = AllocateInitialNumberStringCache();
2978 if (!maybe_obj->ToObject(&obj)) return false; 2934 if (!maybe_obj->ToObject(&obj)) return false;
2979 } 2935 }
2980 set_number_string_cache(FixedArray::cast(obj)); 2936 set_number_string_cache(FixedArray::cast(obj));
2981 2937
2982 // Allocate cache for single character one byte strings. 2938 // Allocate cache for single character one byte strings.
2983 { MaybeObject* maybe_obj = 2939 { MaybeObject* maybe_obj =
2984 AllocateFixedArray(String::kMaxOneByteCharCode + 1, TENURED); 2940 AllocateFixedArray(String::kMaxOneByteCharCode + 1, TENURED);
2985 if (!maybe_obj->ToObject(&obj)) return false; 2941 if (!maybe_obj->ToObject(&obj)) return false;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 index = 3120 index =
3165 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1)); 3121 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1));
3166 if (cache->get(index + kStringOffset) == key_string && 3122 if (cache->get(index + kStringOffset) == key_string &&
3167 cache->get(index + kPatternOffset) == key_pattern) { 3123 cache->get(index + kPatternOffset) == key_pattern) {
3168 return cache->get(index + kArrayOffset); 3124 return cache->get(index + kArrayOffset);
3169 } 3125 }
3170 return Smi::FromInt(0); 3126 return Smi::FromInt(0);
3171 } 3127 }
3172 3128
3173 3129
3174 void RegExpResultsCache::Enter(Heap* heap, 3130 void RegExpResultsCache::Enter(Isolate* isolate,
3175 String* key_string, 3131 Handle<String> key_string,
3176 Object* key_pattern, 3132 Handle<Object> key_pattern,
3177 FixedArray* value_array, 3133 Handle<FixedArray> value_array,
3178 ResultsCacheType type) { 3134 ResultsCacheType type) {
3179 FixedArray* cache; 3135 Factory* factory = isolate->factory();
3136 Handle<FixedArray> cache;
3180 if (!key_string->IsInternalizedString()) return; 3137 if (!key_string->IsInternalizedString()) return;
3181 if (type == STRING_SPLIT_SUBSTRINGS) { 3138 if (type == STRING_SPLIT_SUBSTRINGS) {
3182 ASSERT(key_pattern->IsString()); 3139 ASSERT(key_pattern->IsString());
3183 if (!key_pattern->IsInternalizedString()) return; 3140 if (!key_pattern->IsInternalizedString()) return;
3184 cache = heap->string_split_cache(); 3141 cache = factory->string_split_cache();
3185 } else { 3142 } else {
3186 ASSERT(type == REGEXP_MULTIPLE_INDICES); 3143 ASSERT(type == REGEXP_MULTIPLE_INDICES);
3187 ASSERT(key_pattern->IsFixedArray()); 3144 ASSERT(key_pattern->IsFixedArray());
3188 cache = heap->regexp_multiple_cache(); 3145 cache = factory->regexp_multiple_cache();
3189 } 3146 }
3190 3147
3191 uint32_t hash = key_string->Hash(); 3148 uint32_t hash = key_string->Hash();
3192 uint32_t index = ((hash & (kRegExpResultsCacheSize - 1)) & 3149 uint32_t index = ((hash & (kRegExpResultsCacheSize - 1)) &
3193 ~(kArrayEntriesPerCacheEntry - 1)); 3150 ~(kArrayEntriesPerCacheEntry - 1));
3194 if (cache->get(index + kStringOffset) == Smi::FromInt(0)) { 3151 if (cache->get(index + kStringOffset) == Smi::FromInt(0)) {
3195 cache->set(index + kStringOffset, key_string); 3152 cache->set(index + kStringOffset, *key_string);
3196 cache->set(index + kPatternOffset, key_pattern); 3153 cache->set(index + kPatternOffset, *key_pattern);
3197 cache->set(index + kArrayOffset, value_array); 3154 cache->set(index + kArrayOffset, *value_array);
3198 } else { 3155 } else {
3199 uint32_t index2 = 3156 uint32_t index2 =
3200 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1)); 3157 ((index + kArrayEntriesPerCacheEntry) & (kRegExpResultsCacheSize - 1));
3201 if (cache->get(index2 + kStringOffset) == Smi::FromInt(0)) { 3158 if (cache->get(index2 + kStringOffset) == Smi::FromInt(0)) {
3202 cache->set(index2 + kStringOffset, key_string); 3159 cache->set(index2 + kStringOffset, *key_string);
3203 cache->set(index2 + kPatternOffset, key_pattern); 3160 cache->set(index2 + kPatternOffset, *key_pattern);
3204 cache->set(index2 + kArrayOffset, value_array); 3161 cache->set(index2 + kArrayOffset, *value_array);
3205 } else { 3162 } else {
3206 cache->set(index2 + kStringOffset, Smi::FromInt(0)); 3163 cache->set(index2 + kStringOffset, Smi::FromInt(0));
3207 cache->set(index2 + kPatternOffset, Smi::FromInt(0)); 3164 cache->set(index2 + kPatternOffset, Smi::FromInt(0));
3208 cache->set(index2 + kArrayOffset, Smi::FromInt(0)); 3165 cache->set(index2 + kArrayOffset, Smi::FromInt(0));
3209 cache->set(index + kStringOffset, key_string); 3166 cache->set(index + kStringOffset, *key_string);
3210 cache->set(index + kPatternOffset, key_pattern); 3167 cache->set(index + kPatternOffset, *key_pattern);
3211 cache->set(index + kArrayOffset, value_array); 3168 cache->set(index + kArrayOffset, *value_array);
3212 } 3169 }
3213 } 3170 }
3214 // If the array is a reasonably short list of substrings, convert it into a 3171 // If the array is a reasonably short list of substrings, convert it into a
3215 // list of internalized strings. 3172 // list of internalized strings.
3216 if (type == STRING_SPLIT_SUBSTRINGS && value_array->length() < 100) { 3173 if (type == STRING_SPLIT_SUBSTRINGS && value_array->length() < 100) {
3217 for (int i = 0; i < value_array->length(); i++) { 3174 for (int i = 0; i < value_array->length(); i++) {
3218 String* str = String::cast(value_array->get(i)); 3175 Handle<String> str(String::cast(value_array->get(i)), isolate);
3219 Object* internalized_str; 3176 Handle<String> internalized_str = factory->InternalizeString(str);
3220 MaybeObject* maybe_string = heap->InternalizeString(str); 3177 value_array->set(i, *internalized_str);
3221 if (maybe_string->ToObject(&internalized_str)) {
3222 value_array->set(i, internalized_str);
3223 }
3224 } 3178 }
3225 } 3179 }
3226 // Convert backing store to a copy-on-write array. 3180 // Convert backing store to a copy-on-write array.
3227 value_array->set_map_no_write_barrier(heap->fixed_cow_array_map()); 3181 value_array->set_map_no_write_barrier(*factory->fixed_cow_array_map());
3228 } 3182 }
3229 3183
3230 3184
3231 void RegExpResultsCache::Clear(FixedArray* cache) { 3185 void RegExpResultsCache::Clear(FixedArray* cache) {
3232 for (int i = 0; i < kRegExpResultsCacheSize; i++) { 3186 for (int i = 0; i < kRegExpResultsCacheSize; i++) {
3233 cache->set(i, Smi::FromInt(0)); 3187 cache->set(i, Smi::FromInt(0));
3234 } 3188 }
3235 } 3189 }
3236 3190
3237 3191
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 } 5825 }
5872 5826
5873 5827
5874 bool Heap::CreateHeapObjects() { 5828 bool Heap::CreateHeapObjects() {
5875 // Create initial maps. 5829 // Create initial maps.
5876 if (!CreateInitialMaps()) return false; 5830 if (!CreateInitialMaps()) return false;
5877 if (!CreateApiObjects()) return false; 5831 if (!CreateApiObjects()) return false;
5878 5832
5879 // Create initial objects 5833 // Create initial objects
5880 if (!CreateInitialObjects()) return false; 5834 if (!CreateInitialObjects()) return false;
5835 CHECK_EQ(0, gc_count_);
5881 5836
5882 native_contexts_list_ = undefined_value(); 5837 native_contexts_list_ = undefined_value();
5883 array_buffers_list_ = undefined_value(); 5838 array_buffers_list_ = undefined_value();
5884 allocation_sites_list_ = undefined_value(); 5839 allocation_sites_list_ = undefined_value();
5885 weak_object_to_code_table_ = undefined_value(); 5840 weak_object_to_code_table_ = undefined_value();
5886
5887 HandleScope scope(isolate());
5888 Runtime::InitializeIntrinsicFunctionNames(
5889 isolate(), handle(intrinsic_function_names(), isolate()));
5890
5891 return true; 5841 return true;
5892 } 5842 }
5893 5843
5894 5844
5895 void Heap::SetStackLimits() { 5845 void Heap::SetStackLimits() {
5896 ASSERT(isolate_ != NULL); 5846 ASSERT(isolate_ != NULL);
5897 ASSERT(isolate_ == isolate()); 5847 ASSERT(isolate_ == isolate());
5898 // On 64 bit machines, pointers are generally out of range of Smis. We write 5848 // On 64 bit machines, pointers are generally out of range of Smis. We write
5899 // something that looks like an out of range Smi to the GC. 5849 // something that looks like an out of range Smi to the GC.
5900 5850
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
7064 static_cast<int>(object_sizes_last_time_[index])); 7014 static_cast<int>(object_sizes_last_time_[index]));
7065 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7015 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7066 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7016 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7067 7017
7068 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7018 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7069 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7019 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7070 ClearObjectStats(); 7020 ClearObjectStats();
7071 } 7021 }
7072 7022
7073 } } // namespace v8::internal 7023 } } // 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