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

Side by Side Diff: src/heap.cc

Issue 11307012: Use movw/movt on ARM to load constant roots (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 1 month 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
« src/heap.h ('K') | « src/heap.h ('k') | no next file » | 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 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 // Initialize descriptor cache. 2832 // Initialize descriptor cache.
2833 isolate_->descriptor_lookup_cache()->Clear(); 2833 isolate_->descriptor_lookup_cache()->Clear();
2834 2834
2835 // Initialize compilation cache. 2835 // Initialize compilation cache.
2836 isolate_->compilation_cache()->Clear(); 2836 isolate_->compilation_cache()->Clear();
2837 2837
2838 return true; 2838 return true;
2839 } 2839 }
2840 2840
2841 2841
2842 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
2843 RootListIndex writable_roots[] = {
2844 kStoreBufferTopRootIndex,
2845 kStackLimitRootIndex,
2846 kInstanceofCacheFunctionRootIndex,
2847 kInstanceofCacheMapRootIndex,
2848 kInstanceofCacheAnswerRootIndex,
2849 kCodeStubsRootIndex,
2850 kNonMonomorphicCacheRootIndex,
2851 kPolymorphicCodeCacheRootIndex,
2852 kLastScriptIdRootIndex,
2853 kEmptyScriptRootIndex,
2854 kRealStackLimitRootIndex,
2855 kArgumentsAdaptorDeoptPCOffsetRootIndex,
2856 kConstructStubDeoptPCOffsetRootIndex,
2857 kGetterStubDeoptPCOffsetRootIndex,
2858 kSetterStubDeoptPCOffsetRootIndex,
2859 kSymbolTableRootIndex,
2860 };
2861
2862 for (unsigned int i = 0; i < ARRAY_SIZE(writable_roots); i++) {
2863 if (root_index == writable_roots[i])
2864 return true;
2865 }
2866 return false;
2867 }
2868
2869
2842 Object* RegExpResultsCache::Lookup(Heap* heap, 2870 Object* RegExpResultsCache::Lookup(Heap* heap,
2843 String* key_string, 2871 String* key_string,
2844 Object* key_pattern, 2872 Object* key_pattern,
2845 ResultsCacheType type) { 2873 ResultsCacheType type) {
2846 FixedArray* cache; 2874 FixedArray* cache;
2847 if (!key_string->IsSymbol()) return Smi::FromInt(0); 2875 if (!key_string->IsSymbol()) return Smi::FromInt(0);
2848 if (type == STRING_SPLIT_SUBSTRINGS) { 2876 if (type == STRING_SPLIT_SUBSTRINGS) {
2849 ASSERT(key_pattern->IsString()); 2877 ASSERT(key_pattern->IsString());
2850 if (!key_pattern->IsSymbol()) return Smi::FromInt(0); 2878 if (!key_pattern->IsSymbol()) return Smi::FromInt(0);
2851 cache = heap->string_split_cache(); 2879 cache = heap->string_split_cache();
(...skipping 4515 matching lines...) Expand 10 before | Expand all | Expand 10 after
7367 static_cast<int>(object_sizes_last_time_[index])); 7395 static_cast<int>(object_sizes_last_time_[index]));
7368 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7396 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7369 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7397 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7370 7398
7371 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7399 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7372 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7400 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7373 ClearObjectStats(); 7401 ClearObjectStats();
7374 } 7402 }
7375 7403
7376 } } // namespace v8::internal 7404 } } // namespace v8::internal
OLDNEW
« src/heap.h ('K') | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698