Changeset 264804 in webkit for trunk/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
- Timestamp:
- Jul 23, 2020, 4:08:19 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
r262098 r264804 71 71 dataLogLnIf(Options::verboseOSR(), " Values at entry: ", values); 72 72 73 Optional<JSValue> reconstructedThis; 73 74 for (int argument = values.numberOfArguments(); argument--;) { 74 75 JSValue valueOnStack = callFrame->r(virtualRegisterForArgumentIncludingThis(argument)).asanUnsafeJSValue(); 75 76 Optional<JSValue> reconstructedValue = values.argument(argument); 76 if ((reconstructedValue && valueOnStack == reconstructedValue.value()) || !argument) 77 if (!argument) { 78 // |this| argument can be unboxed. We should store boxed value instead for loop OSR entry since FTL assumes that all arguments are flushed JSValue. 79 // To make this valid, we will modify the stack on the fly: replacing the value with boxed value. 80 reconstructedThis = reconstructedValue; 81 continue; 82 } 83 if (reconstructedValue && valueOnStack == reconstructedValue.value()) 77 84 continue; 78 85 dataLog("Mismatch between reconstructed values and the value on the stack for argument arg", argument, " for ", *entryCodeBlock, " at ", bytecodeIndex, ":\n"); … … 106 113 void* result = entryCode->addressForCall(ArityCheckNotRequired).executableAddress(); 107 114 dataLogLnIf(Options::verboseOSR(), " Entry will succeed, going to address ", RawPointer(result)); 115 116 // At this point, we're committed to triggering an OSR entry immediately after we return. Hence, it is safe to modify stack here. 117 if (result) { 118 if (reconstructedThis) 119 callFrame->r(virtualRegisterForArgumentIncludingThis(0)) = JSValue::encode(reconstructedThis.value()); 120 } 108 121 109 122 return result;
Note:
See TracChangeset
for help on using the changeset viewer.