Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 24df20ba767bd76df3fe06cbae9109d56afe6512..c3dea0ea8df3c8465ba5f9dac8c0e5ba48bb1cdc 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -222,13 +222,19 @@ void FullCodeGenerator::Generate(CompilationInfo* info) { |
Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset)); |
__ push(rdx); |
__ Push(Smi::FromInt(num_parameters)); |
- // Arguments to ArgumentsAccessStub: |
+ // Arguments to ArgumentsAccessStub and/or New...: |
fschneider
2012/01/16 14:25:07
What's "New..."? I think the comment was fine as i
|
// function, receiver address, parameter count. |
// The stub will rewrite receiver and parameter count if the previous |
// stack frame was an arguments adapter frame. |
- ArgumentsAccessStub stub( |
- is_classic_mode() ? ArgumentsAccessStub::NEW_NON_STRICT_SLOW |
- : ArgumentsAccessStub::NEW_STRICT); |
+ ArgumentsAccessStub::Type type; |
+ if (!is_classic_mode()) { |
+ type = ArgumentsAccessStub::NEW_STRICT; |
+ } else if (function()->has_duplicate_parameters()) { |
+ type = ArgumentsAccessStub::NEW_NON_STRICT_SLOW; |
+ } else { |
+ type = ArgumentsAccessStub::NEW_NON_STRICT_FAST; |
+ } |
+ ArgumentsAccessStub stub(type); |
__ CallStub(&stub); |
SetVar(arguments, rax, rbx, rdx); |