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

Side by Side Diff: src/wasm/decoder.h

Issue 1783593002: [wasm] Encode function signatures, bodies, and names as separate sections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added unittests Created 4 years, 9 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.cc » ('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/smart-pointers.h" 8 #include "src/base/smart-pointers.h"
9 #include "src/flags.h" 9 #include "src/flags.h"
10 #include "src/signature.h" 10 #include "src/signature.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 error_pt_ = nullptr; 326 error_pt_ = nullptr;
327 error_msg_.Reset(nullptr); 327 error_msg_.Reset(nullptr);
328 } 328 }
329 329
330 bool ok() const { return error_pc_ == nullptr; } 330 bool ok() const { return error_pc_ == nullptr; }
331 bool failed() const { return error_pc_ != nullptr; } 331 bool failed() const { return error_pc_ != nullptr; }
332 bool more() const { return pc_ < limit_; } 332 bool more() const { return pc_ < limit_; }
333 333
334 const byte* start() { return start_; } 334 const byte* start() { return start_; }
335 const byte* pc() { return pc_; } 335 const byte* pc() { return pc_; }
336 uint32_t pc_offset() { return static_cast<uint32_t>(pc_ - start_); }
336 337
337 protected: 338 protected:
338 const byte* start_; 339 const byte* start_;
339 const byte* pc_; 340 const byte* pc_;
340 const byte* limit_; 341 const byte* limit_;
341 const byte* end_; 342 const byte* end_;
342 const byte* error_pc_; 343 const byte* error_pc_;
343 const byte* error_pt_; 344 const byte* error_pt_;
344 base::SmartArrayPointer<char> error_msg_; 345 base::SmartArrayPointer<char> error_msg_;
345 346
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 return result; 398 return result;
398 } 399 }
399 }; 400 };
400 401
401 #undef TRACE 402 #undef TRACE
402 } // namespace wasm 403 } // namespace wasm
403 } // namespace internal 404 } // namespace internal
404 } // namespace v8 405 } // namespace v8
405 406
406 #endif // V8_WASM_DECODER_H_ 407 #endif // V8_WASM_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698