OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/asmjs/asm-typer.h" | 5 #include "src/asmjs/asm-typer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "src/v8.h" | 12 #include "src/v8.h" |
13 | 13 |
14 #include "src/asmjs/asm-types.h" | 14 #include "src/asmjs/asm-types.h" |
15 #include "src/ast/ast.h" | 15 #include "src/ast/ast.h" |
16 #include "src/ast/scopes.h" | 16 #include "src/ast/scopes.h" |
17 #include "src/base/bits.h" | 17 #include "src/base/bits.h" |
18 #include "src/codegen.h" | 18 #include "src/codegen.h" |
19 #include "src/globals.h" | 19 #include "src/globals.h" |
20 #include "src/type-cache.h" | |
21 #include "src/utils.h" | 20 #include "src/utils.h" |
22 | 21 |
23 #define FAIL(node, msg) \ | 22 #define FAIL(node, msg) \ |
24 do { \ | 23 do { \ |
25 int line = node->position() == kNoSourcePosition \ | 24 int line = node->position() == kNoSourcePosition \ |
26 ? -1 \ | 25 ? -1 \ |
27 : script_->GetLineNumber(node->position()); \ | 26 : script_->GetLineNumber(node->position()); \ |
28 base::OS::SNPrintF(error_message_, sizeof(error_message_), \ | 27 base::OS::SNPrintF(error_message_, sizeof(error_message_), \ |
29 "asm: line %d: %s\n", line + 1, msg); \ | 28 "asm: line %d: %s\n", line + 1, msg); \ |
30 return AsmType::None(); \ | 29 return AsmType::None(); \ |
(...skipping 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 return true; | 2763 return true; |
2765 } | 2764 } |
2766 | 2765 |
2767 *error_message = typer.error_message(); | 2766 *error_message = typer.error_message(); |
2768 return false; | 2767 return false; |
2769 } | 2768 } |
2770 | 2769 |
2771 } // namespace wasm | 2770 } // namespace wasm |
2772 } // namespace internal | 2771 } // namespace internal |
2773 } // namespace v8 | 2772 } // namespace v8 |
OLD | NEW |