Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 42:0b9b286b67b6

Show
Ignore:
Timestamp:
10/19/07 09:16:11 (1 year ago)
Author:
lindquist
branch:
trunk
Message:

[svn r46] fix for shift operations
added a simple opengl binding in demos

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • demos/sdl.d

    r38 r42  
    11module sdl; 
    22 
    3 version(build) 
    4     pragma(link,"SDL"); 
     3version(build) pragma(link,"SDL"); 
    54 
    65extern(C): 
     
    4443    SDL_FULLSCREEN=0x80000000 
    4544} 
     45enum { 
     46    SDL_GL_RED_SIZE, 
     47    SDL_GL_GREEN_SIZE, 
     48    SDL_GL_BLUE_SIZE, 
     49    SDL_GL_ALPHA_SIZE, 
     50    SDL_GL_BUFFER_SIZE, 
     51    SDL_GL_DOUBLEBUFFER, 
     52    SDL_GL_DEPTH_SIZE, 
     53    SDL_GL_STENCIL_SIZE, 
     54    SDL_GL_ACCUM_RED_SIZE, 
     55    SDL_GL_ACCUM_GREEN_SIZE, 
     56    SDL_GL_ACCUM_BLUE_SIZE, 
     57    SDL_GL_ACCUM_ALPHA_SIZE, 
     58    SDL_GL_STEREO, 
     59    SDL_GL_MULTISAMPLEBUFFERS, 
     60    SDL_GL_MULTISAMPLESAMPLES, 
     61    SDL_GL_ACCELERATED_VISUAL, 
     62    SDL_GL_SWAP_CONTROL 
     63} 
     64int SDL_GL_LoadLibrary(char*); 
     65void* SDL_GL_GetProcAddress(char*); 
     66int SDL_GL_SetAttribute(int,int); 
     67int SDL_GL_GetAttribute(int,int*); 
     68void SDL_GL_SwapBuffers(); 
     69void SDL_GL_UpdateRects(int,SDL_Rect*); 
     70void SDL_GL_Lock(); 
     71void SDL_GL_Unlock(); 
     72enum : uint { 
     73    SDL_INIT_TIMER=0x00000001, 
     74    SDL_INIT_AUDIO=0x00000010, 
     75    SDL_INIT_VIDEO=0x00000020, 
     76    SDL_INIT_CDROM=0x00000100, 
     77    SDL_INIT_JOYSTICK=0x00000200, 
     78    SDL_INIT_NOPARACHUTE=0x00100000, 
     79    SDL_INIT_EVENTTHREAD=0x00200000, 
     80    SDL_INIT_EVERYTHING=0x0000FFFF 
     81} 
    4682 
     83int SDL_Init(uint); 
     84int SDL_InitSubSystem(uint); 
     85int SDL_QuitSubSystem(uint); 
     86int SDL_WasInit(uint); 
     87void SDL_Quit(); 
  • dmd/expression.c

    r35 r42  
    74137413    e1->checkIntegral(); 
    74147414    e2 = e2->checkIntegral(); 
    7415     e2 = e2->castTo(sc, Type::tshiftcnt); 
     7415    //e2 = e2->castTo(sc, Type::tshiftcnt); 
     7416    e2 = e2->castTo(sc, e1->type); // LLVMDC 
    74167417    return this; 
    74177418} 
     
    74417442    e1->checkIntegral(); 
    74427443    e2 = e2->checkIntegral(); 
    7443     e2 = e2->castTo(sc, Type::tshiftcnt); 
     7444    //e2 = e2->castTo(sc, Type::tshiftcnt); 
     7445    e2 = e2->castTo(sc, e1->type); // LLVMDC 
    74447446    return this; 
    74457447} 
     
    74697471    e1->checkIntegral(); 
    74707472    e2 = e2->checkIntegral(); 
    7471     e2 = e2->castTo(sc, Type::tshiftcnt); 
     7473    //e2 = e2->castTo(sc, Type::tshiftcnt); 
     7474    e2 = e2->castTo(sc, e1->type); // LLVMDC 
    74727475    return this; 
    74737476} 
     
    79427945    e2 = e2->checkIntegral(); 
    79437946    e1 = e1->integralPromotions(sc); 
    7944     e2 = e2->castTo(sc, Type::tshiftcnt); 
     7947    //e2 = e2->castTo(sc, Type::tshiftcnt); 
     7948    e2 = e2->castTo(sc, e1->type); // LLVMDC 
    79457949    type = e1->type; 
    79467950    } 
     
    79667970    e2 = e2->checkIntegral(); 
    79677971    e1 = e1->integralPromotions(sc); 
    7968     e2 = e2->castTo(sc, Type::tshiftcnt); 
     7972    //e2 = e2->castTo(sc, Type::tshiftcnt); 
     7973    e2 = e2->castTo(sc, e1->type); // LLVMDC 
    79697974    type = e1->type; 
    79707975    } 
     
    79907995    e2 = e2->checkIntegral(); 
    79917996    e1 = e1->integralPromotions(sc); 
    7992     e2 = e2->castTo(sc, Type::tshiftcnt); 
     7997    //e2 = e2->castTo(sc, Type::tshiftcnt); 
     7998    e2 = e2->castTo(sc, e1->type); // LLVMDC 
    79937999    type = e1->type; 
    79948000    } 
  • gen/toir.c

    r40 r42  
    22512251    elem* u = e1->toElem(p); \ 
    22522252    elem* v = e2->toElem(p); \ 
    2253     llvm::Value* tmp = llvm::BinaryOperator::create(llvm::Instruction::Y, u->getValue(), v->getValue(), "tmp", p->scopebb()); \ 
    2254     Logger::cout() << *tmp << '|' << *u->mem << '\n'; \ 
     2253    llvm::Value* uval = u->getValue(); \ 
     2254    assert(uval); \ 
     2255    llvm::Value* vval = v->getValue(); \ 
     2256    assert(vval); \ 
     2257    llvm::Value* tmp = llvm::BinaryOperator::create(llvm::Instruction::Y, uval, vval, "tmp", p->scopebb()); \ 
    22552258    if (u->mem == 0) \ 
    22562259        LLVM_DtoGiveArgumentStorage(u); \ 
     2260    Logger::cout() << *tmp << '|' << *u->mem << '\n'; \ 
    22572261    new llvm::StoreInst(LLVM_DtoPointedType(u->mem, tmp), u->mem, p->scopebb()); \ 
    22582262    delete u; \ 
  • lphobos/internal/objectimpl.d

    r35 r42  
    137137 
    138138    assert(0, "need opCmp for class <no classinfo yet>"); 
    139     return 0; 
    140139    //throw new Error("need opCmp for class " ~ this.classinfo.name); 
    141140    } 
     
    221220     *  null if failed 
    222221     */ 
    223     static Object factory(char[] classname) 
    224     { 
    225     /+auto ci = ClassInfo.find(classname); 
     222    /+static Object factory(char[] classname) 
     223    { 
     224    auto ci = ClassInfo.find(classname); 
    226225    if (ci) 
    227226    { 
    228227        return ci.create(); 
     228    } 
     229    return null; 
    229230    }+/ 
    230     return null; 
    231     } 
    232231} 
    233232 
  • lphobos/std/intrinsic.d

    r1 r42  
    208208 */ 
    209209version (LLVM) 
    210 pragma(LLVM_internal, "intrinsic", "llvm.bswap.i32.i32") 
     210pragma(LLVM_internal, "intrinsic", "llvm.bswap.i32") 
    211211    uint bswap(uint val); 
    212212else 
  • runalltests.d

    r38 r42  
    4040    return ret; 
    4141} 
    42  
Copyright © 2008, LDC Development Team.