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

Unified Diff: src/signature.h

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)
Patch Set: [wasm] Use a Managed<WasmModule> to hold metadata about modules. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | src/snapshot/code-serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/signature.h
diff --git a/src/signature.h b/src/signature.h
index 97238b6749fbb82a05562a9c5ea2f30a97115db7..32050fe4b0178476d296672ba8fe8dee6dd41a52 100644
--- a/src/signature.h
+++ b/src/signature.h
@@ -32,7 +32,16 @@ class Signature : public ZoneObject {
return reps_[index];
}
- const T* raw_data() const { return reps_; }
+ bool Equals(Signature* that) {
+ if (this == that) return true;
+ if (this->parameter_count() != that->parameter_count()) return false;
+ if (this->return_count() != that->return_count()) return false;
+ size_t size = this->return_count() + this->parameter_count();
+ for (size_t i = 0; i < size; i++) {
+ if (this->reps_[i] != that->reps_[i]) return false;
+ }
+ return true;
+ }
// For incrementally building signatures.
class Builder {
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | src/snapshot/code-serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698