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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 3211002: Fast string construct stub (ia32 only for now). (Closed)
Patch Set: Simpler map loading Created 10 years, 4 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
« src/ia32/builtins-ia32.cc ('K') | « src/v8-counters.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 868
869 // Jump to the generic construct code in case the specialized code cannot 869 // Jump to the generic construct code in case the specialized code cannot
870 // handle the construction. 870 // handle the construction.
871 __ bind(&generic_constructor); 871 __ bind(&generic_constructor);
872 Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric); 872 Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric);
873 Handle<Code> generic_construct_stub(code); 873 Handle<Code> generic_construct_stub(code);
874 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 874 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
875 } 875 }
876 876
877 877
878 void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
879 // TODO(bug): implement custom construct stub.
880 // Generate a copy of the generic stub for now.
881 Generate_JSConstructStubGeneric(masm);
882 }
883
884
878 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) { 885 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
879 // ----------- S t a t e ------------- 886 // ----------- S t a t e -------------
880 // -- rax: number of arguments 887 // -- rax: number of arguments
881 // -- rdi: constructor function 888 // -- rdi: constructor function
882 // ----------------------------------- 889 // -----------------------------------
883 890
884 Label non_function_call; 891 Label non_function_call;
885 // Check that function is not a smi. 892 // Check that function is not a smi.
886 __ JumpIfSmi(rdi, &non_function_call); 893 __ JumpIfSmi(rdi, &non_function_call);
887 // Check that function is a JSFunction. 894 // Check that function is a JSFunction.
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 __ LeaveInternalFrame(); 1309 __ LeaveInternalFrame();
1303 1310
1304 // Do a tail-call of the compiled function. 1311 // Do a tail-call of the compiled function.
1305 __ lea(rcx, FieldOperand(rax, Code::kHeaderSize)); 1312 __ lea(rcx, FieldOperand(rax, Code::kHeaderSize));
1306 __ jmp(rcx); 1313 __ jmp(rcx);
1307 } 1314 }
1308 1315
1309 } } // namespace v8::internal 1316 } } // namespace v8::internal
1310 1317
1311 #endif // V8_TARGET_ARCH_X64 1318 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/builtins-ia32.cc ('K') | « src/v8-counters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698