| Index: src/messages.js
|
| diff --git a/src/messages.js b/src/messages.js
|
| index 513ffdc2a9b63e3b49a414886055f35d236322c3..a9da8514023968bbce698d3ee2b26645a4e5bdd7 100644
|
| --- a/src/messages.js
|
| +++ b/src/messages.js
|
| @@ -367,6 +367,23 @@ function MakeError(type, args) {
|
| return MakeGenericError($Error, type, args);
|
| }
|
|
|
| +
|
| +// The embedded versions are called from unoptimized code, with embedded
|
| +// arguments. Those arguments cannot be arrays, which are context-dependent.
|
| +function MakeTypeErrorEmbedded(type, arg) {
|
| + return MakeGenericError($TypeError, type, [arg]);
|
| +}
|
| +
|
| +
|
| +function MakeSyntaxErrorEmbedded(type, arg) {
|
| + return MakeGenericError($SyntaxError, type, [arg]);
|
| +}
|
| +
|
| +
|
| +function MakeReferenceErrorEmbedded(type, arg) {
|
| + return MakeGenericError($ReferenceError, type, [arg]);
|
| +}
|
| +
|
| /**
|
| * Find a line number given a specific source position.
|
| * @param {number} position The source position.
|
|
|