OLD | NEW |
1 #include "Python.h" | 1 #include "Python.h" |
2 #include "_llvmfunctionobject.h" | 2 #include "_llvmfunctionobject.h" |
3 #include "code.h" | 3 #include "code.h" |
4 #include "global_llvm_data.h" | 4 #include "global_llvm_data.h" |
5 #include "opcode.h" | 5 #include "opcode.h" |
6 | 6 |
7 #include "JIT/llvm_compile.h" | 7 #include "JIT/llvm_compile.h" |
8 #include "JIT/llvm_fbuilder.h" | 8 #include "JIT/llvm_fbuilder.h" |
9 #include "JIT/PyBytecodeDispatch.h" | 9 #include "JIT/PyBytecodeDispatch.h" |
10 #include "JIT/PyBytecodeIterator.h" | 10 #include "JIT/PyBytecodeIterator.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 OPCODE_WITH_ARG(DELETE_ATTR) | 456 OPCODE_WITH_ARG(DELETE_ATTR) |
457 OPCODE_WITH_ARG(STORE_GLOBAL) | 457 OPCODE_WITH_ARG(STORE_GLOBAL) |
458 OPCODE_WITH_ARG(DELETE_GLOBAL) | 458 OPCODE_WITH_ARG(DELETE_GLOBAL) |
459 OPCODE_WITH_ARG(LOAD_CONST) | 459 OPCODE_WITH_ARG(LOAD_CONST) |
460 OPCODE_WITH_ARG(LOAD_NAME) | 460 OPCODE_WITH_ARG(LOAD_NAME) |
461 OPCODE_WITH_ARG(BUILD_TUPLE) | 461 OPCODE_WITH_ARG(BUILD_TUPLE) |
462 OPCODE_WITH_ARG(BUILD_LIST) | 462 OPCODE_WITH_ARG(BUILD_LIST) |
463 OPCODE_WITH_ARG(BUILD_MAP) | 463 OPCODE_WITH_ARG(BUILD_MAP) |
464 OPCODE_WITH_ARG(LOAD_ATTR) | 464 OPCODE_WITH_ARG(LOAD_ATTR) |
465 OPCODE_WITH_ARG(COMPARE_OP) | 465 OPCODE_WITH_ARG(COMPARE_OP) |
| 466 OPCODE_WITH_ARG(LOAD_METHOD) |
466 OPCODE_WITH_ARG(LOAD_GLOBAL) | 467 OPCODE_WITH_ARG(LOAD_GLOBAL) |
467 OPCODE_WITH_ARG(LOAD_FAST) | 468 OPCODE_WITH_ARG(LOAD_FAST) |
468 OPCODE_WITH_ARG(STORE_FAST) | 469 OPCODE_WITH_ARG(STORE_FAST) |
469 OPCODE_WITH_ARG(DELETE_FAST) | 470 OPCODE_WITH_ARG(DELETE_FAST) |
470 OPCODE_WITH_ARG(CALL_FUNCTION) | 471 OPCODE_WITH_ARG(CALL_FUNCTION) |
| 472 OPCODE_WITH_ARG(CALL_METHOD) |
471 OPCODE_WITH_ARG(MAKE_CLOSURE) | 473 OPCODE_WITH_ARG(MAKE_CLOSURE) |
472 OPCODE_WITH_ARG(LOAD_CLOSURE) | 474 OPCODE_WITH_ARG(LOAD_CLOSURE) |
473 OPCODE_WITH_ARG(LOAD_DEREF) | 475 OPCODE_WITH_ARG(LOAD_DEREF) |
474 OPCODE_WITH_ARG(STORE_DEREF) | 476 OPCODE_WITH_ARG(STORE_DEREF) |
475 OPCODE_WITH_ARG(CALL_FUNCTION_VAR) | 477 OPCODE_WITH_ARG(CALL_FUNCTION_VAR) |
476 OPCODE_WITH_ARG(CALL_FUNCTION_KW) | 478 OPCODE_WITH_ARG(CALL_FUNCTION_KW) |
477 OPCODE_WITH_ARG(CALL_FUNCTION_VAR_KW) | 479 OPCODE_WITH_ARG(CALL_FUNCTION_VAR_KW) |
478 #undef OPCODE_WITH_ARG | 480 #undef OPCODE_WITH_ARG |
479 | 481 |
480 #define ABS iter.Oparg() | 482 #define ABS iter.Oparg() |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // callbacks for the code object. | 559 // callbacks for the code object. |
558 if (fbuilder.FinishFunction() < 0) { | 560 if (fbuilder.FinishFunction() < 0) { |
559 return NULL; | 561 return NULL; |
560 } | 562 } |
561 | 563 |
562 // Make sure the function survives global optimizations. | 564 // Make sure the function survives global optimizations. |
563 fbuilder.function()->setLinkage(llvm::GlobalValue::ExternalLinkage); | 565 fbuilder.function()->setLinkage(llvm::GlobalValue::ExternalLinkage); |
564 | 566 |
565 return _LlvmFunction_New(fbuilder.function()); | 567 return _LlvmFunction_New(fbuilder.function()); |
566 } | 568 } |
OLD | NEW |