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

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

Issue 1114563003: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips/mips64 errors. 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/ia32/full-codegen-ia32.cc
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index dc3d403044c2e7db2edc4d57ff5965c60fc6e8ec..09233c004d51af45a900f54ea632039a33dfc78e 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -4753,10 +4753,13 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
case Token::TYPEOF: {
Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
- { StackValueContext context(this);
+ {
+ AccumulatorValueContext context(this);
VisitForTypeofValue(expr->expression());
}
- __ CallRuntime(Runtime::kTypeof, 1);
+ __ mov(ebx, eax);
+ TypeofStub typeof_stub(isolate());
+ __ CallStub(&typeof_stub);
context()->Plug(eax);
break;
}

Powered by Google App Engine
This is Rietveld 408576698