• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_CALLABLE_H_
6 #define V8_CALLABLE_H_
7 
8 #include "src/allocation.h"
9 #include "src/interface-descriptors.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 class Code;
15 
16 // Associates a body of code with an interface descriptor.
17 class Callable final BASE_EMBEDDED {
18  public:
Callable(Handle<Code> code,CallInterfaceDescriptor descriptor)19   Callable(Handle<Code> code, CallInterfaceDescriptor descriptor)
20       : code_(code), descriptor_(descriptor) {}
21 
code()22   Handle<Code> code() const { return code_; }
descriptor()23   CallInterfaceDescriptor descriptor() const { return descriptor_; }
24 
25  private:
26   const Handle<Code> code_;
27   const CallInterfaceDescriptor descriptor_;
28 };
29 
30 }  // namespace internal
31 }  // namespace v8
32 
33 #endif  // V8_CALLABLE_H_
34