Lines Matching refs:Code
6 // * Redistributions of source code must retain the above copyright
39 // List of code stubs used on all platforms.
99 // List of code stubs only used on ARM platforms.
111 // List of code stubs only used on MIPS platforms.
120 // Combined list of code stubs.
140 // Retrieve the code for the stub. Generate the code if needed.
141 Handle<Code> GetCode(Isolate* isolate);
143 // Retrieve the code for the stub, make and return a copy of the code.
144 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate);
152 // Gets the major key from a code object that is a code stub or binary op IC.
153 static Major GetMajorKey(Code* code_stub) {
163 Code* code = NULL;
164 CHECK(!is_pregenerated || FindCodeInCache(&code, isolate));
182 // Lookup the code in the (possibly custom) cache.
183 bool FindCodeInCache(Code** code_out, Isolate* isolate);
192 virtual Code::ExtraICState GetExtraICState() {
193 return Code::kNoExtraICState;
195 virtual Code::StubType GetStubType() {
196 return Code::NORMAL;
207 // Generates the assembler code for the stub.
208 virtual Handle<Code> GenerateCode() = 0;
211 // Returns whether the code generated for this stub needs to be allocated as
212 // a fixed (non-moveable) code object.
221 // Perform bookkeeping required after code generation when stub code is
223 void RecordCodeGeneration(Code* code, Isolate* isolate);
225 // Finish the code object after it has been generated.
226 virtual void FinishCode(Handle<Code> code) { }
230 virtual void Activate(Code* code) { }
233 virtual Code::Kind GetCodeKind() const;
235 // Add the code to a specialized cache, specific to an individual
236 // stub type. Please note, this method must add the code object to a
237 // roots object, otherwise we will remove the code during GC.
238 virtual void AddToSpecialCache(Handle<Code> new_object) { }
240 // Find code in a specialized cache, work is delegated to the specific stub.
241 virtual bool FindCodeInSpecialCache(Code** code_out, Isolate* isolate) {
265 // Retrieve the code for the stub. Generate the code if needed.
266 virtual Handle<Code> GenerateCode();
268 virtual Code::Kind GetCodeKind() const { return Code::STUB; }
271 // Generates the assembler code for the stub.
283 // if hint_stack_parameter_count_ > 0, the code stub can optimize the
337 virtual Code::Kind GetCodeKind() const { return Code::STUB; }
346 static Handle<Code> GetUninitialized(Isolate* isolate) {
355 // Retrieve the code for the stub. Generate the code if needed.
356 virtual Handle<Code> GenerateCode() = 0;
360 Handle<Code> GenerateLightweightMissCode(Isolate* isolate);
397 // done with the translation to a hydrogen code stub.
414 #include "ia32/code-stubs-ia32.h"
416 #include "x64/code-stubs-x64.h"
418 #include "arm/code-stubs-arm.h"
420 #include "mips/code-stubs-mips.h"
480 virtual Handle<Code> GenerateCode();
557 virtual Handle<Code> GenerateCode();
563 virtual Code::Kind GetCodeKind() const { return Code::STORE_IC; }
565 virtual Code::ExtraICState GetExtraICState() { return bit_field_; }
639 virtual Handle<Code> GenerateCode();
679 virtual Handle<Code> GenerateCode();
699 virtual Handle<Code> GenerateCode();
803 explicit ICStub(Code::Kind kind) : kind_(kind) { }
804 virtual Code::Kind GetCodeKind() const { return kind_; }
807 bool Describes(Code* code) {
808 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey();
812 class KindBits: public BitField<Code::Kind, 0, 4> {};
813 virtual void FinishCode(Handle<Code> code) {
814 code->set_stub_info(MinorKey());
816 Code::Kind kind() { return kind_; }
823 Code::Kind kind_;
829 explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { }
839 StringLengthStub(Code::Kind kind, bool support_wrapper)
857 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode)
861 virtual Code::ExtraICState GetExtraICState() {
878 explicit StoreArrayLengthStub(Code::Kind kind, StrictModeFlag strict_mode)
889 virtual Code::Kind GetCodeKind() const { return kind(); }
894 class KindBits: public BitField<Code::Kind, 0, 4> {};
895 virtual Code::Kind kind() const = 0;
901 virtual Code::Kind GetCodeKind() const { return Code::STUB; }
913 Initialize(Code::LOAD_IC, inobject, index, representation);
916 virtual Handle<Code> GenerateCode();
927 virtual Code::Kind kind() const {
946 virtual Code::StubType GetStubType() { return Code::FIELD; }
951 void Initialize(Code::Kind kind,
978 Initialize(Code::KEYED_LOAD_IC, inobject, index, representation);
985 virtual Handle<Code> GenerateCode();
1129 // functions in the <arch>/code-stubs-<arch>.cc files.
1131 virtual Code::Kind GetCodeKind() const { return Code::BINARY_OP_IC; }
1137 virtual void FinishCode(Handle<Code> code) {
1138 code->set_stub_info(MinorKey());
1180 virtual void FinishCode(Handle<Code> code) {
1181 code->set_stub_info(MinorKey());
1187 virtual Code::Kind GetCodeKind() const { return Code::COMPARE_IC; }
1202 virtual void AddToSpecialCache(Handle<Code> new_object);
1203 virtual bool FindCodeInSpecialCache(Code** code_out, Isolate* isolate);
1221 CompareNilICStub(Code::ExtraICState ic_state,
1228 static Handle<Code> GetUninitialized(Isolate* isolate,
1254 virtual Code::Kind GetCodeKind() const { return Code::COMPARE_NIL_IC; }
1256 Handle<Code> GenerateCode();
1258 virtual Code::ExtraICState GetExtraICState() {
1283 // At most 6 different types can be distinguished, because the Code object
1322 // their code generation. On machines that always have gp registers (x64) we
1359 virtual void FinishCode(Handle<Code> code);
1438 virtual void FinishCode(Handle<Code> code) {
1439 code->set_has_function_cache(RecordCallTarget());
1478 virtual void FinishCode(Handle<Code> code) {
1479 code->set_has_function_cache(RecordCallTarget());
1507 // Generates code implementing String.prototype.charCodeAt.
1537 // Generates the fast case code. On the fallthrough path |result|
1541 // Generates the slow case code. Must not be naturally
1543 // deferred code). Always jumps back to the fast case.
1574 // Generates code for creating a one-char string from a char code.
1577 StringCharFromCodeGenerator(Register code,
1579 : code_(code),
1584 // Generates the fast case code. On the fallthrough path |result|
1588 // Generates the slow case code. Must not be naturally
1590 // deferred code). Always jumps back to the fast case.
1611 // Generates code implementing String.prototype.charAt.
1640 // Generates the fast case code. On the fallthrough path |result|
1647 // Generates the slow case code. Must not be naturally
1649 // deferred code). Always jumps back to the fast case.
1771 virtual Handle<Code> GenerateCode();
1811 virtual Handle<Code> GenerateCode();
1846 virtual Handle<Code> GenerateCode();
1942 virtual Handle<Code> GenerateCode();
1964 virtual Handle<Code> GenerateCode();
1986 virtual Handle<Code> GenerateCode();
2029 virtual Handle<Code> GenerateCode();
2048 virtual Handle<Code> GenerateCode();
2067 virtual Handle<Code> GenerateCode();
2129 // At most 8 different types can be distinguished, because the Code object
2150 explicit ToBooleanStub(Code::ExtraICState state)
2156 virtual Handle<Code> GenerateCode();
2161 virtual Code::Kind GetCodeKind() const { return Code::TO_BOOLEAN_IC; }
2173 static Handle<Code> GetUninitialized(Isolate* isolate) {
2177 virtual Code::ExtraICState GetExtraICState() {
2216 Handle<Code> GenerateCode();