diff --git a/src/code-stubs.h b/src/code-stubs.h index fb2fbe55df..dd1d34bdfb 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -294,6 +294,30 @@ class CodeStub BASE_EMBEDDED { }; +// TODO(svenpanne) This class is only used to construct a more or less sensible +// CompilationInfo for testing purposes, basically pretending that we are +// currently compiling some kind of code stub. Remove this when the pipeline and +// testing machinery is restructured in such a way that we don't have to come up +// with a CompilationInfo out of thin air, although we only need a few parts of +// it. +struct FakeStubForTesting : public CodeStub { + explicit FakeStubForTesting(Isolate* isolate) : CodeStub(isolate) {} + + // Only used by pipeline.cc's GetDebugName in DEBUG mode. + Major MajorKey() const OVERRIDE { return CodeStub::NoCache; } + + CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { + UNREACHABLE(); + return CallInterfaceDescriptor(); + } + + Handle GenerateCode() OVERRIDE { + UNREACHABLE(); + return Handle(); + } +}; + + #define DEFINE_CODE_STUB_BASE(NAME, SUPER) \ public: \ NAME(uint32_t key, Isolate* isolate) : SUPER(key, isolate) {} \ diff --git a/src/compiler.cc b/src/compiler.cc index 73f601a566..c1e852bdac 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -63,21 +63,6 @@ CompilationInfo::CompilationInfo(Handle