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

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

Issue 1683103002: [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
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index 1555344b52aee1dbc88ace133bec18e2fa9ad24e..cc659e1e3e4f156aa0620f1b5d7c621bd0dfafd1 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -2450,11 +2450,11 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
(var->mode() == CONST && op == Token::INIT)) {
if (var->IsLookupSlot()) {
// Assignment to var.
- __ push(r3); // Value.
- __ mov(r4, Operand(var->name()));
- __ mov(r3, Operand(Smi::FromInt(language_mode())));
- __ Push(cp, r4, r3); // Context, name, language mode.
- __ CallRuntime(Runtime::kStoreLookupSlot);
+ __ Push(var->name());
+ __ Push(r3);
+ __ CallRuntime(is_strict(language_mode())
+ ? Runtime::kStoreLookupSlot_Strict
+ : Runtime::kStoreLookupSlot_Sloppy);
} else {
// Assignment to var or initializing assignment to let/const in harmony
// mode.
@@ -2794,10 +2794,8 @@ void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
__ bind(&slow);
// Call the runtime to find the function to call (returned in r3) and
// the object holding it (returned in r4).
- DCHECK(!context_register().is(r5));
- __ mov(r5, Operand(callee->name()));
- __ Push(context_register(), r5);
- __ CallRuntime(Runtime::kLoadLookupSlot);
+ __ Push(callee->name());
+ __ CallRuntime(Runtime::kLoadLookupSlotForCall);
__ Push(r3, r4); // Function, receiver.
PrepareForBailoutForId(expr->LookupId(), NO_REGISTERS);

Powered by Google App Engine
This is Rietveld 408576698