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

Unified Diff: src/full-codegen/arm/full-codegen-arm.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/crankshaft/hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm/full-codegen-arm.cc
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
index 49a35c851896e59f8ec9b80991f471e49d26eb53..ab5cb674ba296e4eef2a71a8de25c50b40b9a4bf 100644
--- a/src/full-codegen/arm/full-codegen-arm.cc
+++ b/src/full-codegen/arm/full-codegen-arm.cc
@@ -468,6 +468,9 @@ void FullCodeGenerator::EmitReturnSequence() {
}
}
+void FullCodeGenerator::RestoreContext() {
+ __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+}
void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
DCHECK(var->IsStackAllocated() || var->IsContextSlot());
@@ -1418,7 +1421,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
} else {
FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
__ CallStub(&stub);
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
}
PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG);
@@ -1866,7 +1869,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ b(eq, &post_runtime);
__ push(r0); // generator object
__ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
__ bind(&post_runtime);
PopOperand(result_register());
EmitReturnSequence();
@@ -2527,8 +2530,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
- // Restore context register.
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->DropAndPlug(1, r0);
}
@@ -2635,8 +2637,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
- // Restore context register.
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->DropAndPlug(1, r0);
}
@@ -2676,8 +2677,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
- // Restore context register.
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->Plug(r0);
}
@@ -2720,9 +2720,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
OperandStackDepthDecrement(arg_count + 1);
RecordJSReturnSite(expr);
-
- // Restore context register.
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
context()->Plug(r0);
}
@@ -3118,8 +3116,7 @@ void FullCodeGenerator::EmitCall(CallRuntime* expr) {
__ mov(r0, Operand(argc));
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(argc + 1);
- // Restore context register.
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
// Discard the function left on TOS.
context()->DropAndPlug(1, r0);
}
@@ -3236,9 +3233,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),
RelocInfo::CODE_TARGET);
OperandStackDepthDecrement(arg_count + 1);
-
- // Restore context register.
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
+ RestoreContext();
}
@@ -3704,7 +3699,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
case Token::IN:
VisitForStackValue(expr->right());
SetExpressionPosition(expr);
- CallRuntimeWithOperands(Runtime::kHasProperty);
+ EmitHasProperty();
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
__ CompareRoot(r0, Heap::kTrueValueRootIndex);
Split(eq, if_true, if_false, fall_through);
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698