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> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "src/objects-inl.h" | 22 #include "src/objects-inl.h" |
23 #include "src/utils.h" | 23 #include "src/utils.h" |
24 #include "src/vector.h" | 24 #include "src/vector.h" |
25 | 25 |
26 #define FAIL_LOCATION_RAW(location, msg) \ | 26 #define FAIL_LOCATION_RAW(location, msg) \ |
27 do { \ | 27 do { \ |
28 Handle<String> message( \ | 28 Handle<String> message( \ |
29 isolate_->factory()->InternalizeOneByteString(msg)); \ | 29 isolate_->factory()->InternalizeOneByteString(msg)); \ |
30 error_message_ = MessageHandler::MakeMessageObject( \ | 30 error_message_ = MessageHandler::MakeMessageObject( \ |
31 isolate_, MessageTemplate::kAsmJsInvalid, (location), message, \ | 31 isolate_, MessageTemplate::kAsmJsInvalid, (location), message, \ |
32 Handle<JSArray>::null()); \ | 32 Handle<FixedArray>::null()); \ |
33 error_message_->set_error_level(v8::Isolate::kMessageWarning); \ | 33 error_message_->set_error_level(v8::Isolate::kMessageWarning); \ |
34 message_location_ = *(location); \ | 34 message_location_ = *(location); \ |
35 return AsmType::None(); \ | 35 return AsmType::None(); \ |
36 } while (false) | 36 } while (false) |
37 | 37 |
38 #define FAIL_RAW(node, msg) \ | 38 #define FAIL_RAW(node, msg) \ |
39 do { \ | 39 do { \ |
40 MessageLocation location(script_, node->position(), node->position()); \ | 40 MessageLocation location(script_, node->position(), node->position()); \ |
41 FAIL_LOCATION_RAW(&location, msg); \ | 41 FAIL_LOCATION_RAW(&location, msg); \ |
42 } while (false) | 42 } while (false) |
(...skipping 2911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2954 "Heap view creation parameter should be the module's heap parameter."); | 2954 "Heap view creation parameter should be the module's heap parameter."); |
2955 } | 2955 } |
2956 | 2956 |
2957 DCHECK(heap_view_info->type()->IsA(AsmType::Heap())); | 2957 DCHECK(heap_view_info->type()->IsA(AsmType::Heap())); |
2958 return heap_view_info->type(); | 2958 return heap_view_info->type(); |
2959 } | 2959 } |
2960 | 2960 |
2961 } // namespace wasm | 2961 } // namespace wasm |
2962 } // namespace internal | 2962 } // namespace internal |
2963 } // namespace v8 | 2963 } // namespace v8 |
OLD | NEW |