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

Unified Diff: src/frames.cc

Issue 2467513002: [builtins]: Uniformly push argument count in TF-generated builtins (Closed)
Patch Set: Fix windows build Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.h ('k') | test/cctest/compiler/code-assembler-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index b52052eee8ba555e3bb16f18133acdb433c02ffb..15adc16e236a695d8360593421a841a0197b3373 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1285,6 +1285,19 @@ DeoptimizationInputData* OptimizedFrame::GetDeoptimizationData(
return nullptr;
}
+Object* OptimizedFrame::receiver() const {
+ Code* code = LookupCode();
+ if (code->kind() == Code::BUILTIN) {
+ Address argc_ptr = fp() + OptimizedBuiltinFrameConstants::kArgCOffset;
+ intptr_t argc = *reinterpret_cast<intptr_t*>(argc_ptr);
+ intptr_t args_size =
+ (StandardFrameConstants::kFixedSlotCountAboveFp + argc) * kPointerSize;
+ Address receiver_ptr = fp() + args_size;
+ return *reinterpret_cast<Object**>(receiver_ptr);
+ } else {
+ return JavaScriptFrame::receiver();
+ }
+}
void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const {
DCHECK(functions->length() == 0);
« no previous file with comments | « src/frames.h ('k') | test/cctest/compiler/code-assembler-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698