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

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

Issue 1763433002: [wasm] Rework encoding of local declarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 pc_ = start; 314 pc_ = start;
315 limit_ = end; 315 limit_ = end;
316 end_ = end; 316 end_ = end;
317 error_pc_ = nullptr; 317 error_pc_ = nullptr;
318 error_pt_ = nullptr; 318 error_pt_ = nullptr;
319 error_msg_.Reset(nullptr); 319 error_msg_.Reset(nullptr);
320 } 320 }
321 321
322 bool ok() const { return error_pc_ == nullptr; } 322 bool ok() const { return error_pc_ == nullptr; }
323 bool failed() const { return error_pc_ != nullptr; } 323 bool failed() const { return error_pc_ != nullptr; }
324 bool more() const { return pc_ < limit_; }
324 325
325 const byte* start() { return start_; } 326 const byte* start() { return start_; }
326 const byte* pc() { return pc_; } 327 const byte* pc() { return pc_; }
327 328
328 protected: 329 protected:
329 const byte* start_; 330 const byte* start_;
330 const byte* pc_; 331 const byte* pc_;
331 const byte* limit_; 332 const byte* limit_;
332 const byte* end_; 333 const byte* end_;
333 const byte* error_pc_; 334 const byte* error_pc_;
334 const byte* error_pt_; 335 const byte* error_pt_;
335 base::SmartArrayPointer<char> error_msg_; 336 base::SmartArrayPointer<char> error_msg_;
336 }; 337 };
337 338
338 #undef TRACE 339 #undef TRACE
339 } // namespace wasm 340 } // namespace wasm
340 } // namespace internal 341 } // namespace internal
341 } // namespace v8 342 } // namespace v8
342 343
343 #endif // V8_WASM_DECODER_H_ 344 #endif // V8_WASM_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698