Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index 936c5d267799b52aee590fc4cbe85ae5e9143a57..5f42d2920eab6b905604a5f8e8469559405b82cf 100644 |
--- a/src/code-stub-assembler.h |
+++ b/src/code-stub-assembler.h |
@@ -467,6 +467,13 @@ class CodeStubAssembler : public compiler::CodeAssembler { |
PrimitiveType primitive_type, |
char const* method_name); |
+ // Throws a TypeError for {method_name} if {value} is not of the given |
+ // instance type. Returns {value}'s map. |
+ compiler::Node* ThrowIfNotInstanceType(compiler::Node* context, |
+ compiler::Node* value, |
+ InstanceType instance_type, |
+ char const* method_name); |
+ |
// String helpers. |
// Load a character from a String (might flatten a ConsString). |
compiler::Node* StringCharCodeAt(compiler::Node* string, |