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

Side by Side Diff: src/wasm/decoder.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 | « no previous file | src/wasm/module-decoder.h » ('j') | 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_DECODER_H_ 5 #ifndef V8_WASM_DECODER_H_
6 #define V8_WASM_DECODER_H_ 6 #define V8_WASM_DECODER_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 #include "src/flags.h" 10 #include "src/flags.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 TRACE("Result error: %s\n", error_msg_.get()); 309 TRACE("Result error: %s\n", error_msg_.get());
310 result.error_code = kError; 310 result.error_code = kError;
311 result.start = start_; 311 result.start = start_;
312 result.error_pc = error_pc_; 312 result.error_pc = error_pc_;
313 result.error_pt = error_pt_; 313 result.error_pt = error_pt_;
314 // transfer ownership of the error to the result. 314 // transfer ownership of the error to the result.
315 result.error_msg.Reset(error_msg_.Detach()); 315 result.error_msg.Reset(error_msg_.Detach());
316 } else { 316 } else {
317 result.error_code = kSuccess; 317 result.error_code = kSuccess;
318 } 318 }
319 result.val = val; 319 result.val = std::move(val);
320 return result; 320 return result;
321 } 321 }
322 322
323 // Resets the boundaries of this decoder. 323 // Resets the boundaries of this decoder.
324 void Reset(const byte* start, const byte* end) { 324 void Reset(const byte* start, const byte* end) {
325 start_ = start; 325 start_ = start;
326 pc_ = start; 326 pc_ = start;
327 limit_ = end; 327 limit_ = end;
328 end_ = end; 328 end_ = end;
329 error_pc_ = nullptr; 329 error_pc_ = nullptr;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 return result; 402 return result;
403 } 403 }
404 }; 404 };
405 405
406 #undef TRACE 406 #undef TRACE
407 } // namespace wasm 407 } // namespace wasm
408 } // namespace internal 408 } // namespace internal
409 } // namespace v8 409 } // namespace v8
410 410
411 #endif // V8_WASM_DECODER_H_ 411 #endif // V8_WASM_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | src/wasm/module-decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698