| Index: src/asmjs/asm-typer.h
|
| diff --git a/src/asmjs/asm-typer.h b/src/asmjs/asm-typer.h
|
| index 33ba39e7cce0b052d9ebff1c4f04e44137860b6c..723731bcdd309c203ef5de69c93dd7a85ebb28a8 100644
|
| --- a/src/asmjs/asm-typer.h
|
| +++ b/src/asmjs/asm-typer.h
|
| @@ -16,6 +16,7 @@
|
| #include "src/ast/ast-types.h"
|
| #include "src/ast/ast.h"
|
| #include "src/effects.h"
|
| +#include "src/messages.h"
|
| #include "src/type-info.h"
|
| #include "src/zone/zone-containers.h"
|
| #include "src/zone/zone.h"
|
| @@ -78,7 +79,8 @@ class AsmTyper final {
|
| bool ValidateAfterFunctionsPhase();
|
| void ClearFunctionNodeTypes();
|
|
|
| - const char* error_message() const { return error_message_; }
|
| + Handle<JSMessageObject> error_message() const { return error_message_; }
|
| + const MessageLocation* message_location() const { return &message_location_; }
|
|
|
| AsmType* TypeOf(AstNode* node) const;
|
| AsmType* TypeOf(Variable* v) const;
|
| @@ -138,7 +140,7 @@ class AsmTyper final {
|
| bool IsHeap() const { return standard_member_ == kHeap; }
|
|
|
| void MarkDefined() { missing_definition_ = false; }
|
| - void SetFirstForwardUse(int source_location);
|
| + void SetFirstForwardUse(const MessageLocation& source_location);
|
|
|
| StandardMember standard_member() const { return standard_member_; }
|
| void set_standard_member(StandardMember standard_member) {
|
| @@ -153,7 +155,7 @@ class AsmTyper final {
|
|
|
| bool missing_definition() const { return missing_definition_; }
|
|
|
| - int source_location() const { return source_location_; }
|
| + const MessageLocation* source_location() { return &source_location_; }
|
|
|
| static VariableInfo* ForSpecialSymbol(Zone* zone,
|
| StandardMember standard_member);
|
| @@ -165,11 +167,8 @@ class AsmTyper final {
|
| // missing_definition_ is set to true for forward definition - i.e., use
|
| // before definition.
|
| bool missing_definition_ = false;
|
| - // source_location_ holds the line number that first referenced this
|
| - // VariableInfo. Used for error messages.
|
| - // TODO(bradnelson): When merged with console change, this should
|
| - // become a source location.
|
| - int source_location_ = -1;
|
| + // Used for error messages.
|
| + MessageLocation source_location_;
|
| };
|
|
|
| // RAII-style manager for the in_function_ member variable.
|
| @@ -397,7 +396,8 @@ class AsmTyper final {
|
| static const int kErrorMessageLimit = 128;
|
| AsmType* fround_type_;
|
| AsmType* ffi_type_;
|
| - char error_message_[kErrorMessageLimit];
|
| + Handle<JSMessageObject> error_message_;
|
| + MessageLocation message_location_;
|
| StdlibSet stdlib_uses_;
|
|
|
| SourceLayoutTracker source_layout_;
|
|
|