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 #if defined(V8_TARGET_ARCH_MIPS) 31 32 #include "ic-inl.h" 33 #include "codegen-inl.h" 34 #include "stub-cache.h" 35 36 namespace v8 { 37 namespace internal { 38 39 #define __ ACCESS_MASM(masm) 40 41 42 void StubCache::GenerateProbe(MacroAssembler* masm, 43 Code::Flags flags, 44 Register receiver, 45 Register name, 46 Register scratch, 47 Register extra, 48 Register extra2) { 49 UNIMPLEMENTED_MIPS(); 50 } 51 52 53 void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm, 54 int index, 55 Register prototype) { 56 UNIMPLEMENTED_MIPS(); 57 } 58 59 60 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( 61 MacroAssembler* masm, int index, Register prototype, Label* miss) { 62 UNIMPLEMENTED_MIPS(); 63 } 64 65 66 // Load a fast property out of a holder object (src). In-object properties 67 // are loaded directly otherwise the property is loaded from the properties 68 // fixed array. 69 void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm, 70 Register dst, Register src, 71 JSObject* holder, int index) { 72 UNIMPLEMENTED_MIPS(); 73 } 74 75 76 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm, 77 Register receiver, 78 Register scratch, 79 Label* miss_label) { 80 UNIMPLEMENTED_MIPS(); 81 } 82 83 84 // Generate code to load the length from a string object and return the length. 85 // If the receiver object is not a string or a wrapped string object the 86 // execution continues at the miss label. The register containing the 87 // receiver is potentially clobbered. 88 void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm, 89 Register receiver, 90 Register scratch1, 91 Register scratch2, 92 Label* miss, 93 bool support_wrappers) { 94 UNIMPLEMENTED_MIPS(); 95 } 96 97 98 void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm, 99 Register receiver, 100 Register scratch1, 101 Register scratch2, 102 Label* miss_label) { 103 UNIMPLEMENTED_MIPS(); 104 } 105 106 107 // Generate StoreField code, value is passed in a0 register. 108 // After executing generated code, the receiver_reg and name_reg 109 // may be clobbered. 110 void StubCompiler::GenerateStoreField(MacroAssembler* masm, 111 JSObject* object, 112 int index, 113 Map* transition, 114 Register receiver_reg, 115 Register name_reg, 116 Register scratch, 117 Label* miss_label) { 118 UNIMPLEMENTED_MIPS(); 119 } 120 121 122 void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) { 123 UNIMPLEMENTED_MIPS(); 124 } 125 126 127 class CallInterceptorCompiler BASE_EMBEDDED { 128 public: 129 CallInterceptorCompiler(StubCompiler* stub_compiler, 130 const ParameterCount& arguments, 131 Register name) 132 : stub_compiler_(stub_compiler), 133 arguments_(arguments), 134 name_(name) {} 135 136 void Compile(MacroAssembler* masm, 137 JSObject* object, 138 JSObject* holder, 139 String* name, 140 LookupResult* lookup, 141 Register receiver, 142 Register scratch1, 143 Register scratch2, 144 Register scratch3, 145 Label* miss) { 146 UNIMPLEMENTED_MIPS(); 147 } 148 149 private: 150 void CompileCacheable(MacroAssembler* masm, 151 JSObject* object, 152 Register receiver, 153 Register scratch1, 154 Register scratch2, 155 Register scratch3, 156 JSObject* interceptor_holder, 157 LookupResult* lookup, 158 String* name, 159 const CallOptimization& optimization, 160 Label* miss_label) { 161 UNIMPLEMENTED_MIPS(); 162 } 163 164 void CompileRegular(MacroAssembler* masm, 165 JSObject* object, 166 Register receiver, 167 Register scratch1, 168 Register scratch2, 169 Register scratch3, 170 String* name, 171 JSObject* interceptor_holder, 172 Label* miss_label) { 173 UNIMPLEMENTED_MIPS(); 174 } 175 176 void LoadWithInterceptor(MacroAssembler* masm, 177 Register receiver, 178 Register holder, 179 JSObject* holder_obj, 180 Register scratch, 181 Label* interceptor_succeeded) { 182 UNIMPLEMENTED_MIPS(); 183 } 184 185 StubCompiler* stub_compiler_; 186 const ParameterCount& arguments_; 187 Register name_; 188 }; 189 190 191 #undef __ 192 #define __ ACCESS_MASM(masm()) 193 194 195 Register StubCompiler::CheckPrototypes(JSObject* object, 196 Register object_reg, 197 JSObject* holder, 198 Register holder_reg, 199 Register scratch1, 200 Register scratch2, 201 String* name, 202 int save_at_depth, 203 Label* miss) { 204 UNIMPLEMENTED_MIPS(); 205 return no_reg; 206 } 207 208 209 void StubCompiler::GenerateLoadField(JSObject* object, 210 JSObject* holder, 211 Register receiver, 212 Register scratch1, 213 Register scratch2, 214 Register scratch3, 215 int index, 216 String* name, 217 Label* miss) { 218 UNIMPLEMENTED_MIPS(); 219 } 220 221 222 void StubCompiler::GenerateLoadConstant(JSObject* object, 223 JSObject* holder, 224 Register receiver, 225 Register scratch1, 226 Register scratch2, 227 Register scratch3, 228 Object* value, 229 String* name, 230 Label* miss) { 231 UNIMPLEMENTED_MIPS(); 232 } 233 234 235 MaybeObject* StubCompiler::GenerateLoadCallback(JSObject* object, 236 JSObject* holder, 237 Register receiver, 238 Register name_reg, 239 Register scratch1, 240 Register scratch2, 241 Register scratch3, 242 AccessorInfo* callback, 243 String* name, 244 Label* miss) { 245 UNIMPLEMENTED_MIPS(); 246 return NULL; 247 } 248 249 250 void StubCompiler::GenerateLoadInterceptor(JSObject* object, 251 JSObject* interceptor_holder, 252 LookupResult* lookup, 253 Register receiver, 254 Register name_reg, 255 Register scratch1, 256 Register scratch2, 257 Register scratch3, 258 String* name, 259 Label* miss) { 260 UNIMPLEMENTED_MIPS(); 261 } 262 263 264 void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { 265 UNIMPLEMENTED_MIPS(); 266 } 267 268 269 void CallStubCompiler::GenerateGlobalReceiverCheck(JSObject* object, 270 JSObject* holder, 271 String* name, 272 Label* miss) { 273 UNIMPLEMENTED_MIPS(); 274 } 275 276 277 void CallStubCompiler::GenerateLoadFunctionFromCell(JSGlobalPropertyCell* cell, 278 JSFunction* function, 279 Label* miss) { 280 UNIMPLEMENTED_MIPS(); 281 } 282 283 284 MaybeObject* CallStubCompiler::GenerateMissBranch() { 285 UNIMPLEMENTED_MIPS(); 286 return NULL; 287 } 288 289 290 MaybeObject* CallStubCompiler::CompileCallField(JSObject* object, 291 JSObject* holder, 292 int index, 293 String* name) { 294 UNIMPLEMENTED_MIPS(); 295 return NULL; 296 } 297 298 299 MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object, 300 JSObject* holder, 301 JSGlobalPropertyCell* cell, 302 JSFunction* function, 303 String* name) { 304 UNIMPLEMENTED_MIPS(); 305 return NULL; 306 } 307 308 309 MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object, 310 JSObject* holder, 311 JSGlobalPropertyCell* cell, 312 JSFunction* function, 313 String* name) { 314 UNIMPLEMENTED_MIPS(); 315 return NULL; 316 } 317 318 319 MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall( 320 Object* object, 321 JSObject* holder, 322 JSGlobalPropertyCell* cell, 323 JSFunction* function, 324 String* name) { 325 UNIMPLEMENTED_MIPS(); 326 return NULL; 327 } 328 329 330 MaybeObject* CallStubCompiler::CompileStringCharAtCall( 331 Object* object, 332 JSObject* holder, 333 JSGlobalPropertyCell* cell, 334 JSFunction* function, 335 String* name) { 336 UNIMPLEMENTED_MIPS(); 337 return NULL; 338 } 339 340 341 MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall( 342 Object* object, 343 JSObject* holder, 344 JSGlobalPropertyCell* cell, 345 JSFunction* function, 346 String* name) { 347 UNIMPLEMENTED_MIPS(); 348 return NULL; 349 } 350 351 352 MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object, 353 JSObject* holder, 354 JSGlobalPropertyCell* cell, 355 JSFunction* function, 356 String* name) { 357 UNIMPLEMENTED_MIPS(); 358 return NULL; 359 } 360 361 362 MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object, 363 JSObject* holder, 364 JSGlobalPropertyCell* cell, 365 JSFunction* function, 366 String* name) { 367 UNIMPLEMENTED_MIPS(); 368 return NULL; 369 } 370 371 372 MaybeObject* CallStubCompiler::CompileFastApiCall( 373 const CallOptimization& optimization, 374 Object* object, 375 JSObject* holder, 376 JSGlobalPropertyCell* cell, 377 JSFunction* function, 378 String* name) { 379 UNIMPLEMENTED_MIPS(); 380 return NULL; 381 } 382 383 384 MaybeObject* CallStubCompiler::CompileCallConstant(Object* object, 385 JSObject* holder, 386 JSFunction* function, 387 String* name, 388 CheckType check) { 389 UNIMPLEMENTED_MIPS(); 390 return NULL; 391 } 392 393 394 MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object, 395 JSObject* holder, 396 String* name) { 397 UNIMPLEMENTED_MIPS(); 398 return NULL; 399 } 400 401 402 MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, 403 GlobalObject* holder, 404 JSGlobalPropertyCell* cell, 405 JSFunction* function, 406 String* name) { 407 UNIMPLEMENTED_MIPS(); 408 return NULL; 409 } 410 411 412 MaybeObject* StoreStubCompiler::CompileStoreField(JSObject* object, 413 int index, 414 Map* transition, 415 String* name) { 416 UNIMPLEMENTED_MIPS(); 417 return NULL; 418 } 419 420 421 MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object, 422 AccessorInfo* callback, 423 String* name) { 424 UNIMPLEMENTED_MIPS(); 425 return NULL; 426 } 427 428 429 MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver, 430 String* name) { 431 UNIMPLEMENTED_MIPS(); 432 return NULL; 433 } 434 435 436 MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object, 437 JSGlobalPropertyCell* cell, 438 String* name) { 439 UNIMPLEMENTED_MIPS(); 440 return NULL; 441 } 442 443 444 MaybeObject* LoadStubCompiler::CompileLoadNonexistent(String* name, 445 JSObject* object, 446 JSObject* last) { 447 UNIMPLEMENTED_MIPS(); 448 return NULL; 449 } 450 451 452 MaybeObject* LoadStubCompiler::CompileLoadField(JSObject* object, 453 JSObject* holder, 454 int index, 455 String* name) { 456 UNIMPLEMENTED_MIPS(); 457 return NULL; 458 } 459 460 461 MaybeObject* LoadStubCompiler::CompileLoadCallback(String* name, 462 JSObject* object, 463 JSObject* holder, 464 AccessorInfo* callback) { 465 UNIMPLEMENTED_MIPS(); 466 return NULL; 467 } 468 469 470 MaybeObject* LoadStubCompiler::CompileLoadConstant(JSObject* object, 471 JSObject* holder, 472 Object* value, 473 String* name) { 474 UNIMPLEMENTED_MIPS(); 475 return NULL; 476 } 477 478 479 MaybeObject* LoadStubCompiler::CompileLoadInterceptor(JSObject* object, 480 JSObject* holder, 481 String* name) { 482 UNIMPLEMENTED_MIPS(); 483 return NULL; 484 } 485 486 487 MaybeObject* LoadStubCompiler::CompileLoadGlobal(JSObject* object, 488 GlobalObject* holder, 489 JSGlobalPropertyCell* cell, 490 String* name, 491 bool is_dont_delete) { 492 UNIMPLEMENTED_MIPS(); 493 return NULL; 494 } 495 496 497 MaybeObject* KeyedLoadStubCompiler::CompileLoadField(String* name, 498 JSObject* receiver, 499 JSObject* holder, 500 int index) { 501 UNIMPLEMENTED_MIPS(); 502 return NULL; 503 } 504 505 506 MaybeObject* KeyedLoadStubCompiler::CompileLoadCallback( 507 String* name, 508 JSObject* receiver, 509 JSObject* holder, 510 AccessorInfo* callback) { 511 UNIMPLEMENTED_MIPS(); 512 return NULL; 513 } 514 515 516 MaybeObject* KeyedLoadStubCompiler::CompileLoadConstant(String* name, 517 JSObject* receiver, 518 JSObject* holder, 519 Object* value) { 520 UNIMPLEMENTED_MIPS(); 521 return NULL; 522 } 523 524 525 MaybeObject* KeyedLoadStubCompiler::CompileLoadInterceptor(JSObject* receiver, 526 JSObject* holder, 527 String* name) { 528 UNIMPLEMENTED_MIPS(); 529 return NULL; 530 } 531 532 533 MaybeObject* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) { 534 UNIMPLEMENTED_MIPS(); 535 return NULL; 536 } 537 538 539 MaybeObject* KeyedLoadStubCompiler::CompileLoadStringLength(String* name) { 540 UNIMPLEMENTED_MIPS(); 541 return NULL; 542 } 543 544 545 MaybeObject* KeyedLoadStubCompiler::CompileLoadFunctionPrototype(String* name) { 546 UNIMPLEMENTED_MIPS(); 547 return NULL; 548 } 549 550 551 MaybeObject* KeyedLoadStubCompiler::CompileLoadSpecialized(JSObject* receiver) { 552 UNIMPLEMENTED_MIPS(); 553 return NULL; 554 } 555 556 557 MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, 558 int index, 559 Map* transition, 560 String* name) { 561 UNIMPLEMENTED_MIPS(); 562 return NULL; 563 } 564 565 566 MaybeObject* KeyedStoreStubCompiler::CompileStoreSpecialized( 567 JSObject* receiver) { 568 UNIMPLEMENTED_MIPS(); 569 return NULL; 570 } 571 572 573 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { 574 UNIMPLEMENTED_MIPS(); 575 return NULL; 576 } 577 578 579 MaybeObject* ExternalArrayStubCompiler::CompileKeyedLoadStub( 580 JSObject* receiver_object, 581 ExternalArrayType array_type, 582 Code::Flags flags) { 583 UNIMPLEMENTED_MIPS(); 584 return NULL; 585 } 586 587 588 MaybeObject* ExternalArrayStubCompiler::CompileKeyedStoreStub( 589 JSObject* receiver_object, 590 ExternalArrayType array_type, 591 Code::Flags flags) { 592 UNIMPLEMENTED_MIPS(); 593 return NULL; 594 } 595 596 597 #undef __ 598 599 } } // namespace v8::internal 600 601 #endif // V8_TARGET_ARCH_MIPS 602