Home | History | Annotate | Download | only in mips
      1 // Copyright 2010 the V8 project authors. All rights reserved.
      2 // Redistribution and use in source and binary forms, with or without
      3 // modification, are permitted provided that the following conditions are
      4 // met:
      5 //
      6 //     * Redistributions of source code must retain the above copyright
      7 //       notice, this list of conditions and the following disclaimer.
      8 //     * Redistributions in binary form must reproduce the above
      9 //       copyright notice, this list of conditions and the following
     10 //       disclaimer in the documentation and/or other materials provided
     11 //       with the distribution.
     12 //     * Neither the name of Google Inc. nor the names of its
     13 //       contributors may be used to endorse or promote products derived
     14 //       from this software without specific prior written permission.
     15 //
     16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27 
     28 #include "v8.h"
     29 
     30 #include "ic-inl.h"
     31 #include "codegen-inl.h"
     32 #include "stub-cache.h"
     33 
     34 namespace v8 {
     35 namespace internal {
     36 
     37 #define __ ACCESS_MASM(masm)
     38 
     39 
     40 void StubCache::GenerateProbe(MacroAssembler* masm,
     41                               Code::Flags flags,
     42                               Register receiver,
     43                               Register name,
     44                               Register scratch,
     45                               Register extra) {
     46   UNIMPLEMENTED_MIPS();
     47 }
     48 
     49 
     50 void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
     51                                                        int index,
     52                                                        Register prototype) {
     53   UNIMPLEMENTED_MIPS();
     54 }
     55 
     56 
     57 // Load a fast property out of a holder object (src). In-object properties
     58 // are loaded directly otherwise the property is loaded from the properties
     59 // fixed array.
     60 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
     61                                             Register dst, Register src,
     62                                             JSObject* holder, int index) {
     63   UNIMPLEMENTED_MIPS();
     64 }
     65 
     66 
     67 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
     68                                            Register receiver,
     69                                            Register scratch,
     70                                            Label* miss_label) {
     71   UNIMPLEMENTED_MIPS();
     72 }
     73 
     74 
     75 // Generate code to load the length from a string object and return the length.
     76 // If the receiver object is not a string or a wrapped string object the
     77 // execution continues at the miss label. The register containing the
     78 // receiver is potentially clobbered.
     79 void StubCompiler::GenerateLoadStringLength2(MacroAssembler* masm,
     80                                              Register receiver,
     81                                              Register scratch1,
     82                                              Register scratch2,
     83                                              Label* miss) {
     84   UNIMPLEMENTED_MIPS();
     85   __ break_(0x249);
     86 }
     87 
     88 
     89 void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
     90                                                  Register receiver,
     91                                                  Register scratch1,
     92                                                  Register scratch2,
     93                                                  Label* miss_label) {
     94   UNIMPLEMENTED_MIPS();
     95 }
     96 
     97 
     98 // Generate StoreField code, value is passed in r0 register.
     99 // After executing generated code, the receiver_reg and name_reg
    100 // may be clobbered.
    101 void StubCompiler::GenerateStoreField(MacroAssembler* masm,
    102                                       Builtins::Name storage_extend,
    103                                       JSObject* object,
    104                                       int index,
    105                                       Map* transition,
    106                                       Register receiver_reg,
    107                                       Register name_reg,
    108                                       Register scratch,
    109                                       Label* miss_label) {
    110   UNIMPLEMENTED_MIPS();
    111 }
    112 
    113 
    114 void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) {
    115   UNIMPLEMENTED_MIPS();
    116 }
    117 
    118 
    119 #undef __
    120 #define __ ACCESS_MASM(masm())
    121 
    122 
    123 Register StubCompiler::CheckPrototypes(JSObject* object,
    124                                        Register object_reg,
    125                                        JSObject* holder,
    126                                        Register holder_reg,
    127                                        Register scratch,
    128                                        String* name,
    129                                        Label* miss) {
    130   UNIMPLEMENTED_MIPS();
    131   return at;    // UNIMPLEMENTED RETURN
    132 }
    133 
    134 
    135 void StubCompiler::GenerateLoadField(JSObject* object,
    136                                      JSObject* holder,
    137                                      Register receiver,
    138                                      Register scratch1,
    139                                      Register scratch2,
    140                                      int index,
    141                                      String* name,
    142                                      Label* miss) {
    143   UNIMPLEMENTED_MIPS();
    144 }
    145 
    146 
    147 void StubCompiler::GenerateLoadConstant(JSObject* object,
    148                                         JSObject* holder,
    149                                         Register receiver,
    150                                         Register scratch1,
    151                                         Register scratch2,
    152                                         Object* value,
    153                                         String* name,
    154                                         Label* miss) {
    155   UNIMPLEMENTED_MIPS();
    156 }
    157 
    158 
    159 bool StubCompiler::GenerateLoadCallback(JSObject* object,
    160                                         JSObject* holder,
    161                                         Register receiver,
    162                                         Register name_reg,
    163                                         Register scratch1,
    164                                         Register scratch2,
    165                                         AccessorInfo* callback,
    166                                         String* name,
    167                                         Label* miss,
    168                                         Failure** failure) {
    169   UNIMPLEMENTED_MIPS();
    170   __ break_(0x470);
    171   return false;   // UNIMPLEMENTED RETURN
    172 }
    173 
    174 
    175 void StubCompiler::GenerateLoadInterceptor(JSObject* object,
    176                                            JSObject* holder,
    177                                            LookupResult* lookup,
    178                                            Register receiver,
    179                                            Register name_reg,
    180                                            Register scratch1,
    181                                            Register scratch2,
    182                                            String* name,
    183                                            Label* miss) {
    184   UNIMPLEMENTED_MIPS();
    185   __ break_(0x505);
    186 }
    187 
    188 
    189 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
    190   UNIMPLEMENTED_MIPS();
    191   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    192 }
    193 
    194 
    195 Object* CallStubCompiler::CompileCallField(Object* object,
    196                                            JSObject* holder,
    197                                            int index,
    198                                            String* name) {
    199   UNIMPLEMENTED_MIPS();
    200   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    201 }
    202 
    203 
    204 Object* CallStubCompiler::CompileCallConstant(Object* object,
    205                                               JSObject* holder,
    206                                               JSFunction* function,
    207                                               String* name,
    208                                               CheckType check) {
    209   UNIMPLEMENTED_MIPS();
    210   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    211 }
    212 
    213 
    214 Object* CallStubCompiler::CompileCallInterceptor(Object* object,
    215                                                  JSObject* holder,
    216                                                  String* name) {
    217   UNIMPLEMENTED_MIPS();
    218   __ break_(0x782);
    219   return GetCode(INTERCEPTOR, name);
    220 }
    221 
    222 
    223 Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
    224                                             GlobalObject* holder,
    225                                             JSGlobalPropertyCell* cell,
    226                                             JSFunction* function,
    227                                             String* name) {
    228   UNIMPLEMENTED_MIPS();
    229   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    230 }
    231 
    232 
    233 Object* StoreStubCompiler::CompileStoreField(JSObject* object,
    234                                              int index,
    235                                              Map* transition,
    236                                              String* name) {
    237   UNIMPLEMENTED_MIPS();
    238   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    239 }
    240 
    241 
    242 Object* StoreStubCompiler::CompileStoreCallback(JSObject* object,
    243                                                 AccessorInfo* callback,
    244                                                 String* name) {
    245   UNIMPLEMENTED_MIPS();
    246   __ break_(0x906);
    247   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    248 }
    249 
    250 
    251 Object* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver,
    252                                                    String* name) {
    253   UNIMPLEMENTED_MIPS();
    254   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    255 }
    256 
    257 
    258 Object* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
    259                                               JSGlobalPropertyCell* cell,
    260                                               String* name) {
    261   UNIMPLEMENTED_MIPS();
    262   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    263 }
    264 
    265 
    266 Object* LoadStubCompiler::CompileLoadField(JSObject* object,
    267                                            JSObject* holder,
    268                                            int index,
    269                                            String* name) {
    270   UNIMPLEMENTED_MIPS();
    271   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    272 }
    273 
    274 
    275 Object* LoadStubCompiler::CompileLoadCallback(String* name,
    276                                               JSObject* object,
    277                                               JSObject* holder,
    278                                               AccessorInfo* callback) {
    279   UNIMPLEMENTED_MIPS();
    280   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    281 }
    282 
    283 
    284 Object* LoadStubCompiler::CompileLoadConstant(JSObject* object,
    285                                               JSObject* holder,
    286                                               Object* value,
    287                                               String* name) {
    288   UNIMPLEMENTED_MIPS();
    289   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    290 }
    291 
    292 
    293 Object* LoadStubCompiler::CompileLoadInterceptor(JSObject* object,
    294                                                  JSObject* holder,
    295                                                  String* name) {
    296   UNIMPLEMENTED_MIPS();
    297   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    298 }
    299 
    300 
    301 Object* LoadStubCompiler::CompileLoadGlobal(JSObject* object,
    302                                             GlobalObject* holder,
    303                                             JSGlobalPropertyCell* cell,
    304                                             String* name,
    305                                             bool is_dont_delete) {
    306   UNIMPLEMENTED_MIPS();
    307   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    308 }
    309 
    310 
    311 Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
    312                                                 JSObject* receiver,
    313                                                 JSObject* holder,
    314                                                 int index) {
    315   UNIMPLEMENTED_MIPS();
    316   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    317 }
    318 
    319 
    320 Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
    321                                                    JSObject* receiver,
    322                                                    JSObject* holder,
    323                                                    AccessorInfo* callback) {
    324   UNIMPLEMENTED_MIPS();
    325   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    326 }
    327 
    328 
    329 Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name,
    330                                                    JSObject* receiver,
    331                                                    JSObject* holder,
    332                                                    Object* value) {
    333   UNIMPLEMENTED_MIPS();
    334   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    335 }
    336 
    337 
    338 Object* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver,
    339                                                       JSObject* holder,
    340                                                       String* name) {
    341   UNIMPLEMENTED_MIPS();
    342   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    343 }
    344 
    345 
    346 Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) {
    347   UNIMPLEMENTED_MIPS();
    348   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    349 }
    350 
    351 
    352 Object* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) {
    353   UNIMPLEMENTED_MIPS();
    354   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    355 }
    356 
    357 
    358 // TODO(1224671): implement the fast case.
    359 Object* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) {
    360   UNIMPLEMENTED_MIPS();
    361   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    362 }
    363 
    364 
    365 Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object,
    366                                                   int index,
    367                                                   Map* transition,
    368                                                   String* name) {
    369   UNIMPLEMENTED_MIPS();
    370   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    371 }
    372 
    373 
    374 Object* ConstructStubCompiler::CompileConstructStub(
    375     SharedFunctionInfo* shared) {
    376   UNIMPLEMENTED_MIPS();
    377   return reinterpret_cast<Object*>(NULL);   // UNIMPLEMENTED RETURN
    378 }
    379 
    380 
    381 #undef __
    382 
    383 } }  // namespace v8::internal
    384 
    385