Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: src/wasm/wasm-result.h

Issue 2055783002: [wasm] Add functionality to decode a function offset table (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@print-ast-to-ostream
Patch Set: fix nit Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_WASM_RESULT_H_ 5 #ifndef V8_WASM_RESULT_H_
6 #define V8_WASM_RESULT_H_ 6 #define V8_WASM_RESULT_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/smart-pointers.h" 9 #include "src/base/smart-pointers.h"
10 10
(...skipping 20 matching lines...) Expand all
31 kTypeError, // type mismatch 31 kTypeError, // type mismatch
32 kInvalidLocalIndex, // invalid local 32 kInvalidLocalIndex, // invalid local
33 kInvalidGlobalIndex, // invalid global 33 kInvalidGlobalIndex, // invalid global
34 kInvalidFunctionIndex, // invalid function 34 kInvalidFunctionIndex, // invalid function
35 kInvalidMemType // invalid memory type 35 kInvalidMemType // invalid memory type
36 }; 36 };
37 37
38 // The overall result of decoding a function or a module. 38 // The overall result of decoding a function or a module.
39 template <typename T> 39 template <typename T>
40 struct Result { 40 struct Result {
41 Result() 41 Result() : val(), error_code(kSuccess), start(nullptr), error_pc(nullptr) {
42 : val(nullptr), error_code(kSuccess), start(nullptr), error_pc(nullptr) {
43 error_msg.Reset(nullptr); 42 error_msg.Reset(nullptr);
44 } 43 }
45 44
46 T val; 45 T val;
47 ErrorCode error_code; 46 ErrorCode error_code;
48 const byte* start; 47 const byte* start;
49 const byte* error_pc; 48 const byte* error_pc;
50 const byte* error_pt; 49 const byte* error_pt;
51 base::SmartArrayPointer<char> error_msg; 50 base::SmartArrayPointer<char> error_msg;
52 51
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 private: 107 private:
109 Isolate* isolate_; 108 Isolate* isolate_;
110 const char* context_; 109 const char* context_;
111 bool error_; 110 bool error_;
112 }; 111 };
113 } // namespace wasm 112 } // namespace wasm
114 } // namespace internal 113 } // namespace internal
115 } // namespace v8 114 } // namespace v8
116 115
117 #endif 116 #endif
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698