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

Unified Diff: src/ic.cc

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index ea0c1fbbe1d70438ee2983ee0d682ef5d3700f24..b928aa85025b694ffd1880026ec9471e323978f4 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -39,6 +39,21 @@
namespace v8 {
namespace internal {
+
+// Resolves pc_address through the resolution address function if one is set.
+static inline Address* ResolveReturnAddressLocation(Address* pc_address) {
+ extern ReturnAddressLocationResolver return_address_location_resolver;
+
+ if (return_address_location_resolver == NULL) {
+ return pc_address;
+ } else {
+ return reinterpret_cast<Address*>(
+ return_address_location_resolver(
+ reinterpret_cast<uintptr_t>(pc_address)));
+ }
+}
+
+
#ifdef DEBUG
char IC::TransitionMarkFromState(IC::State state) {
switch (state) {
@@ -144,7 +159,7 @@ IC::IC(FrameDepth depth, Isolate* isolate) : isolate_(isolate) {
ASSERT(fp == frame->fp() && pc_address == frame->pc_address());
#endif
fp_ = fp;
- pc_address_ = pc_address;
+ pc_address_ = ResolveReturnAddressLocation(pc_address);
danno 2013/06/11 11:33:14 The comment above about the performance sensitivit
}
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/snapshot-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698