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

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

Issue 193125: Handle array construction on native code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « src/v8-counters.h ('k') | test/mjsunit/array-construtor.js » ('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 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 ParameterCount actual(rax); 445 ParameterCount actual(rax);
446 __ SmiToInteger32(rax, rax); 446 __ SmiToInteger32(rax, rax);
447 __ movq(rdi, Operand(rbp, kFunctionOffset)); 447 __ movq(rdi, Operand(rbp, kFunctionOffset));
448 __ InvokeFunction(rdi, actual, CALL_FUNCTION); 448 __ InvokeFunction(rdi, actual, CALL_FUNCTION);
449 449
450 __ LeaveInternalFrame(); 450 __ LeaveInternalFrame();
451 __ ret(3 * kPointerSize); // remove function, receiver, and arguments 451 __ ret(3 * kPointerSize); // remove function, receiver, and arguments
452 } 452 }
453 453
454 454
455 void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
456 // Just jump to the generic array code.
457 Code* code = Builtins::builtin(Builtins::ArrayCodeGeneric);
458 Handle<Code> array_code(code);
459 __ Jump(array_code, RelocInfo::CODE_TARGET);
460 }
461
462
463 void Builtins::Generate_ArrayConstructCode(MacroAssembler* masm) {
464 // Just jump to the generic construct code.
465 Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric);
466 Handle<Code> generic_construct_stub(code);
467 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
468 }
469
470
455 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) { 471 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
456 // ----------- S t a t e ------------- 472 // ----------- S t a t e -------------
457 // -- rax: number of arguments 473 // -- rax: number of arguments
458 // -- rdi: constructor function 474 // -- rdi: constructor function
459 // ----------------------------------- 475 // -----------------------------------
460 476
461 Label non_function_call; 477 Label non_function_call;
462 // Check that function is not a smi. 478 // Check that function is not a smi.
463 __ JumpIfSmi(rdi, &non_function_call); 479 __ JumpIfSmi(rdi, &non_function_call);
464 // Check that function is a JSFunction. 480 // Check that function is a JSFunction.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { 858 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) {
843 Generate_JSEntryTrampolineHelper(masm, false); 859 Generate_JSEntryTrampolineHelper(masm, false);
844 } 860 }
845 861
846 862
847 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { 863 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
848 Generate_JSEntryTrampolineHelper(masm, true); 864 Generate_JSEntryTrampolineHelper(masm, true);
849 } 865 }
850 866
851 } } // namespace v8::internal 867 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/v8-counters.h ('k') | test/mjsunit/array-construtor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698