summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
commit41386e9cb918eed93b3f13648cbef387e371e451 (patch)
treea97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/ftl/FTLOSREntry.cpp
parente15dd966d523731101f70ccf768bba12435a0208 (diff)
downloadWebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLOSREntry.cpp')
-rw-r--r--Source/JavaScriptCore/ftl/FTLOSREntry.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLOSREntry.cpp b/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
index 5429eaeb6..185046054 100644
--- a/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
+++ b/Source/JavaScriptCore/ftl/FTLOSREntry.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,20 +32,17 @@
#include "FTLForOSREntryJITCode.h"
#include "JSStackInlines.h"
#include "OperandsInlines.h"
-#include "JSCInlines.h"
#if ENABLE(FTL_JIT)
namespace JSC { namespace FTL {
-SUPPRESS_ASAN
void* prepareOSREntry(
ExecState* exec, CodeBlock* dfgCodeBlock, CodeBlock* entryCodeBlock,
unsigned bytecodeIndex, unsigned streamIndex)
{
VM& vm = exec->vm();
CodeBlock* baseline = dfgCodeBlock->baselineVersion();
- ExecutableBase* executable = dfgCodeBlock->ownerExecutable();
DFG::JITCode* dfgCode = dfgCodeBlock->jitCode()->dfg();
ForOSREntryJITCode* entryCode = entryCodeBlock->jitCode()->ftlForOSREntry();
@@ -55,12 +52,9 @@ void* prepareOSREntry(
bytecodeIndex, ".\n");
}
- if (bytecodeIndex)
- jsCast<ScriptExecutable*>(executable)->setDidTryToEnterInLoop(true);
-
if (bytecodeIndex != entryCode->bytecodeIndex()) {
if (Options::verboseOSR())
- dataLog(" OSR failed because we don't have an entrypoint for bc#", bytecodeIndex, "; ours is for bc#", entryCode->bytecodeIndex(), "\n");
+ dataLog(" OSR failed because we don't have an entrypoint for bc#", bytecodeIndex, "; ours is for bc#", entryCode->bytecodeIndex());
return 0;
}
@@ -72,14 +66,8 @@ void* prepareOSREntry(
dataLog(" Values at entry: ", values, "\n");
for (int argument = values.numberOfArguments(); argument--;) {
- JSValue valueOnStack = exec->r(virtualRegisterForArgument(argument).offset()).asanUnsafeJSValue();
- JSValue reconstructedValue = values.argument(argument);
- if (valueOnStack == reconstructedValue || !argument)
- continue;
- dataLog("Mismatch between reconstructed values and the the value on the stack for argument arg", argument, " for ", *entryCodeBlock, " at bc#", bytecodeIndex, ":\n");
- dataLog(" Value on stack: ", valueOnStack, "\n");
- dataLog(" Reconstructed value: ", reconstructedValue, "\n");
- RELEASE_ASSERT_NOT_REACHED();
+ RELEASE_ASSERT(
+ exec->r(virtualRegisterForArgument(argument).offset()).jsValue() == values.argument(argument));
}
RELEASE_ASSERT(
@@ -92,7 +80,7 @@ void* prepareOSREntry(
scratch[local] = JSValue::encode(values.local(local));
int stackFrameSize = entryCode->common.requiredRegisterCountForExecutionAndExit();
- if (!vm.interpreter->stack().ensureCapacityFor(&exec->registers()[virtualRegisterForLocal(stackFrameSize - 1).offset()])) {
+ if (!vm.interpreter->stack().grow(&exec->registers()[virtualRegisterForLocal(stackFrameSize).offset()])) {
if (Options::verboseOSR())
dataLog(" OSR failed because stack growth failed.\n");
return 0;
@@ -100,9 +88,7 @@ void* prepareOSREntry(
exec->setCodeBlock(entryCodeBlock);
- void* result = entryCode->addressForCall(
- vm, executable, ArityCheckNotRequired,
- RegisterPreservationNotRequired).executableAddress();
+ void* result = entryCode->addressForCall().executableAddress();
if (Options::verboseOSR())
dataLog(" Entry will succeed, going to address", RawPointer(result), "\n");