Commit d2701715 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] disallow mostly unsupported vararg macros

Bug: v8:7929 v8:7793
Change-Id: I7d9cdd0fb3e36ae6e81683cc4c3746f6ea119d15
Reviewed-on: https://chromium-review.googlesource.com/1138077Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54564}
parent ec52bf56
......@@ -644,7 +644,12 @@ extern macro IsElementsKindGreaterThan(
extern macro LoadDoubleWithHoleCheck(FixedDoubleArray, Smi): float64
labels IfHole;
extern macro Call(Context, Callable, Object, ...): Object;
extern macro Call(Context, Callable, Object): Object;
extern macro Call(Context, Callable, Object, Object): Object;
extern macro Call(Context, Callable, Object, Object, Object): Object;
extern macro Call(Context, Callable, Object, Object, Object, Object): Object;
extern macro Call(Context, Callable, Object, Object, Object, Object, Object): Object;
extern macro Call(Context, Callable, Object, Object, Object, Object, Object, Object): Object;
extern macro ExtractFixedArray(
FixedArray, Smi, Smi, Smi, constexpr ExtractFixedArrayFlags): FixedArray;
......
......@@ -242,7 +242,11 @@ class Macro : public Callable {
protected:
Macro(Declarable::Kind type, const std::string& name,
const Signature& signature)
: Callable(type, name, signature) {}
: Callable(type, name, signature) {
if (signature.parameter_types.var_args) {
ReportError("Varargs are not supported for macros.");
}
}
private:
friend class Declarations;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment