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

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

Issue 1894953004: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing 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/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3f7b0bb76966ff29118bec2436aeb157fe6fe0e6..59ef2ccd6f60e4da17105b303190459ec7eff16a 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -450,6 +450,9 @@ void FullCodeGenerator::EmitReturnSequence() {
}
}
+void FullCodeGenerator::RestoreContext() {
+ __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+}
void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
DCHECK(var->IsStackAllocated() || var->IsContextSlot());
@@ -1380,7 +1383,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
}
PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG);
@@ -1825,7 +1828,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ beq(&post_runtime);
__ push(r3); // generator object
__ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
__ bind(&post_runtime);
PopOperand(result_register());
EmitReturnSequence();
@@ -2521,8 +2524,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
- // Restore context register.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->DropAndPlug(1, r3);
}
@@ -2630,8 +2632,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
- // Restore context register.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->DropAndPlug(1, r3);
}
@@ -2671,8 +2672,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
- // Restore context register.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->Plug(r3);
}
@@ -2715,9 +2715,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
-
- // Restore context register.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->Plug(r3);
}
@@ -3103,8 +3101,7 @@ void FullCodeGenerator::EmitCall(CallRuntime* expr) {
__ mov(r3, Operand(argc));
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(argc + 1);
- // Restore context register.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
// Discard the function left on TOS.
context()->DropAndPlug(1, r3);
}
@@ -3222,9 +3219,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),
RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
-
- // Restore context register.
- __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
}
@@ -3689,7 +3684,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
case Token::IN:
VisitForStackValue(expr->right());
SetExpressionPosition(expr);
- CallRuntimeWithOperands(Runtime::kHasProperty);
+ EmitHasProperty();
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ CompareRoot(r3, Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698