diff options
Diffstat (limited to 'deps/v8/src/code-factory.cc')
-rw-r--r-- | deps/v8/src/code-factory.cc | 56 |
1 files changed, 39 insertions, 17 deletions
diff --git a/deps/v8/src/code-factory.cc b/deps/v8/src/code-factory.cc index 590dbbb027..71c5449aaa 100644 --- a/deps/v8/src/code-factory.cc +++ b/deps/v8/src/code-factory.cc @@ -12,6 +12,15 @@ namespace v8 { namespace internal { // static +Callable CodeFactory::LoadGlobalIC(Isolate* isolate, + Handle<GlobalObject> global, + Handle<String> name) { + return Callable(LoadIC::load_global(isolate, global, name), + LoadDescriptor(isolate)); +} + + +// static Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) { return Callable( LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()), @@ -20,14 +29,15 @@ Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) { // static -Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate, - ContextualMode mode) { +Callable CodeFactory::LoadICInOptimizedCode( + Isolate* isolate, ContextualMode mode, + InlineCacheState initialization_state) { + auto code = LoadIC::initialize_stub_in_optimized_code( + isolate, LoadICState(mode).GetExtraICState(), initialization_state); if (FLAG_vector_ics) { - return Callable(LoadIC::initialize_stub_in_optimized_code( - isolate, LoadICState(mode).GetExtraICState()), - VectorLoadICDescriptor(isolate)); + return Callable(code, VectorLoadICDescriptor(isolate)); } - return CodeFactory::LoadIC(isolate, mode); + return Callable(code, LoadDescriptor(isolate)); } @@ -39,12 +49,14 @@ Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { // static -Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { +Callable CodeFactory::KeyedLoadICInOptimizedCode( + Isolate* isolate, InlineCacheState initialization_state) { + auto code = KeyedLoadIC::initialize_stub_in_optimized_code( + isolate, initialization_state); if (FLAG_vector_ics) { - return Callable(KeyedLoadIC::initialize_stub_in_optimized_code(isolate), - VectorLoadICDescriptor(isolate)); + return Callable(code, VectorLoadICDescriptor(isolate)); } - return CodeFactory::KeyedLoadIC(isolate); + return Callable(code, LoadDescriptor(isolate)); } @@ -67,25 +79,35 @@ Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, // static Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { - return Callable(StoreIC::initialize_stub(isolate, language_mode), - StoreDescriptor(isolate)); + return Callable( + StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), + StoreDescriptor(isolate)); } // static Callable CodeFactory::KeyedStoreIC(Isolate* isolate, LanguageMode language_mode) { - Handle<Code> ic = is_strict(language_mode) - ? isolate->builtins()->KeyedStoreIC_Initialize_Strict() - : isolate->builtins()->KeyedStoreIC_Initialize(); - return Callable(ic, StoreDescriptor(isolate)); + return Callable( + KeyedStoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), + StoreDescriptor(isolate)); +} + + +// static +Callable CodeFactory::KeyedStoreICInOptimizedCode( + Isolate* isolate, LanguageMode language_mode, + InlineCacheState initialization_state) { + return Callable(KeyedStoreIC::initialize_stub(isolate, language_mode, + initialization_state), + StoreDescriptor(isolate)); } // static Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { Handle<Code> code = CompareIC::GetUninitialized(isolate, op); - return Callable(code, BinaryOpDescriptor(isolate)); + return Callable(code, CompareDescriptor(isolate)); } |