Chromium Code Reviews| 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* ComputeLoadNonExisting(String* name, JSObject* receiver); | |
| 60 | |
| 59 static Object* ComputeLoadField(String* name, | 61 static Object* ComputeLoadField(String* name, |
| 60 JSObject* receiver, | 62 JSObject* receiver, |
| 61 JSObject* holder, | 63 JSObject* holder, |
| 62 int field_index); | 64 int field_index); |
| 63 | 65 |
| 64 static Object* ComputeLoadCallback(String* name, | 66 static Object* ComputeLoadCallback(String* name, |
| 65 JSObject* receiver, | 67 JSObject* receiver, |
| 66 JSObject* holder, | 68 JSObject* holder, |
| 67 AccessorInfo* callback); | 69 AccessorInfo* callback); |
| 68 | 70 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 454 | 456 |
| 455 private: | 457 private: |
| 456 HandleScope scope_; | 458 HandleScope scope_; |
| 457 MacroAssembler masm_; | 459 MacroAssembler masm_; |
| 458 Failure* failure_; | 460 Failure* failure_; |
| 459 }; | 461 }; |
| 460 | 462 |
| 461 | 463 |
| 462 class LoadStubCompiler: public StubCompiler { | 464 class LoadStubCompiler: public StubCompiler { |
| 463 public: | 465 public: |
| 466 Object* CompileLoadNonExisting(JSObject* object); | |
| 467 | |
| 464 Object* CompileLoadField(JSObject* object, | 468 Object* CompileLoadField(JSObject* object, |
| 465 JSObject* holder, | 469 JSObject* holder, |
| 466 int index, | 470 int index, |
| 467 String* name); | 471 String* name); |
| 472 | |
| 468 Object* CompileLoadCallback(String* name, | 473 Object* CompileLoadCallback(String* name, |
| 469 JSObject* object, | 474 JSObject* object, |
| 470 JSObject* holder, | 475 JSObject* holder, |
| 471 AccessorInfo* callback); | 476 AccessorInfo* callback); |
| 477 | |
| 472 Object* CompileLoadConstant(JSObject* object, | 478 Object* CompileLoadConstant(JSObject* object, |
| 473 JSObject* holder, | 479 JSObject* holder, |
| 474 Object* value, | 480 Object* value, |
| 475 String* name); | 481 String* name); |
| 482 | |
| 476 Object* CompileLoadInterceptor(JSObject* object, | 483 Object* CompileLoadInterceptor(JSObject* object, |
| 477 JSObject* holder, | 484 JSObject* holder, |
| 478 String* name); | 485 String* name); |
| 479 | 486 |
| 487 | |
|
Erik Corry
2010/04/13 19:18:37
Extra blank line?
Mads Ager (chromium)
2010/04/14 06:26:10
Good catch, removed.
| |
| 480 Object* CompileLoadGlobal(JSObject* object, | 488 Object* CompileLoadGlobal(JSObject* object, |
| 481 GlobalObject* holder, | 489 GlobalObject* holder, |
| 482 JSGlobalPropertyCell* cell, | 490 JSGlobalPropertyCell* cell, |
| 483 String* name, | 491 String* name, |
| 484 bool is_dont_delete); | 492 bool is_dont_delete); |
| 485 | 493 |
| 486 private: | 494 private: |
| 487 Object* GetCode(PropertyType type, String* name); | 495 Object* GetCode(PropertyType type, String* name); |
| 488 }; | 496 }; |
| 489 | 497 |
| 490 | 498 |
| 491 class KeyedLoadStubCompiler: public StubCompiler { | 499 class KeyedLoadStubCompiler: public StubCompiler { |
| 492 public: | 500 public: |
| 493 Object* CompileLoadField(String* name, | 501 Object* CompileLoadField(String* name, |
| 494 JSObject* object, | 502 JSObject* object, |
| 495 JSObject* holder, | 503 JSObject* holder, |
| 496 int index); | 504 int index); |
| 505 | |
| 497 Object* CompileLoadCallback(String* name, | 506 Object* CompileLoadCallback(String* name, |
| 498 JSObject* object, | 507 JSObject* object, |
| 499 JSObject* holder, | 508 JSObject* holder, |
| 500 AccessorInfo* callback); | 509 AccessorInfo* callback); |
| 510 | |
| 501 Object* CompileLoadConstant(String* name, | 511 Object* CompileLoadConstant(String* name, |
| 502 JSObject* object, | 512 JSObject* object, |
| 503 JSObject* holder, | 513 JSObject* holder, |
| 504 Object* value); | 514 Object* value); |
| 515 | |
| 505 Object* CompileLoadInterceptor(JSObject* object, | 516 Object* CompileLoadInterceptor(JSObject* object, |
| 506 JSObject* holder, | 517 JSObject* holder, |
| 507 String* name); | 518 String* name); |
| 519 | |
| 508 Object* CompileLoadArrayLength(String* name); | 520 Object* CompileLoadArrayLength(String* name); |
| 509 Object* CompileLoadStringLength(String* name); | 521 Object* CompileLoadStringLength(String* name); |
| 510 Object* CompileLoadFunctionPrototype(String* name); | 522 Object* CompileLoadFunctionPrototype(String* name); |
| 511 | 523 |
| 512 private: | 524 private: |
| 513 Object* GetCode(PropertyType type, String* name); | 525 Object* GetCode(PropertyType type, String* name); |
| 514 }; | 526 }; |
| 515 | 527 |
| 516 | 528 |
| 517 class StoreStubCompiler: public StubCompiler { | 529 class StoreStubCompiler: public StubCompiler { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 622 Object* object, | 634 Object* object, |
| 623 JSObject* holder, | 635 JSObject* holder, |
| 624 JSFunction* function, | 636 JSFunction* function, |
| 625 String* name, | 637 String* name, |
| 626 StubCompiler::CheckType check); | 638 StubCompiler::CheckType check); |
| 627 | 639 |
| 628 | 640 |
| 629 } } // namespace v8::internal | 641 } } // namespace v8::internal |
| 630 | 642 |
| 631 #endif // V8_STUB_CACHE_H_ | 643 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |