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

Unified Diff: src/builtins/builtins-conversion-gen.cc

Issue 2890363002: Fix deoptmization of inlined TF InstanceOf to call ToBoolean (Closed)
Patch Set: Review feedback Created 3 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 | « no previous file | src/builtins/builtins-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-conversion-gen.cc
diff --git a/src/builtins/builtins-conversion-gen.cc b/src/builtins/builtins-conversion-gen.cc
index 43cac0ed6d806d565ef73592144815728f280b12..c050a054f383827a596ca2e74ce4eff462e915c2 100644
--- a/src/builtins/builtins-conversion-gen.cc
+++ b/src/builtins/builtins-conversion-gen.cc
@@ -256,6 +256,22 @@ TF_BUILTIN(ToBoolean, CodeStubAssembler) {
Return(BooleanConstant(false));
}
+// ES6 section 7.1.2 ToBoolean ( argument )
+// Requires parameter on stack so that it can be used as a continuation from a
+// LAZY deopt.
+TF_BUILTIN(ToBooleanLazyDeoptContinuation, CodeStubAssembler) {
+ Node* value = Parameter(Descriptor::kArgument);
+
+ Label return_true(this), return_false(this);
+ BranchIfToBooleanIsTrue(value, &return_true, &return_false);
+
+ BIND(&return_true);
+ Return(BooleanConstant(true));
+
+ BIND(&return_false);
+ Return(BooleanConstant(false));
+}
+
TF_BUILTIN(ToLength, CodeStubAssembler) {
Node* context = Parameter(Descriptor::kContext);
« no previous file with comments | « no previous file | src/builtins/builtins-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698