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

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

Issue 1216463003: [strong] Implement strong mode semantics for the count operation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback + eliminate runtime check Created 5 years, 6 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/ic/ic-state.cc » ('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 04d48bdfdfb581c57096e8502ad50ee67f8531c2..2f1fbdb182822d6ecdfd6f8a7724ea116ffce995 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -4957,9 +4957,11 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
__ jmp(&stub_call, Label::kNear);
__ bind(&slow);
}
- ToNumberStub convert_stub(isolate());
- __ CallStub(&convert_stub);
- PrepareForBailoutForId(expr->ToNumberId(), TOS_REG);
+ if (!is_strong(language_mode())) {
+ ToNumberStub convert_stub(isolate());
+ __ CallStub(&convert_stub);
+ PrepareForBailoutForId(expr->ToNumberId(), TOS_REG);
+ }
// Save result for postfix expressions.
if (expr->is_postfix()) {
@@ -5000,6 +5002,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
patch_site.EmitPatchInfo();
__ bind(&done);
+ if (is_strong(language_mode())) {
+ PrepareForBailoutForId(expr->ToNumberId(), TOS_REG);
+ }
// Store the value returned in eax.
switch (assign_type) {
case VARIABLE:
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698