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

Unified Diff: src/runtime/runtime-scopes.cc

Issue 1343763002: [turbofan] Add inlining guards to Runtime_NewArguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-arguments-1
Patch Set: Addressed comments. Created 5 years, 3 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/frames.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 1aa6611fa0bcdce02d57703ea581f916f3fa4961..cf0429fcc5d8089001fded67c1799ead46e063ff 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -542,6 +542,12 @@ RUNTIME_FUNCTION(Runtime_NewSloppyArguments) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
Object** parameters = reinterpret_cast<Object**>(args[1]);
CONVERT_SMI_ARG_CHECKED(argument_count, 2);
+#ifdef DEBUG
+ // This runtime function does not materialize the correct arguments when the
+ // caller has been inlined, better make sure we are not hitting that case.
+ JavaScriptFrameIterator it(isolate);
+ DCHECK(!it.frame()->HasInlinedFrames());
+#endif // DEBUG
return *NewSloppyArguments(isolate, callee, parameters, argument_count);
}
@@ -552,6 +558,12 @@ RUNTIME_FUNCTION(Runtime_NewStrictArguments) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0)
Object** parameters = reinterpret_cast<Object**>(args[1]);
CONVERT_SMI_ARG_CHECKED(argument_count, 2);
+#ifdef DEBUG
+ // This runtime function does not materialize the correct arguments when the
+ // caller has been inlined, better make sure we are not hitting that case.
+ JavaScriptFrameIterator it(isolate);
+ DCHECK(!it.frame()->HasInlinedFrames());
+#endif // DEBUG
return *NewStrictArguments(isolate, callee, parameters, argument_count);
}
« no previous file with comments | « src/frames.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698