OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/wasm/switch-logic.h" | 5 #include "src/asmjs/switch-logic.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace wasm { | 9 namespace wasm { |
10 | 10 |
11 namespace { | 11 namespace { |
12 CaseNode* CreateBst(ZoneVector<CaseNode*>* nodes, size_t begin, size_t end) { | 12 CaseNode* CreateBst(ZoneVector<CaseNode*>* nodes, size_t begin, size_t end) { |
13 if (end < begin) { | 13 if (end < begin) { |
14 return nullptr; | 14 return nullptr; |
15 } else if (end == begin) { | 15 } else if (end == begin) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 nodes.push_back(new (zone) | 54 nodes.push_back(new (zone) |
55 CaseNode(cases->at(curr_pos), cases->at(curr_pos))); | 55 CaseNode(cases->at(curr_pos), cases->at(curr_pos))); |
56 } | 56 } |
57 } | 57 } |
58 } | 58 } |
59 return CreateBst(&nodes, 0, nodes.size() - 1); | 59 return CreateBst(&nodes, 0, nodes.size() - 1); |
60 } | 60 } |
61 } // namespace wasm | 61 } // namespace wasm |
62 } // namespace internal | 62 } // namespace internal |
63 } // namespace v8 | 63 } // namespace v8 |
OLD | NEW |