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

Side by Side Diff: src/signature.h

Issue 2705993002: [wasm] Add JSToWasmWrapperCache to reuse generated wrapper code (Closed)
Patch Set: Fix comment Created 3 years, 10 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/wasm-module.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_SIGNATURE_H_ 5 #ifndef V8_SIGNATURE_H_
6 #define V8_SIGNATURE_H_ 6 #define V8_SIGNATURE_H_
7 7
8 #include "src/zone/zone.h" 8 #include "src/zone/zone.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 14 matching lines...) Expand all
25 T GetParam(size_t index) const { 25 T GetParam(size_t index) const {
26 DCHECK(index < parameter_count_); 26 DCHECK(index < parameter_count_);
27 return reps_[return_count_ + index]; 27 return reps_[return_count_ + index];
28 } 28 }
29 29
30 T GetReturn(size_t index = 0) const { 30 T GetReturn(size_t index = 0) const {
31 DCHECK(index < return_count_); 31 DCHECK(index < return_count_);
32 return reps_[index]; 32 return reps_[index];
33 } 33 }
34 34
35 bool Equals(Signature* that) { 35 bool Equals(const Signature* that) const {
36 if (this == that) return true; 36 if (this == that) return true;
37 if (this->parameter_count() != that->parameter_count()) return false; 37 if (this->parameter_count() != that->parameter_count()) return false;
38 if (this->return_count() != that->return_count()) return false; 38 if (this->return_count() != that->return_count()) return false;
39 size_t size = this->return_count() + this->parameter_count(); 39 size_t size = this->return_count() + this->parameter_count();
40 for (size_t i = 0; i < size; i++) { 40 for (size_t i = 0; i < size; i++) {
41 if (this->reps_[i] != that->reps_[i]) return false; 41 if (this->reps_[i] != that->reps_[i]) return false;
42 } 42 }
43 return true; 43 return true;
44 } 44 }
45 45
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 protected: 82 protected:
83 size_t return_count_; 83 size_t return_count_;
84 size_t parameter_count_; 84 size_t parameter_count_;
85 const T* reps_; 85 const T* reps_;
86 }; 86 };
87 87
88 } // namespace internal 88 } // namespace internal
89 } // namespace v8 89 } // namespace v8
90 90
91 #endif // V8_SIGNATURE_H_ 91 #endif // V8_SIGNATURE_H_
OLDNEW
« no previous file with comments | « no previous file | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698