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

Side by Side Diff: src/snapshot/serialize.cc

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make mips work Created 5 years, 5 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
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/x64/code-stubs-x64.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 Add(ExternalReference::address_of_real_stack_limit(isolate).address(), 53 Add(ExternalReference::address_of_real_stack_limit(isolate).address(),
54 "StackGuard::address_of_real_jslimit()"); 54 "StackGuard::address_of_real_jslimit()");
55 Add(ExternalReference::new_space_start(isolate).address(), 55 Add(ExternalReference::new_space_start(isolate).address(),
56 "Heap::NewSpaceStart()"); 56 "Heap::NewSpaceStart()");
57 Add(ExternalReference::new_space_mask(isolate).address(), 57 Add(ExternalReference::new_space_mask(isolate).address(),
58 "Heap::NewSpaceMask()"); 58 "Heap::NewSpaceMask()");
59 Add(ExternalReference::new_space_allocation_limit_address(isolate).address(), 59 Add(ExternalReference::new_space_allocation_limit_address(isolate).address(),
60 "Heap::NewSpaceAllocationLimitAddress()"); 60 "Heap::NewSpaceAllocationLimitAddress()");
61 Add(ExternalReference::new_space_allocation_top_address(isolate).address(), 61 Add(ExternalReference::new_space_allocation_top_address(isolate).address(),
62 "Heap::NewSpaceAllocationTopAddress()"); 62 "Heap::NewSpaceAllocationTopAddress()");
63 Add(ExternalReference::debug_break(isolate).address(), "Debug::Break()");
64 Add(ExternalReference::debug_step_in_fp_address(isolate).address(), 63 Add(ExternalReference::debug_step_in_fp_address(isolate).address(),
65 "Debug::step_in_fp_addr()"); 64 "Debug::step_in_fp_addr()");
66 Add(ExternalReference::mod_two_doubles_operation(isolate).address(), 65 Add(ExternalReference::mod_two_doubles_operation(isolate).address(),
67 "mod_two_doubles"); 66 "mod_two_doubles");
68 // Keyed lookup cache. 67 // Keyed lookup cache.
69 Add(ExternalReference::keyed_lookup_cache_keys(isolate).address(), 68 Add(ExternalReference::keyed_lookup_cache_keys(isolate).address(),
70 "KeyedLookupCache::keys()"); 69 "KeyedLookupCache::keys()");
71 Add(ExternalReference::keyed_lookup_cache_field_offsets(isolate).address(), 70 Add(ExternalReference::keyed_lookup_cache_field_offsets(isolate).address(),
72 "KeyedLookupCache::field_offsets()"); 71 "KeyedLookupCache::field_offsets()");
73 Add(ExternalReference::handle_scope_next_address(isolate).address(), 72 Add(ExternalReference::handle_scope_next_address(isolate).address(),
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 FOR_EACH_INTRINSIC(RUNTIME_ENTRY) 213 FOR_EACH_INTRINSIC(RUNTIME_ENTRY)
215 #undef RUNTIME_ENTRY 214 #undef RUNTIME_ENTRY
216 }; 215 };
217 216
218 for (unsigned i = 0; i < arraysize(runtime_functions); ++i) { 217 for (unsigned i = 0; i < arraysize(runtime_functions); ++i) {
219 ExternalReference ref( 218 ExternalReference ref(
220 static_cast<Runtime::FunctionId>(runtime_functions[i].id), isolate); 219 static_cast<Runtime::FunctionId>(runtime_functions[i].id), isolate);
221 Add(ref.address(), runtime_functions[i].name); 220 Add(ref.address(), runtime_functions[i].name);
222 } 221 }
223 222
224 static const RefTableEntry inline_caches[] = {
225 #define IC_ENTRY(name) \
226 { IC::k##name, "IC::" #name } \
227 ,
228 IC_UTIL_LIST(IC_ENTRY)
229 #undef IC_ENTRY
230 };
231
232 for (unsigned i = 0; i < arraysize(inline_caches); ++i) {
233 ExternalReference ref(
234 IC_Utility(static_cast<IC::UtilityId>(inline_caches[i].id)), isolate);
235 Add(ref.address(), runtime_functions[i].name);
236 }
237
238 // Stat counters 223 // Stat counters
239 struct StatsRefTableEntry { 224 struct StatsRefTableEntry {
240 StatsCounter* (Counters::*counter)(); 225 StatsCounter* (Counters::*counter)();
241 const char* name; 226 const char* name;
242 }; 227 };
243 228
244 static const StatsRefTableEntry stats_ref_table[] = { 229 static const StatsRefTableEntry stats_ref_table[] = {
245 #define COUNTER_ENTRY(name, caption) \ 230 #define COUNTER_ENTRY(name, caption) \
246 { &Counters::name, "Counters::" #name } \ 231 { &Counters::name, "Counters::" #name } \
247 , 232 ,
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 SerializedCodeData* scd = new SerializedCodeData(cached_data); 2783 SerializedCodeData* scd = new SerializedCodeData(cached_data);
2799 SanityCheckResult r = scd->SanityCheck(isolate, source); 2784 SanityCheckResult r = scd->SanityCheck(isolate, source);
2800 if (r == CHECK_SUCCESS) return scd; 2785 if (r == CHECK_SUCCESS) return scd;
2801 cached_data->Reject(); 2786 cached_data->Reject();
2802 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 2787 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
2803 delete scd; 2788 delete scd;
2804 return NULL; 2789 return NULL;
2805 } 2790 }
2806 } // namespace internal 2791 } // namespace internal
2807 } // namespace v8 2792 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698