Home | History | Annotate | Download | only in builtins
      1 // Copyright 2016 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 #include "src/builtins/builtins-utils.h"
      6 #include "src/builtins/builtins.h"
      7 #include "src/ic/accessor-assembler.h"
      8 #include "src/objects-inl.h"
      9 
     10 namespace v8 {
     11 namespace internal {
     12 
     13 #define IC_BUILTIN(Name)                                                \
     14   void Builtins::Generate_##Name(compiler::CodeAssemblerState* state) { \
     15     AccessorAssembler assembler(state);                                 \
     16     assembler.Generate##Name();                                         \
     17   }
     18 
     19 #define IC_BUILTIN_PARAM(BuiltinName, GeneratorName, parameter)                \
     20   void Builtins::Generate_##BuiltinName(compiler::CodeAssemblerState* state) { \
     21     AccessorAssembler assembler(state);                                        \
     22     assembler.Generate##GeneratorName(parameter);                              \
     23   }
     24 
     25 IC_BUILTIN(LoadIC)
     26 IC_BUILTIN(KeyedLoadIC)
     27 IC_BUILTIN(LoadICTrampoline)
     28 IC_BUILTIN(LoadField)
     29 IC_BUILTIN(KeyedLoadICTrampoline)
     30 IC_BUILTIN(KeyedLoadIC_Megamorphic)
     31 IC_BUILTIN(StoreIC)
     32 IC_BUILTIN(StoreICTrampoline)
     33 
     34 IC_BUILTIN_PARAM(StoreICStrict, StoreIC, /* no param */)
     35 IC_BUILTIN_PARAM(StoreICStrictTrampoline, StoreICTrampoline, /* no param */)
     36 
     37 IC_BUILTIN_PARAM(KeyedStoreIC, KeyedStoreIC, SLOPPY)
     38 IC_BUILTIN_PARAM(KeyedStoreICTrampoline, KeyedStoreICTrampoline, SLOPPY)
     39 IC_BUILTIN_PARAM(KeyedStoreICStrict, KeyedStoreIC, STRICT)
     40 IC_BUILTIN_PARAM(KeyedStoreICStrictTrampoline, KeyedStoreICTrampoline, STRICT)
     41 IC_BUILTIN_PARAM(LoadGlobalIC, LoadGlobalIC, NOT_INSIDE_TYPEOF)
     42 IC_BUILTIN_PARAM(LoadGlobalICInsideTypeof, LoadGlobalIC, INSIDE_TYPEOF)
     43 IC_BUILTIN_PARAM(LoadGlobalICTrampoline, LoadGlobalICTrampoline,
     44                  NOT_INSIDE_TYPEOF)
     45 IC_BUILTIN_PARAM(LoadGlobalICInsideTypeofTrampoline, LoadGlobalICTrampoline,
     46                  INSIDE_TYPEOF)
     47 IC_BUILTIN_PARAM(LoadICProtoArray, LoadICProtoArray, false)
     48 IC_BUILTIN_PARAM(LoadICProtoArrayThrowIfNonexistent, LoadICProtoArray, true)
     49 
     50 }  // namespace internal
     51 }  // namespace v8
     52