Changeset 156677 in webkit for trunk/Source/JavaScriptCore/runtime/Arguments.cpp
- Timestamp:
- Sep 30, 2013, 1:38:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Arguments.cpp
r156602 r156677 357 357 m_registers = m_registerArray.get() - CallFrame::offsetFor(1) - 1; 358 358 359 tearOffForInlineCallFrame(360 callFrame->vm(), callFrame->registers() + inlineCallFrame->stackOffset,361 inlineCallFrame);362 }363 364 void Arguments::tearOffForInlineCallFrame(VM& vm, Register* registers, InlineCallFrame* inlineCallFrame)365 {366 359 for (size_t i = 0; i < m_numArguments; ++i) { 367 360 ValueRecovery& recovery = inlineCallFrame->arguments[i + 1]; 368 // In the future we'll support displaced recoveries (indicating that the 369 // argument was flushed to a different location), but for now we don't do 370 // that so this code will fail if that were to happen. On the other hand, 371 // it's much less likely that we'll support in-register recoveries since 372 // this code does not (easily) have access to registers. 373 JSValue value; 374 Register* location = ®isters[CallFrame::argumentOffset(i)]; 375 switch (recovery.technique()) { 376 case AlreadyInJSStack: 377 value = location->jsValue(); 378 break; 379 case AlreadyInJSStackAsUnboxedInt32: 380 value = jsNumber(location->unboxedInt32()); 381 break; 382 case AlreadyInJSStackAsUnboxedInt52: 383 value = jsNumber(location->unboxedInt52()); 384 break; 385 case AlreadyInJSStackAsUnboxedCell: 386 value = location->unboxedCell(); 387 break; 388 case AlreadyInJSStackAsUnboxedBoolean: 389 value = jsBoolean(location->unboxedBoolean()); 390 break; 391 case AlreadyInJSStackAsUnboxedDouble: 392 #if USE(JSVALUE64) 393 value = jsNumber(*bitwise_cast<double*>(location)); 394 #else 395 value = location->jsValue(); 396 #endif 397 break; 398 case Constant: 399 value = recovery.constant(); 400 break; 401 default: 402 RELEASE_ASSERT_NOT_REACHED(); 403 break; 404 } 405 trySetArgument(vm, i, value); 361 trySetArgument(callFrame->vm(), i, recovery.recover(callFrame)); 406 362 } 407 363 }
Note:
See TracChangeset
for help on using the changeset viewer.