| OLD | NEW |
| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 pc_ = start; | 320 pc_ = start; |
| 321 limit_ = end; | 321 limit_ = end; |
| 322 end_ = end; | 322 end_ = end; |
| 323 error_pc_ = nullptr; | 323 error_pc_ = nullptr; |
| 324 error_pt_ = nullptr; | 324 error_pt_ = nullptr; |
| 325 error_msg_.Reset(nullptr); | 325 error_msg_.Reset(nullptr); |
| 326 } | 326 } |
| 327 | 327 |
| 328 bool ok() const { return error_pc_ == nullptr; } | 328 bool ok() const { return error_pc_ == nullptr; } |
| 329 bool failed() const { return error_pc_ != nullptr; } | 329 bool failed() const { return error_pc_ != nullptr; } |
| 330 bool more() const { return pc_ < limit_; } |
| 330 | 331 |
| 331 const byte* start() { return start_; } | 332 const byte* start() { return start_; } |
| 332 const byte* pc() { return pc_; } | 333 const byte* pc() { return pc_; } |
| 333 | 334 |
| 334 protected: | 335 protected: |
| 335 const byte* start_; | 336 const byte* start_; |
| 336 const byte* pc_; | 337 const byte* pc_; |
| 337 const byte* limit_; | 338 const byte* limit_; |
| 338 const byte* end_; | 339 const byte* end_; |
| 339 const byte* error_pc_; | 340 const byte* error_pc_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 return result; | 395 return result; |
| 395 } | 396 } |
| 396 }; | 397 }; |
| 397 | 398 |
| 398 #undef TRACE | 399 #undef TRACE |
| 399 } // namespace wasm | 400 } // namespace wasm |
| 400 } // namespace internal | 401 } // namespace internal |
| 401 } // namespace v8 | 402 } // namespace v8 |
| 402 | 403 |
| 403 #endif // V8_WASM_DECODER_H_ | 404 #endif // V8_WASM_DECODER_H_ |
| OLD | NEW |