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

Unified Diff: src/arm64/lithium-arm64.cc

Issue 1114563003: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 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
Index: src/arm64/lithium-arm64.cc
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
index 2dfcdb08615f6b69ba721d1d50d19c7d82ce332a..b3498f85fea173ac79c50e9205187a2fedecedf3 100644
--- a/src/arm64/lithium-arm64.cc
+++ b/src/arm64/lithium-arm64.cc
@@ -2560,12 +2560,8 @@ LInstruction* LChunkBuilder::DoTrapAllocationMemento(
LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
LOperand* context = UseFixed(instr->context(), cp);
- // TODO(jbramley): In ARM, this uses UseFixed to force the input to x0.
- // However, LCodeGen::DoTypeof just pushes it to the stack (for CallRuntime)
- // anyway, so the input doesn't have to be in x0. We might be able to improve
- // the ARM back-end a little by relaxing this restriction.
- LTypeof* result =
- new(zone()) LTypeof(context, UseRegisterAtStart(instr->value()));
+ LOperand* value = UseFixed(instr->value(), x3);
+ LTypeof* result = new (zone()) LTypeof(context, value);
return MarkAsCall(DefineFixed(result, x0), instr);
}

Powered by Google App Engine
This is Rietveld 408576698