Home | History | Annotate | Download | only in asmjs
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef V8_WASM_SWITCH_LOGIC_H
      6 #define V8_WASM_SWITCH_LOGIC_H
      7 
      8 #include "src/globals.h"
      9 #include "src/zone/zone-containers.h"
     10 #include "src/zone/zone.h"
     11 
     12 namespace v8 {
     13 namespace internal {
     14 namespace wasm {
     15 
     16 struct CaseNode : public ZoneObject {
     17   const int begin;
     18   const int end;
     19   CaseNode* left;
     20   CaseNode* right;
     21   CaseNode(int begin, int end) : begin(begin), end(end) {
     22     left = nullptr;
     23     right = nullptr;
     24   }
     25 };
     26 
     27 V8_EXPORT_PRIVATE CaseNode* OrderCases(ZoneVector<int>* cases, Zone* zone);
     28 }  // namespace wasm
     29 }  // namespace internal
     30 }  // namespace v8
     31 
     32 #endif
     33