Index: src/builtins/builtins-conversion.cc |
diff --git a/src/builtins/builtins-conversion.cc b/src/builtins/builtins-conversion.cc |
index ec1543a1b700a6cc5365b55b217140c372809d20..b44a39a3e56b56fb8ce852a842b253255e9bc78b 100644 |
--- a/src/builtins/builtins-conversion.cc |
+++ b/src/builtins/builtins-conversion.cc |
@@ -24,6 +24,7 @@ Handle<Code> Builtins::NonPrimitiveToPrimitive(ToPrimitiveHint hint) { |
} |
namespace { |
+ |
// ES6 section 7.1.1 ToPrimitive ( input [ , PreferredType ] ) |
void Generate_NonPrimitiveToPrimitive(CodeStubAssembler* assembler, |
ToPrimitiveHint hint) { |
@@ -52,7 +53,8 @@ void Generate_NonPrimitiveToPrimitive(CodeStubAssembler* assembler, |
{ |
// Invoke the {exotic_to_prim} method on the {input} with a string |
// representation of the {hint}. |
- Callable callable = CodeFactory::Call(assembler->isolate()); |
+ Callable callable = CodeFactory::Call( |
+ assembler->isolate(), ConvertReceiverMode::kNotNullOrUndefined); |
Node* hint_string = assembler->HeapConstant( |
assembler->factory()->ToPrimitiveHintString(hint)); |
Node* result = assembler->CallJS(callable, context, exotic_to_prim, input, |
@@ -93,7 +95,8 @@ void Generate_NonPrimitiveToPrimitive(CodeStubAssembler* assembler, |
assembler->TailCallStub(callable, context, input); |
} |
} |
-} // anonymous namespace |
+ |
+} // namespace |
void Builtins::Generate_NonPrimitiveToPrimitive_Default( |
compiler::CodeAssemblerState* state) { |
@@ -221,6 +224,7 @@ Handle<Code> Builtins::OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint) { |
} |
namespace { |
+ |
// 7.1.1.1 OrdinaryToPrimitive ( O, hint ) |
void Generate_OrdinaryToPrimitive(CodeStubAssembler* assembler, |
OrdinaryToPrimitiveHint hint) { |
@@ -263,7 +267,8 @@ void Generate_OrdinaryToPrimitive(CodeStubAssembler* assembler, |
assembler->Bind(&if_methodiscallable); |
{ |
// Call the {method} on the {input}. |
- Callable callable = CodeFactory::Call(assembler->isolate()); |
+ Callable callable = CodeFactory::Call( |
+ assembler->isolate(), ConvertReceiverMode::kNotNullOrUndefined); |
Node* result = assembler->CallJS(callable, context, method, input); |
var_result.Bind(result); |
@@ -287,7 +292,8 @@ void Generate_OrdinaryToPrimitive(CodeStubAssembler* assembler, |
assembler->Bind(&return_result); |
assembler->Return(var_result.value()); |
} |
-} // anonymous namespace |
+ |
+} // namespace |
void Builtins::Generate_OrdinaryToPrimitive_Number( |
compiler::CodeAssemblerState* state) { |