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

Unified Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm64/full-codegen-arm64.cc
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
index bf7d36abcce375595bbd0ad28f9eaeecd68edbd6..1760ae955ece0e9eaf74dccc29a2682d00e4e812 100644
--- a/src/full-codegen/arm64/full-codegen-arm64.cc
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc
@@ -2462,8 +2462,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
context()->DropAndPlug(1, x0);
}
-
-void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
+void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) {
+ int arg_count = expr->arguments()->length();
ASM_LOCATION("FullCodeGenerator::EmitResolvePossiblyDirectEval");
// Prepare to push a copy of the first argument or undefined if it doesn't
// exist.
@@ -2479,9 +2479,11 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
__ Mov(x11, Smi::FromInt(language_mode()));
// Prepare to push the start position of the scope the calls resides in.
__ Mov(x12, Smi::FromInt(scope()->start_position()));
+ // Prepare to push the source position of the eval call.
+ __ Mov(x13, Smi::FromInt(expr->position()));
// Push.
- __ Push(x9, x10, x11, x12);
+ __ Push(x9, x10, x11, x12, x13);
// Do the runtime call.
__ CallRuntime(Runtime::kResolvePossiblyDirectEval);
@@ -2531,7 +2533,7 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
ASM_LOCATION("FullCodeGenerator::EmitPossiblyEvalCall");
- // In a call to eval, we first call RuntimeHidden_ResolvePossiblyDirectEval
+ // In a call to eval, we first call Runtime_ResolvePossiblyDirectEval
// to resolve the function we need to call. Then we call the resolved
// function using the given arguments.
ZoneList<Expression*>* args = expr->arguments();
@@ -2548,7 +2550,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
// resolve eval.
__ Peek(x10, (arg_count + 1) * kPointerSize);
__ Push(x10);
- EmitResolvePossiblyDirectEval(arg_count);
+ EmitResolvePossiblyDirectEval(expr);
// Touch up the stack with the resolved function.
__ Poke(x0, (arg_count + 1) * kPointerSize);
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698