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

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

Issue 11344012: Make so that array length property access uses a new IC that tracks the array map. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « src/objects-inl.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Handle<Code> ComputeLoadField(Handle<String> name, 83 Handle<Code> ComputeLoadField(Handle<String> name,
84 Handle<JSObject> receiver, 84 Handle<JSObject> receiver,
85 Handle<JSObject> holder, 85 Handle<JSObject> holder,
86 int field_index); 86 int field_index);
87 87
88 Handle<Code> ComputeLoadCallback(Handle<String> name, 88 Handle<Code> ComputeLoadCallback(Handle<String> name,
89 Handle<JSObject> receiver, 89 Handle<JSObject> receiver,
90 Handle<JSObject> holder, 90 Handle<JSObject> holder,
91 Handle<AccessorInfo> callback); 91 Handle<AccessorInfo> callback);
92 92
93 Handle<Code> ComputeLoadArrayLength(Handle<String> name,
94 Handle<JSObject> receiver,
95 Handle<JSObject> holder);
96
93 Handle<Code> ComputeLoadViaGetter(Handle<String> name, 97 Handle<Code> ComputeLoadViaGetter(Handle<String> name,
94 Handle<JSObject> receiver, 98 Handle<JSObject> receiver,
95 Handle<JSObject> holder, 99 Handle<JSObject> holder,
96 Handle<JSFunction> getter); 100 Handle<JSFunction> getter);
97 101
98 Handle<Code> ComputeLoadConstant(Handle<String> name, 102 Handle<Code> ComputeLoadConstant(Handle<String> name,
99 Handle<JSObject> receiver, 103 Handle<JSObject> receiver,
100 Handle<JSObject> holder, 104 Handle<JSObject> holder,
101 Handle<JSFunction> value); 105 Handle<JSFunction> value);
102 106
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 Handle<Code> CompileLoadField(Handle<JSObject> object, 616 Handle<Code> CompileLoadField(Handle<JSObject> object,
613 Handle<JSObject> holder, 617 Handle<JSObject> holder,
614 int index, 618 int index,
615 Handle<String> name); 619 Handle<String> name);
616 620
617 Handle<Code> CompileLoadCallback(Handle<String> name, 621 Handle<Code> CompileLoadCallback(Handle<String> name,
618 Handle<JSObject> object, 622 Handle<JSObject> object,
619 Handle<JSObject> holder, 623 Handle<JSObject> holder,
620 Handle<AccessorInfo> callback); 624 Handle<AccessorInfo> callback);
621 625
626 static void GenerateLoadArrayLength(MacroAssembler* masm, Register holder);
627
628 Handle<Code> CompileLoadArrayLength(Handle<String> name,
629 Handle<JSObject> receiver,
630 Handle<JSObject> holder);
631
622 static void GenerateLoadViaGetter(MacroAssembler* masm, 632 static void GenerateLoadViaGetter(MacroAssembler* masm,
623 Handle<JSFunction> getter); 633 Handle<JSFunction> getter);
624 634
625 Handle<Code> CompileLoadViaGetter(Handle<String> name, 635 Handle<Code> CompileLoadViaGetter(Handle<String> name,
626 Handle<JSObject> receiver, 636 Handle<JSObject> receiver,
627 Handle<JSObject> holder, 637 Handle<JSObject> holder,
628 Handle<JSFunction> getter); 638 Handle<JSFunction> getter);
629 639
630 Handle<Code> CompileLoadConstant(Handle<JSObject> object, 640 Handle<Code> CompileLoadConstant(Handle<JSObject> object,
631 Handle<JSObject> holder, 641 Handle<JSObject> holder,
632 Handle<JSFunction> value, 642 Handle<JSFunction> value,
633 Handle<String> name); 643 Handle<String> name);
634 644
635 Handle<Code> CompileLoadInterceptor(Handle<JSObject> object, 645 Handle<Code> CompileLoadInterceptor(Handle<JSObject> object,
636 Handle<JSObject> holder, 646 Handle<JSObject> holder,
637 Handle<String> name); 647 Handle<String> name);
638 648
639 Handle<Code> CompileLoadGlobal(Handle<JSObject> object, 649 Handle<Code> CompileLoadGlobal(Handle<JSObject> object,
640 Handle<GlobalObject> holder, 650 Handle<GlobalObject> holder,
641 Handle<JSGlobalPropertyCell> cell, 651 Handle<JSGlobalPropertyCell> cell,
642 Handle<String> name, 652 Handle<String> name,
643 bool is_dont_delete); 653 bool is_dont_delete);
644 654
645 private: 655 private:
646 Handle<Code> GetCode(Code::StubType type, Handle<String> name); 656 Handle<Code> GetCode(
657 Code::StubType type, Handle<String> name,
658 Code::ExtraICStateForeignCallback callbackType =
659 Code::ExtraICStateForeignCallbackNone);
647 }; 660 };
648 661
649 662
650 class KeyedLoadStubCompiler: public StubCompiler { 663 class KeyedLoadStubCompiler: public StubCompiler {
651 public: 664 public:
652 explicit KeyedLoadStubCompiler(Isolate* isolate) : StubCompiler(isolate) { } 665 explicit KeyedLoadStubCompiler(Isolate* isolate) : StubCompiler(isolate) { }
653 666
654 Handle<Code> CompileLoadField(Handle<String> name, 667 Handle<Code> CompileLoadField(Handle<String> name,
655 Handle<JSObject> object, 668 Handle<JSObject> object,
656 Handle<JSObject> holder, 669 Handle<JSObject> holder,
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 Handle<JSFunction> constant_function_; 947 Handle<JSFunction> constant_function_;
935 bool is_simple_api_call_; 948 bool is_simple_api_call_;
936 Handle<FunctionTemplateInfo> expected_receiver_type_; 949 Handle<FunctionTemplateInfo> expected_receiver_type_;
937 Handle<CallHandlerInfo> api_call_info_; 950 Handle<CallHandlerInfo> api_call_info_;
938 }; 951 };
939 952
940 953
941 } } // namespace v8::internal 954 } } // namespace v8::internal
942 955
943 #endif // V8_STUB_CACHE_H_ 956 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698