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); |