Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 1933af0bcf51601a7ab38480c5dab6600a367e2d..fe445ff63774c8c1cbd8f2359e9a204c197bf3ef 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -1715,8 +1715,10 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
// rcx, and the global object on the stack. |
__ Move(rcx, var->name()); |
__ movq(rdx, GlobalObjectOperand()); |
- Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); |
- EmitCallIC(ic, RelocInfo::CODE_TARGET); |
+ Handle<Code> ic(Builtins::builtin(is_strict() |
+ ? Builtins::StoreIC_Initialize_Strict |
+ : Builtins::StoreIC_Initialize)); |
+ EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT); |
} else if (var->mode() != Variable::CONST || op == Token::INIT_CONST) { |
// Perform the assignment for non-const variables and for initialization |