| Index: src/code-factory.cc
|
| diff --git a/src/code-factory.cc b/src/code-factory.cc
|
| index 63cd5d0765e6d5c6a55bba10316806eb8cf9260e..e2c008547e6431d6f1471a9558a4edba1a024e10 100644
|
| --- a/src/code-factory.cc
|
| +++ b/src/code-factory.cc
|
| @@ -19,6 +19,13 @@ Callable make_callable(Stub& stub) {
|
| return Callable(stub.GetCode(), Descriptor(stub.isolate()));
|
| }
|
|
|
| +// TODO(ishell): make it (const Stub& stub) once CodeStub::GetCode() is const.
|
| +template <typename Stub>
|
| +CallableD<typename Stub::Descriptor> make_callableD(Stub& stub) {
|
| + typedef typename Stub::Descriptor Descriptor;
|
| + return CallableD<Descriptor>(stub.GetCode(), stub.isolate());
|
| +}
|
| +
|
| } // namespace
|
|
|
| // static
|
| @@ -38,13 +45,14 @@ Callable CodeFactory::ApiGetter(Isolate* isolate) {
|
| }
|
|
|
| // static
|
| -Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate) {
|
| +CallableD<LoadWithVectorDescriptor> CodeFactory::LoadICInOptimizedCode(
|
| + Isolate* isolate) {
|
| if (FLAG_tf_load_ic_stub) {
|
| LoadICTFStub stub(isolate);
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
| LoadICStub stub(isolate);
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
|
|
| // static
|
| @@ -54,10 +62,11 @@ Callable CodeFactory::LoadGlobalIC(Isolate* isolate, TypeofMode typeof_mode) {
|
| }
|
|
|
| // static
|
| -Callable CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate,
|
| - TypeofMode typeof_mode) {
|
| +CallableD<LoadGlobalWithVectorDescriptor>
|
| +CodeFactory::LoadGlobalICInOptimizedCode(Isolate* isolate,
|
| + TypeofMode typeof_mode) {
|
| LoadGlobalICStub stub(isolate, LoadGlobalICState(typeof_mode));
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
|
|
| // static
|
| @@ -71,13 +80,14 @@ Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
|
| }
|
|
|
| // static
|
| -Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) {
|
| +CallableD<LoadWithVectorDescriptor> CodeFactory::KeyedLoadICInOptimizedCode(
|
| + Isolate* isolate) {
|
| if (FLAG_tf_load_ic_stub) {
|
| KeyedLoadICTFStub stub(isolate);
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
| KeyedLoadICStub stub(isolate);
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
|
|
| // static
|
| @@ -109,10 +119,10 @@ Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
|
| }
|
|
|
| // static
|
| -Callable CodeFactory::StoreICInOptimizedCode(Isolate* isolate,
|
| - LanguageMode language_mode) {
|
| +CallableD<StoreWithVectorDescriptor> CodeFactory::StoreICInOptimizedCode(
|
| + Isolate* isolate, LanguageMode language_mode) {
|
| StoreICStub stub(isolate, StoreICState(language_mode));
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
|
|
| // static
|
| @@ -123,10 +133,10 @@ Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
|
| }
|
|
|
| // static
|
| -Callable CodeFactory::KeyedStoreICInOptimizedCode(Isolate* isolate,
|
| - LanguageMode language_mode) {
|
| +CallableD<StoreWithVectorDescriptor> CodeFactory::KeyedStoreICInOptimizedCode(
|
| + Isolate* isolate, LanguageMode language_mode) {
|
| KeyedStoreICStub stub(isolate, StoreICState(language_mode));
|
| - return make_callable(stub);
|
| + return make_callableD(stub);
|
| }
|
|
|
| // static
|
|
|