Index: src/code-factory.h |
diff --git a/src/code-factory.h b/src/code-factory.h |
index 7e96a7f395336fbe1556039cae4baa2f5ccb517f..81b1997f2a37c948457c7d5715a2334f18b39bac 100644 |
--- a/src/code-factory.h |
+++ b/src/code-factory.h |
@@ -15,7 +15,7 @@ namespace v8 { |
namespace internal { |
// Associates a body of code with an interface descriptor. |
-class Callable final BASE_EMBEDDED { |
+class Callable BASE_EMBEDDED { |
public: |
Callable(Handle<Code> code, CallInterfaceDescriptor descriptor) |
: code_(code), descriptor_(descriptor) {} |
@@ -28,17 +28,27 @@ class Callable final BASE_EMBEDDED { |
const CallInterfaceDescriptor descriptor_; |
}; |
+template <typename DescriptorT> |
+class CallableD final : public Callable { |
+ public: |
+ typedef DescriptorT Descriptor; |
+ |
+ CallableD(Handle<Code> code, Isolate* isolate) |
+ : Callable(code, Descriptor(isolate)) {} |
+}; |
class CodeFactory final { |
public: |
// Initial states for ICs. |
static Callable LoadIC(Isolate* isolate); |
- static Callable LoadICInOptimizedCode(Isolate* isolate); |
+ static CallableD<LoadWithVectorDescriptor> LoadICInOptimizedCode( |
+ Isolate* isolate); |
static Callable LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode); |
- static Callable LoadGlobalICInOptimizedCode(Isolate* isolate, |
- TypeofMode typeof_mode); |
+ static CallableD<LoadGlobalWithVectorDescriptor> LoadGlobalICInOptimizedCode( |
+ Isolate* isolate, TypeofMode typeof_mode); |
static Callable KeyedLoadIC(Isolate* isolate); |
- static Callable KeyedLoadICInOptimizedCode(Isolate* isolate); |
+ static CallableD<LoadWithVectorDescriptor> KeyedLoadICInOptimizedCode( |
+ Isolate* isolate); |
static Callable KeyedLoadIC_Megamorphic(Isolate* isolate); |
static Callable CallIC(Isolate* isolate, int argc, |
ConvertReceiverMode mode = ConvertReceiverMode::kAny, |
@@ -48,10 +58,11 @@ class CodeFactory final { |
ConvertReceiverMode mode = ConvertReceiverMode::kAny, |
TailCallMode tail_call_mode = TailCallMode::kDisallow); |
static Callable StoreIC(Isolate* isolate, LanguageMode mode); |
- static Callable StoreICInOptimizedCode(Isolate* isolate, LanguageMode mode); |
+ static CallableD<StoreWithVectorDescriptor> StoreICInOptimizedCode( |
+ Isolate* isolate, LanguageMode mode); |
static Callable KeyedStoreIC(Isolate* isolate, LanguageMode mode); |
- static Callable KeyedStoreICInOptimizedCode(Isolate* isolate, |
- LanguageMode mode); |
+ static CallableD<StoreWithVectorDescriptor> KeyedStoreICInOptimizedCode( |
+ Isolate* isolate, LanguageMode mode); |
static Callable ResumeGenerator(Isolate* isolate); |