/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#include "DFGNode.h"
#include "DFGPlan.h"
#include "JSCInlines.h"
+#include "TrackedReferences.h"
#include "VM.h"
namespace JSC { namespace DFG {
plan.transitions.addLazily(
codeBlock,
node->origin.semantic.codeOriginOwner(),
- node->structureTransitionData().previousStructure,
- node->structureTransitionData().newStructure);
+ node->transition()->previous,
+ node->transition()->next);
}
unsigned CommonData::addCodeOrigin(CodeOrigin codeOrigin)
return true;
}
+void CommonData::validateReferences(const TrackedReferences& trackedReferences)
+{
+ if (InlineCallFrameSet* set = inlineCallFrames.get()) {
+ for (InlineCallFrame* inlineCallFrame : *set) {
+ for (ValueRecovery& recovery : inlineCallFrame->arguments) {
+ if (recovery.isConstant())
+ trackedReferences.check(recovery.constant());
+ }
+
+ if (ScriptExecutable* executable = inlineCallFrame->executable.get())
+ trackedReferences.check(executable);
+
+ if (inlineCallFrame->calleeRecovery.isConstant())
+ trackedReferences.check(inlineCallFrame->calleeRecovery.constant());
+ }
+ }
+}
+
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)