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

Unified Diff: src/ic/handler-compiler.cc

Issue 2054133002: [--runtime-call-stats] Fix ACCESSOR handler computation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 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/ic/arm64/ic-arm64.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/handler-compiler.cc
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc
index d0180039f5d0ff74c8a36a938cd1294942584c29..a30e8e5ea37aa06ce969ff222b522cc08d1e3065 100644
--- a/src/ic/handler-compiler.cc
+++ b/src/ic/handler-compiler.cc
@@ -226,7 +226,11 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
Handle<Name> name, Handle<AccessorInfo> callback) {
Register reg = Frontend(name);
- GenerateLoadCallback(reg, callback);
+ if (FLAG_runtime_call_stats) {
+ TailCallBuiltin(masm(), Builtins::kLoadIC_Slow);
+ } else {
+ GenerateLoadCallback(reg, callback);
+ }
return GetCode(kind(), name);
}
@@ -236,8 +240,12 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
int accessor_index) {
DCHECK(call_optimization.is_simple_api_call());
Register holder = Frontend(name);
- GenerateApiAccessorCall(masm(), call_optimization, map(), receiver(),
- scratch2(), false, no_reg, holder, accessor_index);
+ if (FLAG_runtime_call_stats) {
+ TailCallBuiltin(masm(), Builtins::kLoadIC_Slow);
+ } else {
+ GenerateApiAccessorCall(masm(), call_optimization, map(), receiver(),
+ scratch2(), false, no_reg, holder, accessor_index);
+ }
return GetCode(kind(), name);
}
@@ -561,9 +569,14 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
Handle<JSObject> object, Handle<Name> name,
const CallOptimization& call_optimization, int accessor_index) {
Register holder = Frontend(name);
- GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()),
- receiver(), scratch2(), true, value(), holder,
- accessor_index);
+ if (FLAG_runtime_call_stats) {
+ GenerateRestoreName(name);
+ TailCallBuiltin(masm(), Builtins::kStoreIC_Slow);
+ } else {
+ GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()),
+ receiver(), scratch2(), true, value(), holder,
+ accessor_index);
+ }
return GetCode(kind(), name);
}
« no previous file with comments | « src/ic/arm64/ic-arm64.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698