LIR-x64.h (1011B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: set ts=8 sts=2 et sw=2 tw=80: 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef jit_x64_LIR_x64_h 8 #define jit_x64_LIR_x64_h 9 10 namespace js { 11 namespace jit { 12 13 // Given an untyped input, guards on whether it's a specific type and returns 14 // the unboxed payload. 15 class LUnbox : public LInstructionHelper<1, BOX_PIECES, 0> { 16 public: 17 LIR_HEADER(Unbox) 18 19 explicit LUnbox(const LAllocation& input) : LInstructionHelper(classOpcode) { 20 setOperand(0, input); 21 } 22 23 static const size_t Input = 0; 24 25 LBoxAllocation input() const { return getBoxOperand(Input); } 26 27 MUnbox* mir() const { return mir_->toUnbox(); } 28 const char* extraName() const { return StringFromMIRType(mir()->type()); } 29 }; 30 31 } // namespace jit 32 } // namespace js 33 34 #endif /* jit_x64_LIR_x64_h */