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 8399032: Handlify CompileConstructStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 Register scratch1, 481 Register scratch1,
482 Register scratch2, 482 Register scratch2,
483 Handle<String> name, 483 Handle<String> name,
484 int save_at_depth, 484 int save_at_depth,
485 Label* miss); 485 Label* miss);
486 486
487 protected: 487 protected:
488 Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name); 488 Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name);
489 Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<String> name); 489 Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<String> name);
490 490
491 // TODO(kmillikin): Remove these functions once the ConstructStubCompiler
492 // is handlified.
493 MUST_USE_RESULT MaybeObject* TryGetCodeWithFlags(Code::Flags flags,
494 const char* name);
495 MUST_USE_RESULT MaybeObject* TryGetCodeWithFlags(Code::Flags flags,
496 String* name);
497
498 MacroAssembler* masm() { return &masm_; } 491 MacroAssembler* masm() { return &masm_; }
499 void set_failure(Failure* failure) { failure_ = failure; } 492 void set_failure(Failure* failure) { failure_ = failure; }
500 493
501 void GenerateLoadField(Handle<JSObject> object, 494 void GenerateLoadField(Handle<JSObject> object,
502 Handle<JSObject> holder, 495 Handle<JSObject> holder,
503 Register receiver, 496 Register receiver,
504 Register scratch1, 497 Register scratch1,
505 Register scratch2, 498 Register scratch2,
506 Register scratch3, 499 Register scratch3,
507 int index, 500 int index,
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 const Code::Kind kind_; 798 const Code::Kind kind_;
806 const Code::ExtraICState extra_state_; 799 const Code::ExtraICState extra_state_;
807 const InlineCacheHolderFlag cache_holder_; 800 const InlineCacheHolderFlag cache_holder_;
808 }; 801 };
809 802
810 803
811 class ConstructStubCompiler: public StubCompiler { 804 class ConstructStubCompiler: public StubCompiler {
812 public: 805 public:
813 explicit ConstructStubCompiler(Isolate* isolate) : StubCompiler(isolate) { } 806 explicit ConstructStubCompiler(Isolate* isolate) : StubCompiler(isolate) { }
814 807
815 MUST_USE_RESULT MaybeObject* CompileConstructStub(JSFunction* function); 808 Handle<Code> CompileConstructStub(Handle<JSFunction> function);
816 809
817 private: 810 private:
818 MaybeObject* GetCode(); 811 Handle<Code> GetCode();
819 }; 812 };
820 813
821 814
822 // Holds information about possible function call optimizations. 815 // Holds information about possible function call optimizations.
823 class CallOptimization BASE_EMBEDDED { 816 class CallOptimization BASE_EMBEDDED {
824 public: 817 public:
825 explicit CallOptimization(LookupResult* lookup); 818 explicit CallOptimization(LookupResult* lookup);
826 819
827 explicit CallOptimization(Handle<JSFunction> function); 820 explicit CallOptimization(Handle<JSFunction> function);
828 821
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 Handle<JSFunction> constant_function_; 857 Handle<JSFunction> constant_function_;
865 bool is_simple_api_call_; 858 bool is_simple_api_call_;
866 Handle<FunctionTemplateInfo> expected_receiver_type_; 859 Handle<FunctionTemplateInfo> expected_receiver_type_;
867 Handle<CallHandlerInfo> api_call_info_; 860 Handle<CallHandlerInfo> api_call_info_;
868 }; 861 };
869 862
870 863
871 } } // namespace v8::internal 864 } } // namespace v8::internal
872 865
873 #endif // V8_STUB_CACHE_H_ 866 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/runtime.cc ('K') | « src/runtime.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698