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

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

Issue 1694343002: X87: [compiler] Sanitize entry points to LookupSlot access. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x87/full-codegen-x87.cc
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc
index a5a939d03b4429247bc72b0c9ca8c976ceeef626..28e14bcb242763d3bb29d4a3b4c02596efa966ec 100644
--- a/src/full-codegen/x87/full-codegen-x87.cc
+++ b/src/full-codegen/x87/full-codegen-x87.cc
@@ -1346,7 +1346,8 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
// Generate code for loading from variables potentially shadowed
// by eval-introduced variables.
EmitDynamicLookupFastCase(proxy, typeof_mode, &slow, &done);
- __ Push(var->name());
+ __ bind(&slow);
+ __ push(Immediate(var->name()));
Runtime::FunctionId function_id =
typeof_mode == NOT_INSIDE_TYPEOF
? Runtime::kLoadLookupSlot
@@ -2339,7 +2340,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
(var->mode() == CONST && op == Token::INIT)) {
if (var->IsLookupSlot()) {
// Assignment to var.
- __ Push(var->name());
+ __ Push(Immediate(var->name()));
__ Push(eax);
__ CallRuntime(is_strict(language_mode())
? Runtime::kStoreLookupSlot_Strict
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698