| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 struct Entry { | 49 struct Entry { |
| 50 String* key; | 50 String* key; |
| 51 Code* value; | 51 Code* value; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 | 54 |
| 55 static void Initialize(bool create_heap_objects); | 55 static void Initialize(bool create_heap_objects); |
| 56 | 56 |
| 57 // Computes the right stub matching. Inserts the result in the | 57 // Computes the right stub matching. Inserts the result in the |
| 58 // cache before returning. This might compile a stub if needed. | 58 // cache before returning. This might compile a stub if needed. |
| 59 static Object* ComputeLoadNonexistent(String* name, JSObject* receiver); | |
| 60 | |
| 61 static Object* ComputeLoadField(String* name, | 59 static Object* ComputeLoadField(String* name, |
| 62 JSObject* receiver, | 60 JSObject* receiver, |
| 63 JSObject* holder, | 61 JSObject* holder, |
| 64 int field_index); | 62 int field_index); |
| 65 | 63 |
| 66 static Object* ComputeLoadCallback(String* name, | 64 static Object* ComputeLoadCallback(String* name, |
| 67 JSObject* receiver, | 65 JSObject* receiver, |
| 68 JSObject* holder, | 66 JSObject* holder, |
| 69 AccessorInfo* callback); | 67 AccessorInfo* callback); |
| 70 | 68 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 454 |
| 457 private: | 455 private: |
| 458 HandleScope scope_; | 456 HandleScope scope_; |
| 459 MacroAssembler masm_; | 457 MacroAssembler masm_; |
| 460 Failure* failure_; | 458 Failure* failure_; |
| 461 }; | 459 }; |
| 462 | 460 |
| 463 | 461 |
| 464 class LoadStubCompiler: public StubCompiler { | 462 class LoadStubCompiler: public StubCompiler { |
| 465 public: | 463 public: |
| 466 Object* CompileLoadNonexistent(JSObject* object); | |
| 467 | |
| 468 Object* CompileLoadField(JSObject* object, | 464 Object* CompileLoadField(JSObject* object, |
| 469 JSObject* holder, | 465 JSObject* holder, |
| 470 int index, | 466 int index, |
| 471 String* name); | 467 String* name); |
| 472 | |
| 473 Object* CompileLoadCallback(String* name, | 468 Object* CompileLoadCallback(String* name, |
| 474 JSObject* object, | 469 JSObject* object, |
| 475 JSObject* holder, | 470 JSObject* holder, |
| 476 AccessorInfo* callback); | 471 AccessorInfo* callback); |
| 477 | |
| 478 Object* CompileLoadConstant(JSObject* object, | 472 Object* CompileLoadConstant(JSObject* object, |
| 479 JSObject* holder, | 473 JSObject* holder, |
| 480 Object* value, | 474 Object* value, |
| 481 String* name); | 475 String* name); |
| 482 | |
| 483 Object* CompileLoadInterceptor(JSObject* object, | 476 Object* CompileLoadInterceptor(JSObject* object, |
| 484 JSObject* holder, | 477 JSObject* holder, |
| 485 String* name); | 478 String* name); |
| 486 | 479 |
| 487 Object* CompileLoadGlobal(JSObject* object, | 480 Object* CompileLoadGlobal(JSObject* object, |
| 488 GlobalObject* holder, | 481 GlobalObject* holder, |
| 489 JSGlobalPropertyCell* cell, | 482 JSGlobalPropertyCell* cell, |
| 490 String* name, | 483 String* name, |
| 491 bool is_dont_delete); | 484 bool is_dont_delete); |
| 492 | 485 |
| 493 private: | 486 private: |
| 494 Object* GetCode(PropertyType type, String* name); | 487 Object* GetCode(PropertyType type, String* name); |
| 495 }; | 488 }; |
| 496 | 489 |
| 497 | 490 |
| 498 class KeyedLoadStubCompiler: public StubCompiler { | 491 class KeyedLoadStubCompiler: public StubCompiler { |
| 499 public: | 492 public: |
| 500 Object* CompileLoadField(String* name, | 493 Object* CompileLoadField(String* name, |
| 501 JSObject* object, | 494 JSObject* object, |
| 502 JSObject* holder, | 495 JSObject* holder, |
| 503 int index); | 496 int index); |
| 504 | |
| 505 Object* CompileLoadCallback(String* name, | 497 Object* CompileLoadCallback(String* name, |
| 506 JSObject* object, | 498 JSObject* object, |
| 507 JSObject* holder, | 499 JSObject* holder, |
| 508 AccessorInfo* callback); | 500 AccessorInfo* callback); |
| 509 | |
| 510 Object* CompileLoadConstant(String* name, | 501 Object* CompileLoadConstant(String* name, |
| 511 JSObject* object, | 502 JSObject* object, |
| 512 JSObject* holder, | 503 JSObject* holder, |
| 513 Object* value); | 504 Object* value); |
| 514 | |
| 515 Object* CompileLoadInterceptor(JSObject* object, | 505 Object* CompileLoadInterceptor(JSObject* object, |
| 516 JSObject* holder, | 506 JSObject* holder, |
| 517 String* name); | 507 String* name); |
| 518 | |
| 519 Object* CompileLoadArrayLength(String* name); | 508 Object* CompileLoadArrayLength(String* name); |
| 520 Object* CompileLoadStringLength(String* name); | 509 Object* CompileLoadStringLength(String* name); |
| 521 Object* CompileLoadFunctionPrototype(String* name); | 510 Object* CompileLoadFunctionPrototype(String* name); |
| 522 | 511 |
| 523 private: | 512 private: |
| 524 Object* GetCode(PropertyType type, String* name); | 513 Object* GetCode(PropertyType type, String* name); |
| 525 }; | 514 }; |
| 526 | 515 |
| 527 | 516 |
| 528 class StoreStubCompiler: public StubCompiler { | 517 class StoreStubCompiler: public StubCompiler { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 Object* object, | 622 Object* object, |
| 634 JSObject* holder, | 623 JSObject* holder, |
| 635 JSFunction* function, | 624 JSFunction* function, |
| 636 String* name, | 625 String* name, |
| 637 StubCompiler::CheckType check); | 626 StubCompiler::CheckType check); |
| 638 | 627 |
| 639 | 628 |
| 640 } } // namespace v8::internal | 629 } } // namespace v8::internal |
| 641 | 630 |
| 642 #endif // V8_STUB_CACHE_H_ | 631 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |