Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/lib/publicsuffixlist/wasm/publicsuffixlist.wasm
Binary file not shown.
19 changes: 12 additions & 7 deletions src/lib/publicsuffixlist/wasm/publicsuffixlist.wat
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@
;; + u32: offset to array of children
;; = 12 bytes
;;
;; // i32 / i8
;; const HOSTNAME_SLOT = 0; // jshint ignore:line
;; const LABEL_INDICES_SLOT = 256; // -- / 256
;; const RULES_PTR_SLOT = 100; // 100 / 400
;; const CHARDATA_PTR_SLOT = 101; // 101 / 404
;; const EMPTY_STRING = '';
;; const SELFIE_MAGIC = 2;
;; // i32 / i8
;; const HOSTNAME_SLOT = 0; // jshint ignore:line
;; const LABEL_INDICES_SLOT = 256; // -- / 256
;; const RULES_PTR_SLOT = 100; // 100 / 400
;; const SUFFIX_NOT_FOUND_SLOT = 399; // -- / 399
;; const CHARDATA_PTR_SLOT = 101; // 101 / 404
;; const EMPTY_STRING = '';
;; const SELFIE_MAGIC = 2;
;;

;;
Expand Down Expand Up @@ -247,6 +248,7 @@
;; // 2. If no rules match, the prevailing rule is "*".
;; if ( iFound === 0 ) {
;; if ( buf8[iCandidates + 1 << 2] !== 0x2A /* '*' */ ) { break; }
;; buf8[SUFFIX_NOT_FOUND_SLOT] = 1;
;; iFound = iCandidates;
;; }
get_local $iFound
Expand All @@ -257,6 +259,9 @@
i32.const 0x2A
i32.ne
br_if $labelLookupDone
i32.const 399
i32.const 1
i32.store8
get_local $iCandidates
set_local $iFound
end
Expand Down