| Index: src/asmjs/asm-typer.cc
|
| diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc
|
| index 2b0b91a5568ff8b9081cbbb7db21b03309815d94..a43ca91764272d246ffc8fd8aca0160a75c4ca10 100644
|
| --- a/src/asmjs/asm-typer.cc
|
| +++ b/src/asmjs/asm-typer.cc
|
| @@ -17,16 +17,19 @@
|
| #include "src/base/bits.h"
|
| #include "src/codegen.h"
|
| #include "src/globals.h"
|
| +#include "src/messages.h"
|
| #include "src/utils.h"
|
|
|
| -#define FAIL(node, msg) \
|
| - do { \
|
| - int line = node->position() == kNoSourcePosition \
|
| - ? -1 \
|
| - : script_->GetLineNumber(node->position()); \
|
| - base::OS::SNPrintF(error_message_, sizeof(error_message_), \
|
| - "asm: line %d: %s", line + 1, msg); \
|
| - return AsmType::None(); \
|
| +#define FAIL(node, msg) \
|
| + do { \
|
| + MessageLocation location(handle(script_), node->position(), \
|
| + node->position()); \
|
| + Handle<String> message(isolate_->factory()->InternalizeOneByteString( \
|
| + STATIC_CHAR_VECTOR(msg))); \
|
| + error_message_ = MessageHandler::MakeMessageObject( \
|
| + isolate_, MessageTemplate::kAsmJsInvalid, &location, message, \
|
| + Handle<JSArray>::null()); \
|
| + return AsmType::None(); \
|
| } while (false)
|
|
|
| #define RECURSE(call) \
|
| @@ -2848,19 +2851,6 @@ AsmType* AsmTyper::NewHeapView(CallNew* new_heap_view) {
|
| return heap_view_info->type();
|
| }
|
|
|
| -bool IsValidAsm(Isolate* isolate, Zone* zone, Script* script,
|
| - FunctionLiteral* root, std::string* error_message) {
|
| - error_message->clear();
|
| -
|
| - AsmTyper typer(isolate, zone, script, root);
|
| - if (typer.Validate()) {
|
| - return true;
|
| - }
|
| -
|
| - *error_message = typer.error_message();
|
| - return false;
|
| -}
|
| -
|
| } // namespace wasm
|
| } // namespace internal
|
| } // namespace v8
|
|
|