Changeset 43362 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- May 7, 2009, 1:22:55 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/jit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r43352 r43362 45 45 namespace JSC { 46 46 47 void ctiSetReturnAddress(void** addressOfReturnAddress, void* newDestinationToReturnTo)48 {49 *addressOfReturnAddress = newDestinationToReturnTo;50 }51 52 47 void ctiPatchCallByReturnAddress(MacroAssembler::ProcessorReturnAddress returnAddress, void* newCalleeFunction) 53 48 { -
trunk/JavaScriptCore/jit/JIT.h
r43334 r43362 156 156 }; 157 157 158 void ctiSetReturnAddress(void** addressOfReturnAddress, void* newDestinationToReturnTo);159 158 void ctiPatchCallByReturnAddress(MacroAssembler::ProcessorReturnAddress returnAddress, void* newCalleeFunction); 160 159 void ctiPatchNearCallByReturnAddress(MacroAssembler::ProcessorReturnAddress returnAddress, void* newCalleeFunction); -
trunk/JavaScriptCore/jit/JITStubs.cpp
r43334 r43362 390 390 static void jscGeneratedNativeCode() 391 391 { 392 // When executing a CTIfunction (which might do an allocation), we hack the return address392 // When executing a JIT stub function (which might do an allocation), we hack the return address 393 393 // to pretend to be executing this function, to keep stack logging tools from blowing out 394 394 // memory. … … 398 398 399 399 struct StackHack { 400 ALWAYS_INLINE StackHack(void** location) 401 { 402 returnAddressLocation = location; 403 savedReturnAddress = *returnAddressLocation; 404 ctiSetReturnAddress(returnAddressLocation, reinterpret_cast<void*>(jscGeneratedNativeCode)); 405 } 400 ALWAYS_INLINE StackHack(JITStackFrame& stackFrame) 401 : stackFrame(stackFrame) 402 { 403 savedReturnAddress = *stackFrame.returnAddressSlot(); 404 *stackFrame.returnAddressSlot() = reinterpret_cast<void*>(jscGeneratedNativeCode); 405 } 406 406 407 ALWAYS_INLINE ~StackHack() 407 408 { 408 ctiSetReturnAddress(returnAddressLocation, savedReturnAddress);409 } 410 411 void** returnAddressLocation;409 *stackFrame.returnAddressSlot() = savedReturnAddress; 410 } 411 412 JITStackFrame& stackFrame; 412 413 void* savedReturnAddress; 413 414 }; 414 415 415 #define BEGIN_STUB_FUNCTION() SETUP_VA_LISTL_ARGS; StackHack stackHack(&STUB_RETURN_ADDRESS_SLOT)416 #define STUB_SET_RETURN_ADDRESS( address) stackHack.savedReturnAddress = address416 #define STUB_INIT_STACK_FRAME(stackFrame) SETUP_VA_LISTL_ARGS; JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame); 417 #define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = returnAddress 417 418 #define STUB_RETURN_ADDRESS stackHack.savedReturnAddress 418 419 419 420 #else 420 421 421 #define BEGIN_STUB_FUNCTION() SETUP_VA_LISTL_ARGS422 #define STUB_SET_RETURN_ADDRESS( address) ctiSetReturnAddress(&STUB_RETURN_ADDRESS_SLOT, address);423 #define STUB_RETURN_ADDRESS STUB_RETURN_ADDRESS_SLOT422 #define STUB_INIT_STACK_FRAME(stackFrame) SETUP_VA_LISTL_ARGS; JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 423 #define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = returnAddress; 424 #define STUB_RETURN_ADDRESS *stackFrame.returnAddressSlot() 424 425 425 426 #endif … … 433 434 ASSERT(globalData->exception); 434 435 globalData->exceptionLocation = exceptionLocation; 435 ctiSetReturnAddress(&returnAddressSlot, reinterpret_cast<void*>(ctiVMThrowTrampoline));436 returnAddressSlot = reinterpret_cast<void*>(ctiVMThrowTrampoline); 436 437 } 437 438 … … 473 474 } while (0) 474 475 476 475 477 JSObject* JITStubs::cti_op_convert_this(STUB_ARGS_DECLARATION) 476 478 { 477 BEGIN_STUB_FUNCTION(); 478 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 479 STUB_INIT_STACK_FRAME(stackFrame); 479 480 480 481 JSValue v1 = stackFrame.args[0].jsValue(); … … 488 489 void JITStubs::cti_op_end(STUB_ARGS_DECLARATION) 489 490 { 490 BEGIN_STUB_FUNCTION(); 491 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 491 STUB_INIT_STACK_FRAME(stackFrame); 492 492 493 493 ScopeChainNode* scopeChain = stackFrame.callFrame->scopeChain(); … … 498 498 EncodedJSValue JITStubs::cti_op_add(STUB_ARGS_DECLARATION) 499 499 { 500 BEGIN_STUB_FUNCTION(); 501 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 500 STUB_INIT_STACK_FRAME(stackFrame); 502 501 503 502 JSValue v1 = stackFrame.args[0].jsValue(); … … 544 543 EncodedJSValue JITStubs::cti_op_pre_inc(STUB_ARGS_DECLARATION) 545 544 { 546 BEGIN_STUB_FUNCTION(); 547 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 545 STUB_INIT_STACK_FRAME(stackFrame); 548 546 549 547 JSValue v = stackFrame.args[0].jsValue(); … … 557 555 int JITStubs::cti_timeout_check(STUB_ARGS_DECLARATION) 558 556 { 559 BEGIN_STUB_FUNCTION(); 560 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 557 STUB_INIT_STACK_FRAME(stackFrame); 561 558 562 559 JSGlobalData* globalData = stackFrame.globalData; … … 573 570 void JITStubs::cti_register_file_check(STUB_ARGS_DECLARATION) 574 571 { 575 BEGIN_STUB_FUNCTION(); 576 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 572 STUB_INIT_STACK_FRAME(stackFrame); 577 573 578 574 if (LIKELY(stackFrame.registerFile->grow(stackFrame.callFrame + stackFrame.callFrame->codeBlock()->m_numCalleeRegisters))) … … 588 584 int JITStubs::cti_op_loop_if_less(STUB_ARGS_DECLARATION) 589 585 { 590 BEGIN_STUB_FUNCTION(); 591 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 586 STUB_INIT_STACK_FRAME(stackFrame); 592 587 593 588 JSValue src1 = stackFrame.args[0].jsValue(); … … 602 597 int JITStubs::cti_op_loop_if_lesseq(STUB_ARGS_DECLARATION) 603 598 { 604 BEGIN_STUB_FUNCTION(); 605 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 599 STUB_INIT_STACK_FRAME(stackFrame); 606 600 607 601 JSValue src1 = stackFrame.args[0].jsValue(); … … 616 610 JSObject* JITStubs::cti_op_new_object(STUB_ARGS_DECLARATION) 617 611 { 618 BEGIN_STUB_FUNCTION(); 619 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 612 STUB_INIT_STACK_FRAME(stackFrame); 620 613 621 614 return constructEmptyObject(stackFrame.callFrame); … … 624 617 void JITStubs::cti_op_put_by_id_generic(STUB_ARGS_DECLARATION) 625 618 { 626 BEGIN_STUB_FUNCTION(); 627 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 619 STUB_INIT_STACK_FRAME(stackFrame); 628 620 629 621 PutPropertySlot slot; … … 634 626 EncodedJSValue JITStubs::cti_op_get_by_id_generic(STUB_ARGS_DECLARATION) 635 627 { 636 BEGIN_STUB_FUNCTION(); 637 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 628 STUB_INIT_STACK_FRAME(stackFrame); 638 629 639 630 CallFrame* callFrame = stackFrame.callFrame; … … 652 643 void JITStubs::cti_op_put_by_id(STUB_ARGS_DECLARATION) 653 644 { 654 BEGIN_STUB_FUNCTION(); 655 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 645 STUB_INIT_STACK_FRAME(stackFrame); 656 646 657 647 CallFrame* callFrame = stackFrame.callFrame; … … 668 658 void JITStubs::cti_op_put_by_id_second(STUB_ARGS_DECLARATION) 669 659 { 670 BEGIN_STUB_FUNCTION(); 671 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 660 STUB_INIT_STACK_FRAME(stackFrame); 672 661 673 662 PutPropertySlot slot; … … 679 668 void JITStubs::cti_op_put_by_id_fail(STUB_ARGS_DECLARATION) 680 669 { 681 BEGIN_STUB_FUNCTION(); 682 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 670 STUB_INIT_STACK_FRAME(stackFrame); 683 671 684 672 CallFrame* callFrame = stackFrame.callFrame; … … 693 681 EncodedJSValue JITStubs::cti_op_get_by_id(STUB_ARGS_DECLARATION) 694 682 { 695 BEGIN_STUB_FUNCTION(); 696 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 683 STUB_INIT_STACK_FRAME(stackFrame); 697 684 698 685 CallFrame* callFrame = stackFrame.callFrame; … … 711 698 EncodedJSValue JITStubs::cti_op_get_by_id_second(STUB_ARGS_DECLARATION) 712 699 { 713 BEGIN_STUB_FUNCTION(); 714 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 700 STUB_INIT_STACK_FRAME(stackFrame); 715 701 716 702 CallFrame* callFrame = stackFrame.callFrame; … … 729 715 EncodedJSValue JITStubs::cti_op_get_by_id_self_fail(STUB_ARGS_DECLARATION) 730 716 { 731 BEGIN_STUB_FUNCTION(); 732 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 717 STUB_INIT_STACK_FRAME(stackFrame); 733 718 734 719 CallFrame* callFrame = stackFrame.callFrame; … … 805 790 EncodedJSValue JITStubs::cti_op_get_by_id_proto_list(STUB_ARGS_DECLARATION) 806 791 { 807 BEGIN_STUB_FUNCTION(); 808 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 792 STUB_INIT_STACK_FRAME(stackFrame); 809 793 810 794 CallFrame* callFrame = stackFrame.callFrame; … … 858 842 EncodedJSValue JITStubs::cti_op_get_by_id_proto_list_full(STUB_ARGS_DECLARATION) 859 843 { 860 BEGIN_STUB_FUNCTION(); 861 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 844 STUB_INIT_STACK_FRAME(stackFrame); 862 845 863 846 JSValue baseValue = stackFrame.args[0].jsValue(); … … 871 854 EncodedJSValue JITStubs::cti_op_get_by_id_proto_fail(STUB_ARGS_DECLARATION) 872 855 { 873 BEGIN_STUB_FUNCTION(); 874 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 856 STUB_INIT_STACK_FRAME(stackFrame); 875 857 876 858 JSValue baseValue = stackFrame.args[0].jsValue(); … … 884 866 EncodedJSValue JITStubs::cti_op_get_by_id_array_fail(STUB_ARGS_DECLARATION) 885 867 { 886 BEGIN_STUB_FUNCTION(); 887 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 868 STUB_INIT_STACK_FRAME(stackFrame); 888 869 889 870 JSValue baseValue = stackFrame.args[0].jsValue(); … … 897 878 EncodedJSValue JITStubs::cti_op_get_by_id_string_fail(STUB_ARGS_DECLARATION) 898 879 { 899 BEGIN_STUB_FUNCTION(); 900 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 880 STUB_INIT_STACK_FRAME(stackFrame); 901 881 902 882 JSValue baseValue = stackFrame.args[0].jsValue(); … … 912 892 EncodedJSValue JITStubs::cti_op_instanceof(STUB_ARGS_DECLARATION) 913 893 { 914 BEGIN_STUB_FUNCTION(); 915 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 894 STUB_INIT_STACK_FRAME(stackFrame); 916 895 917 896 CallFrame* callFrame = stackFrame.callFrame; … … 956 935 EncodedJSValue JITStubs::cti_op_del_by_id(STUB_ARGS_DECLARATION) 957 936 { 958 BEGIN_STUB_FUNCTION(); 959 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 937 STUB_INIT_STACK_FRAME(stackFrame); 960 938 961 939 CallFrame* callFrame = stackFrame.callFrame; … … 970 948 EncodedJSValue JITStubs::cti_op_mul(STUB_ARGS_DECLARATION) 971 949 { 972 BEGIN_STUB_FUNCTION(); 973 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 950 STUB_INIT_STACK_FRAME(stackFrame); 974 951 975 952 JSValue src1 = stackFrame.args[0].jsValue(); … … 989 966 JSObject* JITStubs::cti_op_new_func(STUB_ARGS_DECLARATION) 990 967 { 991 BEGIN_STUB_FUNCTION(); 992 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 968 STUB_INIT_STACK_FRAME(stackFrame); 993 969 994 970 return stackFrame.args[0].funcDeclNode()->makeFunction(stackFrame.callFrame, stackFrame.callFrame->scopeChain()); … … 997 973 void* JITStubs::cti_op_call_JSFunction(STUB_ARGS_DECLARATION) 998 974 { 999 BEGIN_STUB_FUNCTION(); 1000 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 975 STUB_INIT_STACK_FRAME(stackFrame); 1001 976 1002 977 #ifndef NDEBUG … … 1015 990 VoidPtrPair JITStubs::cti_op_call_arityCheck(STUB_ARGS_DECLARATION) 1016 991 { 1017 BEGIN_STUB_FUNCTION(); 1018 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 992 STUB_INIT_STACK_FRAME(stackFrame); 1019 993 1020 994 CallFrame* callFrame = stackFrame.callFrame; … … 1061 1035 void* JITStubs::cti_vm_dontLazyLinkCall(STUB_ARGS_DECLARATION) 1062 1036 { 1063 BEGIN_STUB_FUNCTION(); 1064 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1037 STUB_INIT_STACK_FRAME(stackFrame); 1065 1038 1066 1039 JSGlobalData* globalData = stackFrame.globalData; … … 1076 1049 void* JITStubs::cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION) 1077 1050 { 1078 BEGIN_STUB_FUNCTION(); 1079 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1051 STUB_INIT_STACK_FRAME(stackFrame); 1080 1052 1081 1053 JSFunction* callee = asFunction(stackFrame.args[0].jsValue()); … … 1095 1067 JSObject* JITStubs::cti_op_push_activation(STUB_ARGS_DECLARATION) 1096 1068 { 1097 BEGIN_STUB_FUNCTION(); 1098 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1069 STUB_INIT_STACK_FRAME(stackFrame); 1099 1070 1100 1071 JSActivation* activation = new (stackFrame.globalData) JSActivation(stackFrame.callFrame, static_cast<FunctionBodyNode*>(stackFrame.callFrame->codeBlock()->ownerNode())); … … 1105 1076 EncodedJSValue JITStubs::cti_op_call_NotJSFunction(STUB_ARGS_DECLARATION) 1106 1077 { 1107 BEGIN_STUB_FUNCTION(); 1108 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1078 STUB_INIT_STACK_FRAME(stackFrame); 1109 1079 1110 1080 JSValue funcVal = stackFrame.args[0].jsValue(); … … 1155 1125 void JITStubs::cti_op_create_arguments(STUB_ARGS_DECLARATION) 1156 1126 { 1157 BEGIN_STUB_FUNCTION(); 1158 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1127 STUB_INIT_STACK_FRAME(stackFrame); 1159 1128 1160 1129 Arguments* arguments = new (stackFrame.globalData) Arguments(stackFrame.callFrame); … … 1165 1134 void JITStubs::cti_op_create_arguments_no_params(STUB_ARGS_DECLARATION) 1166 1135 { 1167 BEGIN_STUB_FUNCTION(); 1168 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1136 STUB_INIT_STACK_FRAME(stackFrame); 1169 1137 1170 1138 Arguments* arguments = new (stackFrame.globalData) Arguments(stackFrame.callFrame, Arguments::NoParameters); … … 1175 1143 void JITStubs::cti_op_tear_off_activation(STUB_ARGS_DECLARATION) 1176 1144 { 1177 BEGIN_STUB_FUNCTION(); 1178 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1145 STUB_INIT_STACK_FRAME(stackFrame); 1179 1146 1180 1147 ASSERT(stackFrame.callFrame->codeBlock()->needsFullScopeChain()); … … 1184 1151 void JITStubs::cti_op_tear_off_arguments(STUB_ARGS_DECLARATION) 1185 1152 { 1186 BEGIN_STUB_FUNCTION(); 1187 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1153 STUB_INIT_STACK_FRAME(stackFrame); 1188 1154 1189 1155 ASSERT(stackFrame.callFrame->codeBlock()->usesArguments() && !stackFrame.callFrame->codeBlock()->needsFullScopeChain()); … … 1193 1159 void JITStubs::cti_op_profile_will_call(STUB_ARGS_DECLARATION) 1194 1160 { 1195 BEGIN_STUB_FUNCTION(); 1196 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1161 STUB_INIT_STACK_FRAME(stackFrame); 1197 1162 1198 1163 ASSERT(*stackFrame.enabledProfilerReference); … … 1202 1167 void JITStubs::cti_op_profile_did_call(STUB_ARGS_DECLARATION) 1203 1168 { 1204 BEGIN_STUB_FUNCTION(); 1205 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1169 STUB_INIT_STACK_FRAME(stackFrame); 1206 1170 1207 1171 ASSERT(*stackFrame.enabledProfilerReference); … … 1211 1175 void JITStubs::cti_op_ret_scopeChain(STUB_ARGS_DECLARATION) 1212 1176 { 1213 BEGIN_STUB_FUNCTION(); 1214 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1177 STUB_INIT_STACK_FRAME(stackFrame); 1215 1178 1216 1179 ASSERT(stackFrame.callFrame->codeBlock()->needsFullScopeChain()); … … 1220 1183 JSObject* JITStubs::cti_op_new_array(STUB_ARGS_DECLARATION) 1221 1184 { 1222 BEGIN_STUB_FUNCTION(); 1223 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1185 STUB_INIT_STACK_FRAME(stackFrame); 1224 1186 1225 1187 ArgList argList(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32()); … … 1229 1191 EncodedJSValue JITStubs::cti_op_resolve(STUB_ARGS_DECLARATION) 1230 1192 { 1231 BEGIN_STUB_FUNCTION(); 1232 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1193 STUB_INIT_STACK_FRAME(stackFrame); 1233 1194 1234 1195 CallFrame* callFrame = stackFrame.callFrame; … … 1258 1219 JSObject* JITStubs::cti_op_construct_JSConstruct(STUB_ARGS_DECLARATION) 1259 1220 { 1260 BEGIN_STUB_FUNCTION(); 1261 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1221 STUB_INIT_STACK_FRAME(stackFrame); 1262 1222 1263 1223 JSFunction* constructor = asFunction(stackFrame.args[0].jsValue()); … … 1285 1245 EncodedJSValue JITStubs::cti_op_construct_NotJSConstruct(STUB_ARGS_DECLARATION) 1286 1246 { 1287 BEGIN_STUB_FUNCTION(); 1288 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1247 STUB_INIT_STACK_FRAME(stackFrame); 1289 1248 1290 1249 CallFrame* callFrame = stackFrame.callFrame; … … 1320 1279 EncodedJSValue JITStubs::cti_op_get_by_val(STUB_ARGS_DECLARATION) 1321 1280 { 1322 BEGIN_STUB_FUNCTION(); 1323 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1281 STUB_INIT_STACK_FRAME(stackFrame); 1324 1282 1325 1283 CallFrame* callFrame = stackFrame.callFrame; … … 1360 1318 EncodedJSValue JITStubs::cti_op_get_by_val_string(STUB_ARGS_DECLARATION) 1361 1319 { 1362 BEGIN_STUB_FUNCTION(); 1363 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1320 STUB_INIT_STACK_FRAME(stackFrame); 1364 1321 1365 1322 CallFrame* callFrame = stackFrame.callFrame; … … 1392 1349 EncodedJSValue JITStubs::cti_op_get_by_val_byte_array(STUB_ARGS_DECLARATION) 1393 1350 { 1394 BEGIN_STUB_FUNCTION(); 1395 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1351 STUB_INIT_STACK_FRAME(stackFrame); 1396 1352 1397 1353 CallFrame* callFrame = stackFrame.callFrame; … … 1424 1380 VoidPtrPair JITStubs::cti_op_resolve_func(STUB_ARGS_DECLARATION) 1425 1381 { 1426 BEGIN_STUB_FUNCTION(); 1427 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1382 STUB_INIT_STACK_FRAME(stackFrame); 1428 1383 1429 1384 CallFrame* callFrame = stackFrame.callFrame; … … 1467 1422 EncodedJSValue JITStubs::cti_op_sub(STUB_ARGS_DECLARATION) 1468 1423 { 1469 BEGIN_STUB_FUNCTION(); 1470 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1424 STUB_INIT_STACK_FRAME(stackFrame); 1471 1425 1472 1426 JSValue src1 = stackFrame.args[0].jsValue(); … … 1486 1440 void JITStubs::cti_op_put_by_val(STUB_ARGS_DECLARATION) 1487 1441 { 1488 BEGIN_STUB_FUNCTION(); 1489 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1442 STUB_INIT_STACK_FRAME(stackFrame); 1490 1443 1491 1444 CallFrame* callFrame = stackFrame.callFrame; … … 1535 1488 void JITStubs::cti_op_put_by_val_array(STUB_ARGS_DECLARATION) 1536 1489 { 1537 BEGIN_STUB_FUNCTION(); 1538 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1490 STUB_INIT_STACK_FRAME(stackFrame); 1539 1491 1540 1492 CallFrame* callFrame = stackFrame.callFrame; … … 1563 1515 void JITStubs::cti_op_put_by_val_byte_array(STUB_ARGS_DECLARATION) 1564 1516 { 1565 BEGIN_STUB_FUNCTION(); 1566 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1517 STUB_INIT_STACK_FRAME(stackFrame); 1567 1518 1568 1519 CallFrame* callFrame = stackFrame.callFrame; … … 1607 1558 EncodedJSValue JITStubs::cti_op_lesseq(STUB_ARGS_DECLARATION) 1608 1559 { 1609 BEGIN_STUB_FUNCTION(); 1610 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1560 STUB_INIT_STACK_FRAME(stackFrame); 1611 1561 1612 1562 CallFrame* callFrame = stackFrame.callFrame; … … 1618 1568 int JITStubs::cti_op_loop_if_true(STUB_ARGS_DECLARATION) 1619 1569 { 1620 BEGIN_STUB_FUNCTION(); 1621 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1570 STUB_INIT_STACK_FRAME(stackFrame); 1622 1571 1623 1572 JSValue src1 = stackFrame.args[0].jsValue(); … … 1632 1581 int JITStubs::cti_op_load_varargs(STUB_ARGS_DECLARATION) 1633 1582 { 1634 BEGIN_STUB_FUNCTION(); 1635 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1583 STUB_INIT_STACK_FRAME(stackFrame); 1636 1584 CallFrame* callFrame = stackFrame.callFrame; 1637 1585 RegisterFile* registerFile = stackFrame.registerFile; … … 1693 1641 EncodedJSValue JITStubs::cti_op_negate(STUB_ARGS_DECLARATION) 1694 1642 { 1695 BEGIN_STUB_FUNCTION(); 1696 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1643 STUB_INIT_STACK_FRAME(stackFrame); 1697 1644 1698 1645 JSValue src = stackFrame.args[0].jsValue(); … … 1710 1657 EncodedJSValue JITStubs::cti_op_resolve_base(STUB_ARGS_DECLARATION) 1711 1658 { 1712 BEGIN_STUB_FUNCTION(); 1713 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1659 STUB_INIT_STACK_FRAME(stackFrame); 1714 1660 1715 1661 return JSValue::encode(JSC::resolveBase(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.callFrame->scopeChain())); … … 1718 1664 EncodedJSValue JITStubs::cti_op_resolve_skip(STUB_ARGS_DECLARATION) 1719 1665 { 1720 BEGIN_STUB_FUNCTION(); 1721 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1666 STUB_INIT_STACK_FRAME(stackFrame); 1722 1667 1723 1668 CallFrame* callFrame = stackFrame.callFrame; … … 1752 1697 EncodedJSValue JITStubs::cti_op_resolve_global(STUB_ARGS_DECLARATION) 1753 1698 { 1754 BEGIN_STUB_FUNCTION(); 1755 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1699 STUB_INIT_STACK_FRAME(stackFrame); 1756 1700 1757 1701 CallFrame* callFrame = stackFrame.callFrame; … … 1785 1729 EncodedJSValue JITStubs::cti_op_div(STUB_ARGS_DECLARATION) 1786 1730 { 1787 BEGIN_STUB_FUNCTION(); 1788 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1731 STUB_INIT_STACK_FRAME(stackFrame); 1789 1732 1790 1733 JSValue src1 = stackFrame.args[0].jsValue(); … … 1804 1747 EncodedJSValue JITStubs::cti_op_pre_dec(STUB_ARGS_DECLARATION) 1805 1748 { 1806 BEGIN_STUB_FUNCTION(); 1807 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1749 STUB_INIT_STACK_FRAME(stackFrame); 1808 1750 1809 1751 JSValue v = stackFrame.args[0].jsValue(); … … 1817 1759 int JITStubs::cti_op_jless(STUB_ARGS_DECLARATION) 1818 1760 { 1819 BEGIN_STUB_FUNCTION(); 1820 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1761 STUB_INIT_STACK_FRAME(stackFrame); 1821 1762 1822 1763 JSValue src1 = stackFrame.args[0].jsValue(); … … 1831 1772 EncodedJSValue JITStubs::cti_op_not(STUB_ARGS_DECLARATION) 1832 1773 { 1833 BEGIN_STUB_FUNCTION(); 1834 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1774 STUB_INIT_STACK_FRAME(stackFrame); 1835 1775 1836 1776 JSValue src = stackFrame.args[0].jsValue(); … … 1845 1785 int JITStubs::cti_op_jtrue(STUB_ARGS_DECLARATION) 1846 1786 { 1847 BEGIN_STUB_FUNCTION(); 1848 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1787 STUB_INIT_STACK_FRAME(stackFrame); 1849 1788 1850 1789 JSValue src1 = stackFrame.args[0].jsValue(); … … 1859 1798 VoidPtrPair JITStubs::cti_op_post_inc(STUB_ARGS_DECLARATION) 1860 1799 { 1861 BEGIN_STUB_FUNCTION(); 1862 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1800 STUB_INIT_STACK_FRAME(stackFrame); 1863 1801 1864 1802 JSValue v = stackFrame.args[0].jsValue(); … … 1874 1812 EncodedJSValue JITStubs::cti_op_eq(STUB_ARGS_DECLARATION) 1875 1813 { 1876 BEGIN_STUB_FUNCTION(); 1877 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1814 STUB_INIT_STACK_FRAME(stackFrame); 1878 1815 1879 1816 JSValue src1 = stackFrame.args[0].jsValue(); … … 1890 1827 EncodedJSValue JITStubs::cti_op_lshift(STUB_ARGS_DECLARATION) 1891 1828 { 1892 BEGIN_STUB_FUNCTION(); 1893 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1829 STUB_INIT_STACK_FRAME(stackFrame); 1894 1830 1895 1831 JSValue val = stackFrame.args[0].jsValue(); … … 1911 1847 EncodedJSValue JITStubs::cti_op_bitand(STUB_ARGS_DECLARATION) 1912 1848 { 1913 BEGIN_STUB_FUNCTION(); 1914 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1849 STUB_INIT_STACK_FRAME(stackFrame); 1915 1850 1916 1851 JSValue src1 = stackFrame.args[0].jsValue(); … … 1930 1865 EncodedJSValue JITStubs::cti_op_rshift(STUB_ARGS_DECLARATION) 1931 1866 { 1932 BEGIN_STUB_FUNCTION(); 1933 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1867 STUB_INIT_STACK_FRAME(stackFrame); 1934 1868 1935 1869 JSValue val = stackFrame.args[0].jsValue(); … … 1951 1885 EncodedJSValue JITStubs::cti_op_bitnot(STUB_ARGS_DECLARATION) 1952 1886 { 1953 BEGIN_STUB_FUNCTION(); 1954 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1887 STUB_INIT_STACK_FRAME(stackFrame); 1955 1888 1956 1889 JSValue src = stackFrame.args[0].jsValue(); … … 1968 1901 VoidPtrPair JITStubs::cti_op_resolve_with_base(STUB_ARGS_DECLARATION) 1969 1902 { 1970 BEGIN_STUB_FUNCTION(); 1971 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1903 STUB_INIT_STACK_FRAME(stackFrame); 1972 1904 1973 1905 CallFrame* callFrame = stackFrame.callFrame; … … 2003 1935 JSObject* JITStubs::cti_op_new_func_exp(STUB_ARGS_DECLARATION) 2004 1936 { 2005 BEGIN_STUB_FUNCTION(); 2006 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1937 STUB_INIT_STACK_FRAME(stackFrame); 2007 1938 2008 1939 return stackFrame.args[0].funcExprNode()->makeFunction(stackFrame.callFrame, stackFrame.callFrame->scopeChain()); … … 2011 1942 EncodedJSValue JITStubs::cti_op_mod(STUB_ARGS_DECLARATION) 2012 1943 { 2013 BEGIN_STUB_FUNCTION(); 2014 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1944 STUB_INIT_STACK_FRAME(stackFrame); 2015 1945 2016 1946 JSValue dividendValue = stackFrame.args[0].jsValue(); … … 2026 1956 EncodedJSValue JITStubs::cti_op_less(STUB_ARGS_DECLARATION) 2027 1957 { 2028 BEGIN_STUB_FUNCTION(); 2029 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1958 STUB_INIT_STACK_FRAME(stackFrame); 2030 1959 2031 1960 CallFrame* callFrame = stackFrame.callFrame; … … 2037 1966 EncodedJSValue JITStubs::cti_op_neq(STUB_ARGS_DECLARATION) 2038 1967 { 2039 BEGIN_STUB_FUNCTION(); 2040 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1968 STUB_INIT_STACK_FRAME(stackFrame); 2041 1969 2042 1970 JSValue src1 = stackFrame.args[0].jsValue(); … … 2053 1981 VoidPtrPair JITStubs::cti_op_post_dec(STUB_ARGS_DECLARATION) 2054 1982 { 2055 BEGIN_STUB_FUNCTION(); 2056 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1983 STUB_INIT_STACK_FRAME(stackFrame); 2057 1984 2058 1985 JSValue v = stackFrame.args[0].jsValue(); … … 2068 1995 EncodedJSValue JITStubs::cti_op_urshift(STUB_ARGS_DECLARATION) 2069 1996 { 2070 BEGIN_STUB_FUNCTION(); 2071 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 1997 STUB_INIT_STACK_FRAME(stackFrame); 2072 1998 2073 1999 JSValue val = stackFrame.args[0].jsValue(); … … 2087 2013 EncodedJSValue JITStubs::cti_op_bitxor(STUB_ARGS_DECLARATION) 2088 2014 { 2089 BEGIN_STUB_FUNCTION(); 2090 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2015 STUB_INIT_STACK_FRAME(stackFrame); 2091 2016 2092 2017 JSValue src1 = stackFrame.args[0].jsValue(); … … 2102 2027 JSObject* JITStubs::cti_op_new_regexp(STUB_ARGS_DECLARATION) 2103 2028 { 2104 BEGIN_STUB_FUNCTION(); 2105 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2029 STUB_INIT_STACK_FRAME(stackFrame); 2106 2030 2107 2031 return new (stackFrame.globalData) RegExpObject(stackFrame.callFrame->lexicalGlobalObject()->regExpStructure(), stackFrame.args[0].regExp()); … … 2110 2034 EncodedJSValue JITStubs::cti_op_bitor(STUB_ARGS_DECLARATION) 2111 2035 { 2112 BEGIN_STUB_FUNCTION(); 2113 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2036 STUB_INIT_STACK_FRAME(stackFrame); 2114 2037 2115 2038 JSValue src1 = stackFrame.args[0].jsValue(); … … 2125 2048 EncodedJSValue JITStubs::cti_op_call_eval(STUB_ARGS_DECLARATION) 2126 2049 { 2127 BEGIN_STUB_FUNCTION(); 2128 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2050 STUB_INIT_STACK_FRAME(stackFrame); 2129 2051 2130 2052 CallFrame* callFrame = stackFrame.callFrame; … … 2157 2079 EncodedJSValue JITStubs::cti_op_throw(STUB_ARGS_DECLARATION) 2158 2080 { 2159 BEGIN_STUB_FUNCTION(); 2160 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2081 STUB_INIT_STACK_FRAME(stackFrame); 2161 2082 2162 2083 CallFrame* callFrame = stackFrame.callFrame; … … 2184 2105 JSPropertyNameIterator* JITStubs::cti_op_get_pnames(STUB_ARGS_DECLARATION) 2185 2106 { 2186 BEGIN_STUB_FUNCTION(); 2187 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2107 STUB_INIT_STACK_FRAME(stackFrame); 2188 2108 2189 2109 return JSPropertyNameIterator::create(stackFrame.callFrame, stackFrame.args[0].jsValue()); … … 2192 2112 EncodedJSValue JITStubs::cti_op_next_pname(STUB_ARGS_DECLARATION) 2193 2113 { 2194 BEGIN_STUB_FUNCTION(); 2195 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2114 STUB_INIT_STACK_FRAME(stackFrame); 2196 2115 2197 2116 JSPropertyNameIterator* it = stackFrame.args[0].propertyNameIterator(); … … 2204 2123 JSObject* JITStubs::cti_op_push_scope(STUB_ARGS_DECLARATION) 2205 2124 { 2206 BEGIN_STUB_FUNCTION(); 2207 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2125 STUB_INIT_STACK_FRAME(stackFrame); 2208 2126 2209 2127 JSObject* o = stackFrame.args[0].jsValue().toObject(stackFrame.callFrame); … … 2215 2133 void JITStubs::cti_op_pop_scope(STUB_ARGS_DECLARATION) 2216 2134 { 2217 BEGIN_STUB_FUNCTION(); 2218 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2135 STUB_INIT_STACK_FRAME(stackFrame); 2219 2136 2220 2137 stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->pop()); … … 2223 2140 EncodedJSValue JITStubs::cti_op_typeof(STUB_ARGS_DECLARATION) 2224 2141 { 2225 BEGIN_STUB_FUNCTION(); 2226 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2142 STUB_INIT_STACK_FRAME(stackFrame); 2227 2143 2228 2144 return JSValue::encode(jsTypeStringForValue(stackFrame.callFrame, stackFrame.args[0].jsValue())); … … 2231 2147 EncodedJSValue JITStubs::cti_op_is_undefined(STUB_ARGS_DECLARATION) 2232 2148 { 2233 BEGIN_STUB_FUNCTION(); 2234 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2149 STUB_INIT_STACK_FRAME(stackFrame); 2235 2150 2236 2151 JSValue v = stackFrame.args[0].jsValue(); … … 2240 2155 EncodedJSValue JITStubs::cti_op_is_boolean(STUB_ARGS_DECLARATION) 2241 2156 { 2242 BEGIN_STUB_FUNCTION(); 2243 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2157 STUB_INIT_STACK_FRAME(stackFrame); 2244 2158 2245 2159 return JSValue::encode(jsBoolean(stackFrame.args[0].jsValue().isBoolean())); … … 2248 2162 EncodedJSValue JITStubs::cti_op_is_number(STUB_ARGS_DECLARATION) 2249 2163 { 2250 BEGIN_STUB_FUNCTION(); 2251 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2164 STUB_INIT_STACK_FRAME(stackFrame); 2252 2165 2253 2166 return JSValue::encode(jsBoolean(stackFrame.args[0].jsValue().isNumber())); … … 2256 2169 EncodedJSValue JITStubs::cti_op_is_string(STUB_ARGS_DECLARATION) 2257 2170 { 2258 BEGIN_STUB_FUNCTION(); 2259 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2171 STUB_INIT_STACK_FRAME(stackFrame); 2260 2172 2261 2173 return JSValue::encode(jsBoolean(isJSString(stackFrame.globalData, stackFrame.args[0].jsValue()))); … … 2264 2176 EncodedJSValue JITStubs::cti_op_is_object(STUB_ARGS_DECLARATION) 2265 2177 { 2266 BEGIN_STUB_FUNCTION(); 2267 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2178 STUB_INIT_STACK_FRAME(stackFrame); 2268 2179 2269 2180 return JSValue::encode(jsBoolean(jsIsObjectType(stackFrame.args[0].jsValue()))); … … 2272 2183 EncodedJSValue JITStubs::cti_op_is_function(STUB_ARGS_DECLARATION) 2273 2184 { 2274 BEGIN_STUB_FUNCTION(); 2275 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2185 STUB_INIT_STACK_FRAME(stackFrame); 2276 2186 2277 2187 return JSValue::encode(jsBoolean(jsIsFunctionType(stackFrame.args[0].jsValue()))); … … 2280 2190 EncodedJSValue JITStubs::cti_op_stricteq(STUB_ARGS_DECLARATION) 2281 2191 { 2282 BEGIN_STUB_FUNCTION(); 2283 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2192 STUB_INIT_STACK_FRAME(stackFrame); 2284 2193 2285 2194 JSValue src1 = stackFrame.args[0].jsValue(); … … 2291 2200 EncodedJSValue JITStubs::cti_op_to_primitive(STUB_ARGS_DECLARATION) 2292 2201 { 2293 BEGIN_STUB_FUNCTION(); 2294 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2202 STUB_INIT_STACK_FRAME(stackFrame); 2295 2203 2296 2204 return JSValue::encode(stackFrame.args[0].jsValue().toPrimitive(stackFrame.callFrame)); … … 2299 2207 EncodedJSValue JITStubs::cti_op_strcat(STUB_ARGS_DECLARATION) 2300 2208 { 2301 BEGIN_STUB_FUNCTION(); 2302 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2209 STUB_INIT_STACK_FRAME(stackFrame); 2303 2210 2304 2211 return JSValue::encode(concatenateStrings(stackFrame.callFrame, &stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32())); … … 2307 2214 EncodedJSValue JITStubs::cti_op_nstricteq(STUB_ARGS_DECLARATION) 2308 2215 { 2309 BEGIN_STUB_FUNCTION(); 2310 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2216 STUB_INIT_STACK_FRAME(stackFrame); 2311 2217 2312 2218 JSValue src1 = stackFrame.args[0].jsValue(); … … 2318 2224 EncodedJSValue JITStubs::cti_op_to_jsnumber(STUB_ARGS_DECLARATION) 2319 2225 { 2320 BEGIN_STUB_FUNCTION(); 2321 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2226 STUB_INIT_STACK_FRAME(stackFrame); 2322 2227 2323 2228 JSValue src = stackFrame.args[0].jsValue(); … … 2331 2236 EncodedJSValue JITStubs::cti_op_in(STUB_ARGS_DECLARATION) 2332 2237 { 2333 BEGIN_STUB_FUNCTION(); 2334 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2238 STUB_INIT_STACK_FRAME(stackFrame); 2335 2239 2336 2240 CallFrame* callFrame = stackFrame.callFrame; … … 2359 2263 JSObject* JITStubs::cti_op_push_new_scope(STUB_ARGS_DECLARATION) 2360 2264 { 2361 BEGIN_STUB_FUNCTION(); 2362 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2265 STUB_INIT_STACK_FRAME(stackFrame); 2363 2266 2364 2267 JSObject* scope = new (stackFrame.globalData) JSStaticScopeObject(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.args[1].jsValue(), DontDelete); … … 2371 2274 void JITStubs::cti_op_jmp_scopes(STUB_ARGS_DECLARATION) 2372 2275 { 2373 BEGIN_STUB_FUNCTION(); 2374 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2276 STUB_INIT_STACK_FRAME(stackFrame); 2375 2277 2376 2278 unsigned count = stackFrame.args[0].int32(); … … 2385 2287 void JITStubs::cti_op_put_by_index(STUB_ARGS_DECLARATION) 2386 2288 { 2387 BEGIN_STUB_FUNCTION(); 2388 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2289 STUB_INIT_STACK_FRAME(stackFrame); 2389 2290 2390 2291 CallFrame* callFrame = stackFrame.callFrame; … … 2396 2297 void* JITStubs::cti_op_switch_imm(STUB_ARGS_DECLARATION) 2397 2298 { 2398 BEGIN_STUB_FUNCTION(); 2399 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2299 STUB_INIT_STACK_FRAME(stackFrame); 2400 2300 2401 2301 JSValue scrutinee = stackFrame.args[0].jsValue(); … … 2418 2318 void* JITStubs::cti_op_switch_char(STUB_ARGS_DECLARATION) 2419 2319 { 2420 BEGIN_STUB_FUNCTION(); 2421 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2320 STUB_INIT_STACK_FRAME(stackFrame); 2422 2321 2423 2322 JSValue scrutinee = stackFrame.args[0].jsValue(); … … 2439 2338 void* JITStubs::cti_op_switch_string(STUB_ARGS_DECLARATION) 2440 2339 { 2441 BEGIN_STUB_FUNCTION(); 2442 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2340 STUB_INIT_STACK_FRAME(stackFrame); 2443 2341 2444 2342 JSValue scrutinee = stackFrame.args[0].jsValue(); … … 2459 2357 EncodedJSValue JITStubs::cti_op_del_by_val(STUB_ARGS_DECLARATION) 2460 2358 { 2461 BEGIN_STUB_FUNCTION(); 2462 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2359 STUB_INIT_STACK_FRAME(stackFrame); 2463 2360 2464 2361 CallFrame* callFrame = stackFrame.callFrame; … … 2485 2382 void JITStubs::cti_op_put_getter(STUB_ARGS_DECLARATION) 2486 2383 { 2487 BEGIN_STUB_FUNCTION(); 2488 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2384 STUB_INIT_STACK_FRAME(stackFrame); 2489 2385 2490 2386 CallFrame* callFrame = stackFrame.callFrame; … … 2498 2394 void JITStubs::cti_op_put_setter(STUB_ARGS_DECLARATION) 2499 2395 { 2500 BEGIN_STUB_FUNCTION(); 2501 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2396 STUB_INIT_STACK_FRAME(stackFrame); 2502 2397 2503 2398 CallFrame* callFrame = stackFrame.callFrame; … … 2511 2406 JSObject* JITStubs::cti_op_new_error(STUB_ARGS_DECLARATION) 2512 2407 { 2513 BEGIN_STUB_FUNCTION(); 2514 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2408 STUB_INIT_STACK_FRAME(stackFrame); 2515 2409 2516 2410 CallFrame* callFrame = stackFrame.callFrame; … … 2526 2420 void JITStubs::cti_op_debug(STUB_ARGS_DECLARATION) 2527 2421 { 2528 BEGIN_STUB_FUNCTION(); 2529 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2422 STUB_INIT_STACK_FRAME(stackFrame); 2530 2423 2531 2424 CallFrame* callFrame = stackFrame.callFrame; … … 2540 2433 EncodedJSValue JITStubs::cti_vm_throw(STUB_ARGS_DECLARATION) 2541 2434 { 2542 BEGIN_STUB_FUNCTION(); 2543 JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); 2435 STUB_INIT_STACK_FRAME(stackFrame); 2544 2436 2545 2437 CallFrame* callFrame = stackFrame.callFrame; -
trunk/JavaScriptCore/jit/JITStubs.h
r43352 r43362 89 89 Profiler** enabledProfilerReference; 90 90 JSGlobalData* globalData; 91 92 // When JIT code makes a call, it pushes its return address just below the rest of the stack. 93 void** returnAddressSlot() { return reinterpret_cast<void**>(this) - 1; } 91 94 }; 92 95 #else … … 107 110 Profiler** enabledProfilerReference; 108 111 JSGlobalData* globalData; 112 113 // When JIT code makes a call, it pushes its return address just below the rest of the stack. 114 void** returnAddressSlot() { return reinterpret_cast<void**>(this) - 1; } 109 115 }; 110 116 #endif … … 112 118 #define STUB_ARGS_code (offsetof(struct JITStackFrame, code) / sizeof (void*)) 113 119 #define STUB_ARGS_callFrame (offsetof(struct JITStackFrame, callFrame) / sizeof (void*)) 114 115 #define STUB_RETURN_ADDRESS_SLOT (STUB_ARGS[-1])116 120 117 121 #if USE(JIT_STUB_ARGUMENT_VA_LIST)
Note:
See TracChangeset
for help on using the changeset viewer.