Add missing CSA routines in preparation for Torque
Change-Id: I170f47ee1c1e7e1a1296d5e5fc7fd1e2ab28a2f7 Reviewed-on: https://chromium-review.googlesource.com/1005076 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#52521}
This commit is contained in:
parent
b4cf629812
commit
4eebf032e0
@ -167,6 +167,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
|
|||||||
return UncheckedCast<JSArray>(value);
|
return UncheckedCast<JSArray>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TNode<HeapObject> TaggedToCallable(TNode<Object> value, Label* fail) {
|
||||||
|
GotoIf(TaggedIsSmi(value), fail);
|
||||||
|
TNode<HeapObject> result = UncheckedCast<HeapObject>(value);
|
||||||
|
GotoIfNot(IsCallableMap(LoadMap(result)), fail);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
Node* MatchesParameterMode(Node* value, ParameterMode mode);
|
Node* MatchesParameterMode(Node* value, ParameterMode mode);
|
||||||
|
|
||||||
#define PARAMETER_BINOP(OpName, IntPtrOpName, SmiOpName) \
|
#define PARAMETER_BINOP(OpName, IntPtrOpName, SmiOpName) \
|
||||||
@ -370,6 +377,23 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
|
|||||||
Node* extra_node4 = nullptr, const char* extra_node4_name = "",
|
Node* extra_node4 = nullptr, const char* extra_node4_name = "",
|
||||||
Node* extra_node5 = nullptr, const char* extra_node5_name = "");
|
Node* extra_node5 = nullptr, const char* extra_node5_name = "");
|
||||||
|
|
||||||
|
// The following Call wrappers call an object according to the semantics that
|
||||||
|
// one finds in the EcmaScript spec, operating on an Callable (e.g. a
|
||||||
|
// JSFunction or proxy) rather than a Code object.
|
||||||
|
template <class... TArgs>
|
||||||
|
TNode<Object> Call(TNode<Context> context, TNode<Object> callable,
|
||||||
|
TNode<JSReceiver> receiver, TArgs... args) {
|
||||||
|
return UncheckedCast<Object>(CallJS(
|
||||||
|
CodeFactory::Call(isolate(), ConvertReceiverMode::kNotNullOrUndefined),
|
||||||
|
context, callable, receiver, args...));
|
||||||
|
}
|
||||||
|
template <class... TArgs>
|
||||||
|
TNode<Object> Call(TNode<Context> context, TNode<Object> callable,
|
||||||
|
TNode<Object> receiver, TArgs... args) {
|
||||||
|
return UncheckedCast<Object>(CallJS(CodeFactory::Call(isolate()), context,
|
||||||
|
callable, receiver, args...));
|
||||||
|
}
|
||||||
|
|
||||||
template <class A, class F, class G>
|
template <class A, class F, class G>
|
||||||
TNode<A> Select(SloppyTNode<BoolT> condition, const F& true_body,
|
TNode<A> Select(SloppyTNode<BoolT> condition, const F& true_body,
|
||||||
const G& false_body) {
|
const G& false_body) {
|
||||||
|
Loading…
Reference in New Issue
Block a user