Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Side by Side Diff: src/stub-cache.h

Issue 1559033: Reapply load ICs for nonexistent properties.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/ic.cc ('K') | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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* CompileLoadNonexistent(String* name,
467 JSObject* object,
468 JSObject* last);
469
464 Object* CompileLoadField(JSObject* object, 470 Object* CompileLoadField(JSObject* object,
465 JSObject* holder, 471 JSObject* holder,
466 int index, 472 int index,
467 String* name); 473 String* name);
474
468 Object* CompileLoadCallback(String* name, 475 Object* CompileLoadCallback(String* name,
469 JSObject* object, 476 JSObject* object,
470 JSObject* holder, 477 JSObject* holder,
471 AccessorInfo* callback); 478 AccessorInfo* callback);
479
472 Object* CompileLoadConstant(JSObject* object, 480 Object* CompileLoadConstant(JSObject* object,
473 JSObject* holder, 481 JSObject* holder,
474 Object* value, 482 Object* value,
475 String* name); 483 String* name);
484
476 Object* CompileLoadInterceptor(JSObject* object, 485 Object* CompileLoadInterceptor(JSObject* object,
477 JSObject* holder, 486 JSObject* holder,
478 String* name); 487 String* name);
479 488
480 Object* CompileLoadGlobal(JSObject* object, 489 Object* CompileLoadGlobal(JSObject* object,
481 GlobalObject* holder, 490 GlobalObject* holder,
482 JSGlobalPropertyCell* cell, 491 JSGlobalPropertyCell* cell,
483 String* name, 492 String* name,
484 bool is_dont_delete); 493 bool is_dont_delete);
485 494
486 private: 495 private:
487 Object* GetCode(PropertyType type, String* name); 496 Object* GetCode(PropertyType type, String* name);
488 }; 497 };
489 498
490 499
491 class KeyedLoadStubCompiler: public StubCompiler { 500 class KeyedLoadStubCompiler: public StubCompiler {
492 public: 501 public:
493 Object* CompileLoadField(String* name, 502 Object* CompileLoadField(String* name,
494 JSObject* object, 503 JSObject* object,
495 JSObject* holder, 504 JSObject* holder,
496 int index); 505 int index);
506
497 Object* CompileLoadCallback(String* name, 507 Object* CompileLoadCallback(String* name,
498 JSObject* object, 508 JSObject* object,
499 JSObject* holder, 509 JSObject* holder,
500 AccessorInfo* callback); 510 AccessorInfo* callback);
511
501 Object* CompileLoadConstant(String* name, 512 Object* CompileLoadConstant(String* name,
502 JSObject* object, 513 JSObject* object,
503 JSObject* holder, 514 JSObject* holder,
504 Object* value); 515 Object* value);
516
505 Object* CompileLoadInterceptor(JSObject* object, 517 Object* CompileLoadInterceptor(JSObject* object,
506 JSObject* holder, 518 JSObject* holder,
507 String* name); 519 String* name);
520
508 Object* CompileLoadArrayLength(String* name); 521 Object* CompileLoadArrayLength(String* name);
509 Object* CompileLoadStringLength(String* name); 522 Object* CompileLoadStringLength(String* name);
510 Object* CompileLoadFunctionPrototype(String* name); 523 Object* CompileLoadFunctionPrototype(String* name);
511 524
512 private: 525 private:
513 Object* GetCode(PropertyType type, String* name); 526 Object* GetCode(PropertyType type, String* name);
514 }; 527 };
515 528
516 529
517 class StoreStubCompiler: public StubCompiler { 530 class StoreStubCompiler: public StubCompiler {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 Object* object, 635 Object* object,
623 JSObject* holder, 636 JSObject* holder,
624 JSFunction* function, 637 JSFunction* function,
625 String* name, 638 String* name,
626 StubCompiler::CheckType check); 639 StubCompiler::CheckType check);
627 640
628 641
629 } } // namespace v8::internal 642 } } // namespace v8::internal
630 643
631 #endif // V8_STUB_CACHE_H_ 644 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/ic.cc ('K') | « src/ic.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698