Changeset 50982 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- Nov 13, 2009, 5:07:01 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/jit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.h
r50981 r50982 467 467 static const int patchOffsetMethodCheckPutFunction = 29; 468 468 #elif PLATFORM(ARM_TRADITIONAL) 469 // patchOffset... values should go here; JIT optimizations currently not supported on ARM with JSVALUE32_64. 469 // These architecture specific value are used to enable patching - see comment on op_put_by_id. 470 static const int patchOffsetPutByIdStructure = 4; 471 static const int patchOffsetPutByIdExternalLoad = 16; 472 static const int patchLengthPutByIdExternalLoad = 4; 473 static const int patchOffsetPutByIdPropertyMapOffset1 = 20; 474 static const int patchOffsetPutByIdPropertyMapOffset2 = 28; 475 // These architecture specific value are used to enable patching - see comment on op_get_by_id. 476 static const int patchOffsetGetByIdStructure = 4; 477 static const int patchOffsetGetByIdBranchToSlowCase = 16; 478 static const int patchOffsetGetByIdExternalLoad = 16; 479 static const int patchLengthGetByIdExternalLoad = 4; 480 static const int patchOffsetGetByIdPropertyMapOffset1 = 20; 481 static const int patchOffsetGetByIdPropertyMapOffset2 = 28; 482 static const int patchOffsetGetByIdPutResult = 36; 483 #if ENABLE(OPCODE_SAMPLING) 484 #error "OPCODE_SAMPLING is not yet supported" 485 #else 486 static const int patchOffsetGetByIdSlowCaseCall = 32; 487 #endif 488 static const int patchOffsetOpCallCompareToJump = 12; 489 490 static const int patchOffsetMethodCheckProtoObj = 12; 491 static const int patchOffsetMethodCheckProtoStruct = 20; 492 static const int patchOffsetMethodCheckPutFunction = 32; 493 494 // sequenceOpCall 495 static const int sequenceOpCallInstructionSpace = 12; 496 static const int sequenceOpCallConstantSpace = 2; 497 // sequenceMethodCheck 498 static const int sequenceMethodCheckInstructionSpace = 40; 499 static const int sequenceMethodCheckConstantSpace = 6; 500 // sequenceGetByIdHotPath 501 static const int sequenceGetByIdHotPathInstructionSpace = 36; 502 static const int sequenceGetByIdHotPathConstantSpace = 4; 503 // sequenceGetByIdSlowCase 504 static const int sequenceGetByIdSlowCaseInstructionSpace = 40; 505 static const int sequenceGetByIdSlowCaseConstantSpace = 2; 506 // sequencePutById 507 static const int sequencePutByIdInstructionSpace = 36; 508 static const int sequencePutByIdConstantSpace = 4; 470 509 #else 471 510 #error "JSVALUE32_64 not supported on this platform." … … 632 671 static const int patchOffsetMethodCheckProtoStruct = 20; 633 672 static const int patchOffsetMethodCheckPutFunction = 32; 634 #endif 635 #endif // USE(JSVALUE32_64) 636 637 #if PLATFORM(ARM_TRADITIONAL) 673 638 674 // sequenceOpCall 639 675 static const int sequenceOpCallInstructionSpace = 12; … … 652 688 static const int sequencePutByIdConstantSpace = 3; 653 689 #endif 690 #endif // USE(JSVALUE32_64) 654 691 655 692 #if defined(ASSEMBLER_HAS_CONSTANT_POOL) && ASSEMBLER_HAS_CONSTANT_POOL -
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r50254 r50982 213 213 emitJumpSlowCaseIfNotJSCell(base, regT1); 214 214 215 BEGIN_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); 216 215 217 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), info.structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); 216 218 DataLabelPtr protoStructureToCompare, protoObj = moveWithPatch(ImmPtr(0), regT2); … … 219 221 // This will be relinked to load the function without doing a load. 220 222 DataLabelPtr putFunction = moveWithPatch(ImmPtr(0), regT0); 223 224 END_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); 225 221 226 move(Imm32(JSValue::CellTag), regT1); 222 227 Jump match = jump(); … … 375 380 // to array-length / prototype access tranpolines, and finally we also the the property-map access offset as a label 376 381 // to jump back to if one of these trampolies finds a match. 382 383 BEGIN_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); 384 377 385 Label hotPathBegin(this); 378 386 m_propertyAccessCompilationInfo[m_propertyAccessInstructionIndex].hotPathBegin = hotPathBegin; … … 397 405 Label putResult(this); 398 406 ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult); 407 408 END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); 399 409 } 400 410 … … 418 428 linkSlowCase(iter); 419 429 430 BEGIN_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); 431 432 #ifndef NDEBUG 420 433 Label coldPathBegin(this); 421 434 #endif 422 435 JITStubCall stubCall(this, isMethodCheck ? cti_op_get_by_id_method_check : cti_op_get_by_id); 423 436 stubCall.addArgument(regT1, regT0); … … 425 438 Call call = stubCall.call(dst); 426 439 440 END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); 441 427 442 ASSERT(differenceBetween(coldPathBegin, call) == patchOffsetGetByIdSlowCaseCall); 428 443 … … 444 459 445 460 emitJumpSlowCaseIfNotJSCell(base, regT1); 461 462 BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById); 446 463 447 464 Label hotPathBegin(this); … … 462 479 DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT0, patchGetByIdDefaultOffset)); // payload 463 480 DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT0, patchGetByIdDefaultOffset)); // tag 481 482 END_UNINTERRUPTED_SEQUENCE(sequencePutById); 483 464 484 ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1); 465 485 ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2);
Note:
See TracChangeset
for help on using the changeset viewer.