Changeset 175512 in webkit
- Timestamp:
- Nov 3, 2014 8:59:19 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r175509 r175512 1 2014-11-03 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r175509. 4 https://bugs.webkit.org/show_bug.cgi?id=138349 5 6 broke some builds (Requested by msaboff on #webkit). 7 8 Reverted changeset: 9 10 "Update scope related slow path code to use scope register 11 added to opcodes" 12 https://bugs.webkit.org/show_bug.cgi?id=138254 13 http://trac.webkit.org/changeset/175509 14 1 15 2014-11-03 Michael Saboff <msaboff@apple.com> 2 16 -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
r175509 r175512 133 133 } 134 134 135 template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4, typename argType5, typename argType6>136 FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5, argType6))137 : m_value((void*)value)138 {139 ASSERT_VALID_CODE_POINTER(m_value);140 }141 135 // MSVC doesn't seem to treat functions with different calling conventions as 142 136 // different types; these methods already defined for fastcall, below. -
trunk/Source/JavaScriptCore/jit/CCallHelpers.h
r175509 r175512 290 290 } 291 291 292 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3)293 {294 resetCallArguments();295 addCallArgument(GPRInfo::callFrameRegister);296 addCallArgument(arg1);297 addCallArgument(arg2);298 addCallArgument(arg3);299 }300 301 292 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3) 302 293 { … … 395 386 396 387 ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) 397 {398 resetCallArguments();399 addCallArgument(GPRInfo::callFrameRegister);400 addCallArgument(arg1);401 addCallArgument(arg2);402 addCallArgument(arg3);403 addCallArgument(arg4);404 addCallArgument(arg5);405 }406 407 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, GPRReg arg4, TrustedImm32 arg5)408 388 { 409 389 resetCallArguments(); … … 1402 1382 } 1403 1383 1404 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)1405 {1406 poke(arg5, POKE_ARGUMENT_OFFSET + 1);1407 poke(arg4, POKE_ARGUMENT_OFFSET);1408 setupArgumentsWithExecState(arg1, arg2, arg3);1409 }1410 1411 1384 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5) 1412 1385 { … … 1541 1514 1542 1515 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) 1543 {1544 poke(arg5, POKE_ARGUMENT_OFFSET + 1);1545 poke(arg4, POKE_ARGUMENT_OFFSET);1546 setupArgumentsWithExecState(arg1, arg2, arg3);1547 }1548 1549 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)1550 1516 { 1551 1517 poke(arg5, POKE_ARGUMENT_OFFSET + 1); … … 1710 1676 move(arg3, GPRInfo::argumentGPR3); 1711 1677 move(arg4, GPRInfo::argumentGPR4); 1712 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);1713 }1714 1715 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5)1716 {1717 move(arg3, GPRInfo::argumentGPR3);1718 move(arg1, GPRInfo::argumentGPR1);1719 move(arg2, GPRInfo::argumentGPR2);1720 move(arg4, GPRInfo::argumentGPR4);1721 move(arg5, GPRInfo::argumentGPR5);1722 1678 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 1723 1679 } -
trunk/Source/JavaScriptCore/jit/JIT.h
r175509 r175512 717 717 MacroAssembler::Call callOperation(V_JITOperation_ECICC, RegisterID, const Identifier*, RegisterID, RegisterID); 718 718 MacroAssembler::Call callOperation(J_JITOperation_EE, RegisterID); 719 #if USE(JSVALUE64) 720 MacroAssembler::Call callOperation(V_JITOperation_EZIdJZZ, int, const Identifier*, RegisterID, int32_t, int32_t); 721 #else 722 MacroAssembler::Call callOperation(V_JITOperation_EZIdJZ, int, const Identifier*, RegisterID, int32_t); 723 #endif 719 MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, int32_t, int32_t); 724 720 MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID); 725 721 #if USE(JSVALUE64) … … 740 736 MacroAssembler::Call callOperation(V_JITOperation_EPc, Instruction*); 741 737 MacroAssembler::Call callOperation(V_JITOperation_EZ, int32_t); 742 MacroAssembler::Call callOperation(V_JITOperation_EZJ, int, GPRReg);743 738 MacroAssembler::Call callOperationWithCallFrameRollbackOnException(J_JITOperation_E); 744 739 MacroAssembler::Call callOperationWithCallFrameRollbackOnException(V_JITOperation_ECb, CodeBlock*); … … 754 749 MacroAssembler::Call callOperation(S_JITOperation_EJ, RegisterID, RegisterID); 755 750 MacroAssembler::Call callOperation(S_JITOperation_EJJ, RegisterID, RegisterID, RegisterID, RegisterID); 756 MacroAssembler::Call callOperation(V_JITOperation_E ZIdJZ, int, const Identifier*, RegisterID, RegisterID, int32_t);751 MacroAssembler::Call callOperation(V_JITOperation_EIdJZZ, const Identifier*, RegisterID, RegisterID, int32_t, int32_t); 757 752 MacroAssembler::Call callOperation(V_JITOperation_EJ, RegisterID, RegisterID); 758 753 MacroAssembler::Call callOperation(V_JITOperation_EJJJ, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID, RegisterID); 759 754 MacroAssembler::Call callOperation(V_JITOperation_EJZ, RegisterID, RegisterID, int32_t); 760 755 MacroAssembler::Call callOperation(V_JITOperation_EJZJ, RegisterID, RegisterID, int32_t, RegisterID, RegisterID); 761 MacroAssembler::Call callOperation(V_JITOperation_EZJ, int32_t, RegisterID, RegisterID);762 756 #endif 763 757 -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r175509 r175512 381 381 } 382 382 383 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZJ operation, int dst, GPRReg arg)384 {385 setupArgumentsWithExecState(TrustedImm32(dst), arg);386 return appendCallWithExceptionCheck(operation);387 }388 389 383 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(JIT::WithProfileTag, J_JITOperation_ESsiJI operation, int dst, StructureStubInfo* stubInfo, GPRReg arg1, StringImpl* uid) 390 384 { … … 448 442 } 449 443 450 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_E ZIdJZZ operation, int op1, const Identifier* identOp2, RegisterID regOp3, int32_t op4, int32_t op5)451 { 452 setupArgumentsWithExecState(TrustedImm 32(op1), TrustedImmPtr(identOp2), regOp3, TrustedImm32(op4), TrustedImm32(op5));444 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EIdJZZ operation, const Identifier* identOp1, RegisterID regOp2, int32_t op3, int32_t op4) 445 { 446 setupArgumentsWithExecState(TrustedImmPtr(identOp1), regOp2, TrustedImm32(op3), TrustedImm32(op4)); 453 447 return appendCallWithExceptionCheck(operation); 454 448 } … … 582 576 } 583 577 584 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_E ZIdJZ operation, int32_t op1, const Identifier* identOp2, RegisterID regOp3Tag, RegisterID regOp3Payload, int32_t op4)585 { 586 setupArgumentsWithExecState(TrustedImm 32(op1), TrustedImmPtr(identOp2), regOp3Payload, regOp3Tag, TrustedImm32(op4));578 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EIdJZZ operation, const Identifier* identOp1, RegisterID regOp2Tag, RegisterID regOp2Payload, int32_t op3, int32_t op4) 579 { 580 setupArgumentsWithExecState(TrustedImmPtr(identOp1), regOp2Payload, regOp2Tag, TrustedImm32(op3), TrustedImm32(op4)); 587 581 return appendCallWithExceptionCheck(operation); 588 582 } … … 597 591 { 598 592 setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG regOp1Payload, regOp1Tag, SH4_32BIT_DUMMY_ARG regOp2Payload, regOp2Tag, regOp3Payload, regOp3Tag); 599 return appendCallWithExceptionCheck(operation);600 }601 602 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EZJ operation, int dst, RegisterID regOp1Tag, RegisterID regOp1Payload)603 {604 setupArgumentsWithExecState(TrustedImm32(dst), regOp1Payload, regOp1Tag);605 593 return appendCallWithExceptionCheck(operation); 606 594 } -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r175509 r175512 445 445 void JIT::emit_op_push_with_scope(Instruction* currentInstruction) 446 446 { 447 int dst = currentInstruction[1].u.operand;448 447 emitGetVirtualRegister(currentInstruction[2].u.operand, regT0); 449 callOperation(operationPushWithScope, dst, regT0); 450 } 451 452 void JIT::emit_op_pop_scope(Instruction* currentInstruction) 453 { 454 int scope = currentInstruction[1].u.operand; 455 456 callOperation(operationPopScope, scope); 448 callOperation(operationPushWithScope, regT0); 449 } 450 451 void JIT::emit_op_pop_scope(Instruction*) 452 { 453 callOperation(operationPopScope); 457 454 } 458 455 … … 510 507 void JIT::emit_op_push_name_scope(Instruction* currentInstruction) 511 508 { 512 int dst = currentInstruction[1].u.operand;513 509 emitGetVirtualRegister(currentInstruction[3].u.operand, regT0); 514 callOperation(operationPushNameScope, dst,&m_codeBlock->identifier(currentInstruction[2].u.operand), regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand);510 callOperation(operationPushNameScope, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand); 515 511 } 516 512 -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r175509 r175512 38 38 #include "JSEnvironmentRecord.h" 39 39 #include "JSFunction.h" 40 #include "JSNameScope.h"41 40 #include "JSPropertyNameEnumerator.h" 42 41 #include "LinkBuffer.h" … … 754 753 void JIT::emit_op_push_with_scope(Instruction* currentInstruction) 755 754 { 756 int dst = currentInstruction[1].u.operand;757 755 emitLoad(currentInstruction[2].u.operand, regT1, regT0); 758 callOperation(operationPushWithScope, dst, regT1, regT0); 759 } 760 761 void JIT::emit_op_pop_scope(Instruction* currentInstruction) 762 { 763 int scope = currentInstruction[1].u.operand; 764 callOperation(operationPopScope, scope); 756 callOperation(operationPushWithScope, regT1, regT0); 757 } 758 759 void JIT::emit_op_pop_scope(Instruction*) 760 { 761 callOperation(operationPopScope); 765 762 } 766 763 … … 790 787 void JIT::emit_op_push_name_scope(Instruction* currentInstruction) 791 788 { 792 int dst = currentInstruction[1].u.operand;793 789 emitLoad(currentInstruction[3].u.operand, regT1, regT0); 794 if (currentInstruction[5].u.operand == JSNameScope::CatchScope) { 795 callOperation(operationPushCatchScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand); 796 return; 797 } 798 799 RELEASE_ASSERT(currentInstruction[5].u.operand == JSNameScope::FunctionNameScope); 800 callOperation(operationPushFunctionNameScope, dst, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand); 790 callOperation(operationPushNameScope, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1, regT0, currentInstruction[4].u.operand, currentInstruction[5].u.operand); 801 791 } 802 792 -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r175509 r175512 1309 1309 #endif 1310 1310 1311 void JIT_OPERATION operationPushNameScope(ExecState* exec, int32_t dst,Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes, int32_t type)1311 void JIT_OPERATION operationPushNameScope(ExecState* exec, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes, int32_t type) 1312 1312 { 1313 1313 VM& vm = exec->vm(); … … 1317 1317 JSNameScope* scope = JSNameScope::create(exec, *identifier, JSValue::decode(encodedValue), attibutes, scopeType); 1318 1318 1319 exec->uncheckedR(dst) = scope; 1320 } 1321 1322 #if USE(JSVALUE32_64) 1323 void JIT_OPERATION operationPushCatchScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes) 1324 { 1325 operationPushNameScope(exec, dst, identifier, encodedValue, attibutes, JSNameScope::CatchScope); 1326 } 1327 1328 void JIT_OPERATION operationPushFunctionNameScope(ExecState* exec, int32_t dst, Identifier* identifier, EncodedJSValue encodedValue, int32_t attibutes) 1329 { 1330 operationPushNameScope(exec, dst, identifier, encodedValue, attibutes, JSNameScope::FunctionNameScope); 1331 } 1332 #endif 1333 1334 void JIT_OPERATION operationPushWithScope(ExecState* exec, int32_t dst, EncodedJSValue encodedValue) 1319 exec->setScope(scope); 1320 } 1321 1322 void JIT_OPERATION operationPushWithScope(ExecState* exec, EncodedJSValue encodedValue) 1335 1323 { 1336 1324 VM& vm = exec->vm(); … … 1341 1329 return; 1342 1330 1343 exec->uncheckedR(dst) = JSWithScope::create(exec, o); 1344 } 1345 1346 void JIT_OPERATION operationPopScope(ExecState* exec, int32_t scopeReg) 1347 { 1348 VM& vm = exec->vm(); 1349 NativeCallFrameTracer tracer(&vm, exec); 1350 1351 JSScope* scope = exec->uncheckedR(scopeReg).Register::scope(); 1352 exec->uncheckedR(scopeReg) = scope->next(); 1331 exec->setScope(JSWithScope::create(exec, o)); 1332 } 1333 1334 void JIT_OPERATION operationPopScope(ExecState* exec) 1335 { 1336 VM& vm = exec->vm(); 1337 NativeCallFrameTracer tracer(&vm, exec); 1338 1339 exec->setScope(exec->scope()->next()); 1353 1340 } 1354 1341 -
trunk/Source/JavaScriptCore/jit/JITOperations.h
r175509 r175512 165 165 typedef void JIT_OPERATION (*V_JITOperation_ECZ)(ExecState*, JSCell*, int32_t); 166 166 typedef void JIT_OPERATION (*V_JITOperation_ECC)(ExecState*, JSCell*, JSCell*); 167 #if USE(JSVALUE64) 168 typedef void JIT_OPERATION (*V_JITOperation_EZIdJZZ)(ExecState*, int, Identifier*, EncodedJSValue, int32_t, int32_t); 169 #else 170 typedef void JIT_OPERATION (*V_JITOperation_EZIdJZ)(ExecState*, int, Identifier*, EncodedJSValue, int32_t); 171 #endif 167 typedef void JIT_OPERATION (*V_JITOperation_EIdJZZ)(ExecState*, Identifier*, EncodedJSValue, int32_t, int32_t); 172 168 typedef void JIT_OPERATION (*V_JITOperation_EJ)(ExecState*, EncodedJSValue); 173 169 typedef void JIT_OPERATION (*V_JITOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, StringImpl*); … … 184 180 typedef void JIT_OPERATION (*V_JITOperation_EVwsJ)(ExecState*, VariableWatchpointSet*, EncodedJSValue); 185 181 typedef void JIT_OPERATION (*V_JITOperation_EZ)(ExecState*, int32_t); 186 typedef void JIT_OPERATION (*V_JITOperation_EZJ)(ExecState*, int32_t, EncodedJSValue);187 182 typedef void JIT_OPERATION (*V_JITOperation_EVm)(ExecState*, VM*); 188 183 typedef void JIT_OPERATION (*V_JITOperation_J)(EncodedJSValue); … … 282 277 #else 283 278 void JIT_OPERATION operationPutGetterSetter(ExecState*, JSCell*, Identifier*, JSCell*, JSCell*) WTF_INTERNAL; 284 void JIT_OPERATION operationPushCatchScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t) WTF_INTERNAL;285 void JIT_OPERATION operationPushFunctionNameScope(ExecState*, int32_t, Identifier*, EncodedJSValue, int32_t) WTF_INTERNAL;286 279 #endif 287 void JIT_OPERATION operationPushNameScope(ExecState*, int32_t,Identifier*, EncodedJSValue, int32_t, int32_t) WTF_INTERNAL;288 void JIT_OPERATION operationPushWithScope(ExecState*, int32_t,EncodedJSValue) WTF_INTERNAL;289 void JIT_OPERATION operationPopScope(ExecState* , int32_t) WTF_INTERNAL;280 void JIT_OPERATION operationPushNameScope(ExecState*, Identifier*, EncodedJSValue, int32_t, int32_t) WTF_INTERNAL; 281 void JIT_OPERATION operationPushWithScope(ExecState*, EncodedJSValue) WTF_INTERNAL; 282 void JIT_OPERATION operationPopScope(ExecState*) WTF_INTERNAL; 290 283 void JIT_OPERATION operationProfileDidCall(ExecState*, EncodedJSValue) WTF_INTERNAL; 291 284 void JIT_OPERATION operationProfileWillCall(ExecState*, EncodedJSValue) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r175509 r175512 1274 1274 LLINT_CHECK_EXCEPTION(); 1275 1275 1276 exec-> uncheckedR(pc[1].u.operand) = JSWithScope::create(exec, o);1276 exec->setScope(JSWithScope::create(exec, o)); 1277 1277 1278 1278 LLINT_END(); … … 1282 1282 { 1283 1283 LLINT_BEGIN(); 1284 int scopeReg = pc[1].u.operand; 1285 JSScope* scope = exec->uncheckedR(scopeReg).Register::scope(); 1286 exec->uncheckedR(scopeReg) = scope->next(); 1284 exec->setScope(exec->scope()->next()); 1287 1285 LLINT_END(); 1288 1286 } … … 1294 1292 JSNameScope::Type type = static_cast<JSNameScope::Type>(pc[5].u.operand); 1295 1293 JSNameScope* scope = JSNameScope::create(exec, codeBlock->identifier(pc[2].u.operand), LLINT_OP(3).jsValue(), pc[4].u.operand, type); 1296 exec-> uncheckedR(pc[1].u.operand) = scope;1294 exec->setScope(scope); 1297 1295 LLINT_END(); 1298 1296 }
Note: See TracChangeset
for help on using the changeset viewer.