亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? check.c

?? nVidia開發(fā)的圖形語言 Cg
?? C
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************\
Copyright (c) 2002, NVIDIA Corporation.

NVIDIA Corporation("NVIDIA") supplies this software to you in
consideration of your agreement to the following terms, and your use,
installation, modification or redistribution of this NVIDIA software
constitutes acceptance of these terms.  If you do not agree with these
terms, please do not use, install, modify or redistribute this NVIDIA
software.

In consideration of your agreement to abide by the following terms, and
subject to these terms, NVIDIA grants you a personal, non-exclusive
license, under NVIDIA's copyrights in this original NVIDIA software (the
"NVIDIA Software"), to use, reproduce, modify and redistribute the
NVIDIA Software, with or without modifications, in source and/or binary
forms; provided that if you redistribute the NVIDIA Software, you must
retain the copyright notice of NVIDIA, this notice and the following
text and disclaimers in all such redistributions of the NVIDIA Software.
Neither the name, trademarks, service marks nor logos of NVIDIA
Corporation may be used to endorse or promote products derived from the
NVIDIA Software without specific prior written permission from NVIDIA.
Except as expressly stated in this notice, no other rights or licenses
express or implied, are granted by NVIDIA herein, including but not
limited to any patent rights that may be infringed by your derivative
works or by other works in which the NVIDIA Software may be
incorporated. No hardware is licensed hereunder. 

THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
PRODUCTS.

IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\****************************************************************************/

//
// check.c
//

#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "slglobals.h"
static int CheckFunctionDefinition(Scope *fScope, Symbol *funSymb, int IsProgram);

#define NOT_CHECKED     0
#define BEING_CHECKED   1
#define ALREADY_CHECKED 2

/*
 * CheckSymbolTree()
 *
 */

static int CheckSymbolTree(Scope *fScope, Symbol *fSymb, int IsProgram)
{
    int count = 0;

    if (fSymb) {
        Cg->theHAL->CheckDefinition(&fSymb->loc, fSymb->name, fSymb->type);
        count += CheckSymbolTree(fScope, fSymb->left, IsProgram);
        count += CheckSymbolTree(fScope, fSymb->right, IsProgram);
    }
    return count;
} // CheckSymbolTree

/*
 * CheckParamsAndLocals() - Check this functions format parameters and local variables
 *         for unallowed things.
 */

static int CheckParamsAndLocals(Symbol *funSymb, int IsProgram)
{
    Scope *lScope;
    int count = 0;

    lScope = funSymb->details.fun.locals;
    count += CheckSymbolTree(lScope, lScope->symbols, IsProgram);
    return count;
} // CheckParamsAndLocals

/*
 * BuildProgramReturnAssignments() - Insert a series of assignment statements before each return
 *         statement to set the values of the program's result for these memeners.  (Should only
 *         be applied to the main program.)  Deletes the return statement.
 */

struct BuildReturnAssignments {
    Scope *globalScope;
    Symbol *program;
};

static stmt *BuildProgramReturnAssignments(stmt *fStmt, void *arg1, int arg2)
{
    struct BuildReturnAssignments *lstr;
    Symbol *program, *lSymb, *voutVar, *outSymb, *retSymb;
    Type *lType, *rettype;
    expr *lExpr, *rexpr, *returnVar, *outputVar;
    Scope *lScope, *gScope, *voutScope;
    stmt *lStmt, *stmtlist;
    int category, len, lname;

    if (fStmt->commonst.kind == RETURN_STMT) {
        lstr = (struct BuildReturnAssignments *) arg1;
        gScope = lstr->globalScope;
        program = lstr->program;
        lType = program->type;
        rettype = lType->fun.rettype;
        category = GetCategory(rettype);
        if (IsVoid(rettype)) {
            fStmt = NULL;
        } else {
            if (category == TYPE_CATEGORY_STRUCT) {
                stmtlist = NULL;
                voutVar = Cg->theHAL->varyingOut;
                voutScope = voutVar->type->str.members;
                lScope = rettype->str.members;
                lSymb = lScope->symbols;
                while (lSymb) {
                    // Create an assignment statement of the bound variable to the $vout member:
                    lname = lSymb->details.var.semantics ? lSymb->details.var.semantics : lSymb->name;
                    outSymb = LookUpLocalSymbol(voutScope, lname);
                    retSymb = LookUpLocalSymbol(lScope, lSymb->name);
                    if (outSymb && retSymb) {
                        // outSymb may not be in the symbol table if it's a "hidden" register.
                        returnVar = DupExpr(fStmt->returnst.exp);
                        outputVar = (expr *) NewSymbNode(VARIABLE_OP, voutVar);
                        lExpr = GenMemberReference(outputVar, outSymb);
                        rexpr = GenMemberReference(returnVar, retSymb);
                        if (IsScalar(lSymb->type) || IsVector(lSymb->type, &len)) {
                            lStmt = NewSimpleAssignmentStmt(&program->loc, lExpr, rexpr, 0);
                            stmtlist = ConcatStmts(stmtlist, lStmt);
                        } else {
                            FatalError("Return of unsupported type");
                            // xxx
                        }
                    }
                    lSymb = lSymb->next;
                }
                fStmt = stmtlist;
            } else {
                // Already reported:
                // SemanticError(&program->loc, ERROR_S_PROGRAM_MUST_RETURN_STRUCT,
                //               GetAtomString(atable, program->name));
            }
        }
    }
    return fStmt;
} // BuildProgramReturnAssignments

/*
 * CheckNodeForUndefinedFunctions() - Check an expression nodefor calls to undefined functions.
 *
 */

static expr *CheckNodeForUndefinedFunctions(expr *fExpr, void *arg1, int arg2)
{
    Symbol *lSymb;
    expr *lExpr;
    int *count = (int *) arg1;

    switch (fExpr->common.kind) {
    case DECL_N:
    case SYMB_N:
    case CONST_N:
    case UNARY_N:
        break;
    case BINARY_N:
        if (fExpr->bin.op == FUN_CALL_OP) {
            lExpr = fExpr->bin.left;
            if (lExpr->common.kind == SYMB_N) {
                lSymb = lExpr->sym.symbol;
                if (IsFunction(lSymb)) {
                    if (!(lSymb->properties & SYMB_IS_DEFINED)) {
                        SemanticError(Cg->pLastSourceLoc, ERROR_S_CALL_UNDEF_FUN,
                                      GetAtomString(atable, lSymb->name));
                        count++;
                    } else {
                        if (lSymb->flags == BEING_CHECKED) {
                            SemanticError(Cg->pLastSourceLoc, ERROR_S_RECURSION,
                                          GetAtomString(atable, lSymb->name));
                            count++;
                        } else {
                            CheckFunctionDefinition(NULL, lSymb, 0);
                        }
                    }
                }
            }
        }
        break;
    case TRINARY_N:
        break;
    default:
        assert(!"bad kind to CheckNodeForUndefinedFunctions()");
        break;
    }
    return fExpr;
} // CheckNodeForUndefinedFunctions

/*
 * CheckExpressionForUndefinedFunctions() - Check an expression for calls to undefined functions.
 *
 */

static expr *CheckExpressionForUndefinedFunctions(expr *fExpr, void *arg1, int arg2)
{
    PostApplyToNodes(CheckNodeForUndefinedFunctions, fExpr, arg1, arg2);
    return fExpr;
} // CheckExpressionForUndefinedFunctions

/*
 * CheckNodeForUnsupportedOperators() - Check a node for operators not supported
 *         in the target profile.
 */

static expr *CheckNodeForUnsupportedOperators(expr *fExpr, void *arg1, int arg2)
{
    int *count = (int *) arg1;

    switch (fExpr->common.kind) {
    case DECL_N:
    case SYMB_N:
    case CONST_N:
        break;
    case UNARY_N:
        if (!Cg->theHAL->IsValidOperator(Cg->pLastSourceLoc, opcode_atom[fExpr->un.op], fExpr->un.op,
                                         fExpr->un.subop))
        {
            *count++;
        }
        break;
    case BINARY_N:
        if (!Cg->theHAL->IsValidOperator(Cg->pLastSourceLoc, opcode_atom[fExpr->bin.op], fExpr->bin.op,
                                         fExpr->bin.subop))
        {
            *count++;
        }
        break;
    case TRINARY_N:
        if (!Cg->theHAL->IsValidOperator(Cg->pLastSourceLoc, opcode_atom[fExpr->tri.op], fExpr->tri.op,
                                         fExpr->tri.subop))
        {
            *count++;
        }
        break;
    default:
        assert(!"bad kind to CheckNodeForUnsupportedOperators()");
        break;
    }
    return fExpr;
} // CheckNodeForUnsupportedOperators

/*
 * CheckForUnsupportedVariables() - Check for references to object that are not supported
 *         by the target profile.
 */

static expr *CheckForUnsupportedVariables(expr *fExpr, void *arg1, int arg2)
{
    int *count = (int *) arg1;

    switch (fExpr->common.kind) {
    case SYMB_N:
        if (fExpr->sym.op == VARIABLE_OP) {
            ///lSymb = fExpr->sym.symbol;
        }
        break;
    case DECL_N:
    case CONST_N:
    case UNARY_N:
    case BINARY_N:
    case TRINARY_N:
        break;
    default:
        assert(!"bad kind to CheckForUnsupportedVariables()");
        break;
    }
    return fExpr;
} // CheckForUnsupportedVariables

/*
 * CheckForGlobalUniformReferences() - Check for references to previously unreferenced non-static
 *         uniform global variables.  These must have explicit or implied semantics.  Add them to
 *         to the $uniform connector and insert an initialization statement at the start of main.
 */

static expr *CheckForGlobalUniformReferences(expr *fExpr, void *arg1, int arg2)
{
    int category, domain, qualifiers;
    Symbol *lSymb;
    Type *lType;
    int gname;

    switch (fExpr->common.kind) {
    case SYMB_N:
        if (fExpr->sym.op == VARIABLE_OP) {
            lSymb = fExpr->sym.symbol;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲精品在线观看| 一区二区三区日韩欧美精品 | 欧美aaa在线| 春色校园综合激情亚洲| 8v天堂国产在线一区二区| 国产精品你懂的在线欣赏| 日韩二区三区四区| 色94色欧美sute亚洲13| 中文在线免费一区三区高中清不卡| 婷婷成人激情在线网| 97久久超碰国产精品电影| 久久精品视频免费观看| 麻豆精品一区二区av白丝在线| 欧美性色aⅴ视频一区日韩精品| 国产精品美女一区二区| 国产一本一道久久香蕉| 欧美成人女星排名| 蜜桃一区二区三区在线| 91麻豆精品国产91久久久久| 亚洲综合图片区| 91免费在线视频观看| 国产丝袜在线精品| 狠狠色伊人亚洲综合成人| 欧美一区二区三区色| 午夜久久电影网| 欧美综合一区二区三区| 中文字幕综合网| 99久精品国产| 成人免费小视频| 91网址在线看| 亚洲一区二区3| 欧美日韩一区二区在线视频| 一卡二卡欧美日韩| 欧美视频一区二区三区四区| 亚洲国产日韩一级| 欧美精品久久天天躁| 日本视频中文字幕一区二区三区| 欧美女孩性生活视频| 日韩精品欧美精品| 日韩午夜av电影| 免费成人在线播放| 久久夜色精品国产欧美乱极品| 国产在线精品一区二区夜色| 精品福利视频一区二区三区| 韩国三级在线一区| 国产精品嫩草影院com| 91麻豆蜜桃一区二区三区| 玉足女爽爽91| 日韩一区二区三区三四区视频在线观看 | 国产精品免费视频观看| 不卡电影一区二区三区| 一区二区三区四区在线| 欧美日韩国产免费一区二区 | 欧美高清一级片在线| 蜜桃视频在线观看一区二区| 久久亚洲一区二区三区四区| 成人免费观看男女羞羞视频| 亚洲精品国久久99热| 欧美一区二区视频在线观看| 国产精品综合二区| 亚洲色图在线看| 欧美丰满少妇xxxbbb| 国产精品18久久久久| 日韩理论片在线| 日韩欧美一卡二卡| kk眼镜猥琐国模调教系列一区二区 | 精品日韩99亚洲| 成人激情av网| 石原莉奈在线亚洲二区| 国产亚洲成av人在线观看导航| 色婷婷综合久久久中文一区二区| 秋霞午夜av一区二区三区| 国产午夜精品福利| 欧美久久婷婷综合色| 成人在线综合网| 日本亚洲免费观看| 亚洲婷婷国产精品电影人久久| 日韩欧美久久久| 91视频精品在这里| 精品一区二区三区免费播放 | 美女被吸乳得到大胸91| 亚洲女人****多毛耸耸8| 91精品国产色综合久久| 91伊人久久大香线蕉| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲高清免费在线| 亚洲欧洲国产日韩| 久久亚洲捆绑美女| 91麻豆精品国产91久久久久久 | 亚洲男人天堂一区| 精品日本一线二线三线不卡| 精品视频在线看| 91网址在线看| 成人免费的视频| 国产高清不卡一区| 理论片日本一区| 天天操天天干天天综合网| 最新高清无码专区| 国产精品入口麻豆原神| 久久夜色精品一区| 精品动漫一区二区三区在线观看| 在线欧美日韩精品| 91久久精品一区二区三区| heyzo一本久久综合| 国产精品一区二区久激情瑜伽| 美女任你摸久久| 麻豆91在线播放免费| 婷婷成人综合网| 亚洲成人自拍网| 亚洲国产精品久久久久秋霞影院 | 91精品福利视频| 99re热这里只有精品免费视频 | 国产精品丝袜一区| 中文字幕乱码亚洲精品一区 | 日韩精品中文字幕一区| 欧美一级黄色录像| 欧美一区二区三区视频在线| 欧美一区二区国产| 日韩欧美亚洲另类制服综合在线| 欧美一区二区三区婷婷月色| 欧美一区二区久久| 精品理论电影在线观看 | 国产在线国偷精品免费看| 激情丁香综合五月| 国产在线一区二区综合免费视频| 国产乱码字幕精品高清av| 国产精品一区二区三区四区| 国产成人av电影在线| 成人app下载| 欧美片在线播放| 日韩免费电影一区| 久久久久久久久蜜桃| 中文字幕在线不卡一区 | 欧美国产视频在线| 最新日韩在线视频| 亚洲自拍偷拍网站| 日韩1区2区日韩1区2区| 韩国女主播一区| 成人网男人的天堂| 欧美在线综合视频| 欧美一级生活片| 亚洲一级二级三级| 日韩精品每日更新| 成人网在线免费视频| 欧美日韩视频在线观看一区二区三区| 91精品国产综合久久香蕉麻豆| 亚洲精品在线三区| 亚洲少妇中出一区| 免费xxxx性欧美18vr| 国产成人丝袜美腿| 欧美日韩中文一区| 国产亚洲短视频| 午夜欧美大尺度福利影院在线看| 激情六月婷婷久久| 欧美视频在线一区| 国产午夜精品一区二区| 亚洲高清免费视频| 国产精品一区二区在线播放 | 国产成人av资源| 在线视频国内自拍亚洲视频| 337p日本欧洲亚洲大胆色噜噜| 亚洲日穴在线视频| 激情欧美一区二区| 欧美午夜精品一区| 国产精品久久久久aaaa樱花| 日本vs亚洲vs韩国一区三区 | 国产91在线看| 欧美精三区欧美精三区| 中文字幕av不卡| 久久精品国产久精国产| 色天天综合色天天久久| 久久久.com| 麻豆精品一区二区综合av| 欧美性大战久久久久久久| 国产精品美女久久久久久久网站| 日本强好片久久久久久aaa| 不卡大黄网站免费看| 久久综合色鬼综合色| 天堂蜜桃一区二区三区| 91成人网在线| 亚洲天堂中文字幕| 成人av中文字幕| 国产亚洲成av人在线观看导航 | 亚洲线精品一区二区三区八戒| 国产成人精品综合在线观看| 精品久久久网站| 免费看欧美女人艹b| 欧美片在线播放| 婷婷一区二区三区| 欧美中文字幕一区二区三区 | 国产精品美女久久久久av爽李琼 | 日韩精品一区二区三区在线| 亚洲国产视频一区| 欧美亚洲国产一卡| 一区二区三区国产精华| 色综合激情五月| 夜夜爽夜夜爽精品视频| 欧亚一区二区三区| 偷窥少妇高潮呻吟av久久免费| 欧美日韩在线电影|