From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 3D76064ED09; Thu, 9 Nov 2023 16:08:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3D76064ED09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1699535310; bh=Rv5ZfXOBCxUYSEVPhudK4BFnCqjSOHUuCgTTbCwBeeg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=iSbS7ZHJ/V7gh3fPVFyTdI1t5iOdkFyAjkzGDO7xzAQjwiqeIOgdx0PGPqguug8DP 0GRCe9rpnyxx4Qyb2LNmlV6GKVjg+e63WbWIzIyx3adm+twD9WJOLQ2r5Q1gNPUIkv +a3lIRltSF1aqUo64A1PavqCQD4956bpJStQyHOA= Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A36A4404481 for ; Thu, 9 Nov 2023 16:08:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A36A4404481 Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-9dbb3e0ff65so135453866b.1 for ; Thu, 09 Nov 2023 05:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699535308; x=1700140108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=drv1p3JwP1qUQZR0bDdr+UaPoXx3WBXEeA2v8iO4mh8=; b=Tlsze9J0OH7fgUpU5F5WSXR2gd0wzXtNwERcYBUjaCjzqL2thYQdOY/+1Zo+kqVuud o7HN3Md87TtMv20zlfcCfIc6HWuxZdcNHzYa2PIPWNyx7qNWbr+zzt9u3jdejePwpEXI wptVxasUceqTgh+09JBnN8CeR9gFYL0LVXWDyUfjzPUlB0CyKwpre9u2gqXcpmFccmbO 960tsXpusA8lumbwaR5nOZK8t5IVWdJRSaJp1c/lK0doZcwOfZvwMRYfp0qBV/SCUTju ox8Kbz7V4wpDw5n4V+g5r/LV/HfQDfN3KQDBREdyqDW/+0QSOClnwYmdDL41MVKL1C4m 0n8g== X-Gm-Message-State: AOJu0YziFs3MMy3jG38b/jnqOS2oKjyMm83iSbOetVVeR47yMbmgUW5L Q2OoEI2YALBims4ZSNiC8b1g+1QH2IY= X-Google-Smtp-Source: AGHT+IEHa5NMLuQAsuFoVXjifxgPyImYMpr0OCwgVvbXPH40K/VQ22n7Fv5LWjUOmyXtSjWwIcySPg== X-Received: by 2002:a17:907:9496:b0:9be:71ab:fb5e with SMTP id dm22-20020a170907949600b009be71abfb5emr4192918ejc.22.1699535308315; Thu, 09 Nov 2023 05:08:28 -0800 (PST) Received: from pony.. ([185.6.247.97]) by smtp.gmail.com with ESMTPSA id u22-20020a17090617d600b009dd8473559dsm2500929eje.110.2023.11.09.05.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 05:08:27 -0800 (PST) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com Date: Thu, 9 Nov 2023 16:08:11 +0300 Message-Id: <350137386d2ce8f959cfe452e1355998fded73dd.1699534835.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 1/3][v2] Add 'cc' file type for saving bytecode. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Mike Pall Contributed by Sergey Bronnikov. #1105 (cherry picked from commit e826d0c101d750fac8334d71e221c50d8dbe236c) The patch adds a file type `cc` that allows exporting byte code directly to a file with extension `.cc`. Sergey Bronnikov: * added the description Part of tarantool/tarantool#9145 --- doc/running.html | 3 ++- src/jit/bcsave.lua | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/running.html b/doc/running.html index 666b0abc..7868efab 100644 --- a/doc/running.html +++ b/doc/running.html @@ -124,7 +124,8 @@ file name:

  • c — C source file, exported bytecode data.
  • -
  • h — C header file, static bytecode data.
  • +
  • cc — C++ source file, exported bytecode data.
  • +
  • h — C/C++ header file, static bytecode data.
  • obj or o — Object file, exported bytecode data (OS- and architecture-specific).
  • raw or any other extension — Raw bytecode file (portable). diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua index 41081184..48b2329c 100644 --- a/src/jit/bcsave.lua +++ b/src/jit/bcsave.lua @@ -37,7 +37,7 @@ Save LuaJIT bytecode: luajit -b[options] input output -- Stop handling options. - Use stdin as input and/or stdout as output. -File types: c h obj o raw (default) +File types: c cc h obj o raw (default) ]] os.exit(1) end @@ -63,7 +63,7 @@ end ------------------------------------------------------------------------------ local map_type = { - raw = "raw", c = "c", h = "h", o = "obj", obj = "obj", + raw = "raw", c = "c", cc = "c", h = "h", o = "obj", obj = "obj", } local map_arch = { -- 2.34.1