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

Side by Side Diff: src/wasm/ast-decoder.cc

Issue 1573053003: [wasm] Fix set_local appearing in unreachable code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | test/cctest/wasm/test-run-wasm.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 #include "src/base/platform/elapsed-timer.h" 5 #include "src/base/platform/elapsed-timer.h"
6 #include "src/signature.h" 6 #include "src/signature.h"
7 7
8 #include "src/flags.h" 8 #include "src/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 ssa_env_->Kill(SsaEnv::kControlEnd); 896 ssa_env_->Kill(SsaEnv::kControlEnd);
897 } 897 }
898 break; 898 break;
899 } 899 }
900 case kExprSetLocal: { 900 case kExprSetLocal: {
901 int unused = 0; 901 int unused = 0;
902 uint32_t index; 902 uint32_t index;
903 LocalType type = LocalOperand(p->pc(), &index, &unused); 903 LocalType type = LocalOperand(p->pc(), &index, &unused);
904 Tree* val = p->last(); 904 Tree* val = p->last();
905 if (type == val->type) { 905 if (type == val->type) {
906 if (builder_) ssa_env_->locals[index] = val->node; 906 if (build()) ssa_env_->locals[index] = val->node;
907 p->tree->node = val->node; 907 p->tree->node = val->node;
908 } else { 908 } else {
909 error(p->pc(), val->pc, "Typecheck failed in SetLocal"); 909 error(p->pc(), val->pc, "Typecheck failed in SetLocal");
910 } 910 }
911 break; 911 break;
912 } 912 }
913 case kExprStoreGlobal: { 913 case kExprStoreGlobal: {
914 int unused = 0; 914 int unused = 0;
915 uint32_t index; 915 uint32_t index;
916 LocalType type = GlobalOperand(p->pc(), &index, &unused); 916 LocalType type = GlobalOperand(p->pc(), &index, &unused);
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 FOREACH_MISC_MEM_OPCODE(DECLARE_OPCODE_CASE) 1574 FOREACH_MISC_MEM_OPCODE(DECLARE_OPCODE_CASE)
1575 FOREACH_SIMPLE_OPCODE(DECLARE_OPCODE_CASE) 1575 FOREACH_SIMPLE_OPCODE(DECLARE_OPCODE_CASE)
1576 #undef DECLARE_OPCODE_CASE 1576 #undef DECLARE_OPCODE_CASE
1577 } 1577 }
1578 UNREACHABLE(); 1578 UNREACHABLE();
1579 return 0; 1579 return 0;
1580 } 1580 }
1581 } // namespace wasm 1581 } // namespace wasm
1582 } // namespace internal 1582 } // namespace internal
1583 } // namespace v8 1583 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698