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

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

Issue 14081008: Type feedback for Unary Plus (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/hydrogen-instructions.cc ('k') | src/type-info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/full-codegen-ia32.cc
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index 19989b1c626dd3ea85f6cb9c3c44d7bfab8dffa9..82b107f07fcb9bead38f739da75fc8f53d854885 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -3972,8 +3972,14 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
VisitForAccumulatorValue(expr->expression());
Label no_conversion;
__ JumpIfSmi(result_register(), &no_conversion);
- ToNumberStub convert_stub;
- __ CallStub(&convert_stub);
+ __ mov(edx, Immediate(Smi::FromInt(1)));
+ OverwriteMode mode = expr->expression()->ResultOverwriteAllowed()
+ ? OVERWRITE_RIGHT : NO_OVERWRITE;
+ BinaryOpStub stub(Token::MUL, mode);
+ JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
+ CallIC(stub.GetCode(isolate()), RelocInfo::CODE_TARGET,
+ expr->UnaryOperationFeedbackId());
+ patch_site.EmitPatchInfo();
__ bind(&no_conversion);
context()->Plug(result_register());
break;
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698