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

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

Issue 112863002: Merge bleeding_edge 18021:18297 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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/arm/assembler-arm-inl.h ('k') | src/arm/code-stubs-arm.h » ('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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 686
687 687
688 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, 688 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
689 bool is_construct) { 689 bool is_construct) {
690 // Called from Generate_JS_Entry 690 // Called from Generate_JS_Entry
691 // r0: code entry 691 // r0: code entry
692 // r1: function 692 // r1: function
693 // r2: receiver 693 // r2: receiver
694 // r3: argc 694 // r3: argc
695 // r4: argv 695 // r4: argv
696 // r5-r6, r7 (if not FLAG_enable_ool_constant_pool) and cp may be clobbered 696 // r5-r6, r8 (if not FLAG_enable_ool_constant_pool) and cp may be clobbered
697 ProfileEntryHookStub::MaybeCallEntryHook(masm); 697 ProfileEntryHookStub::MaybeCallEntryHook(masm);
698 698
699 // Clear the context before we push it when entering the internal frame. 699 // Clear the context before we push it when entering the internal frame.
700 __ mov(cp, Operand::Zero()); 700 __ mov(cp, Operand::Zero());
701 701
702 // Enter an internal frame. 702 // Enter an internal frame.
703 { 703 {
704 FrameScope scope(masm, StackFrame::INTERNAL); 704 FrameScope scope(masm, StackFrame::INTERNAL);
705 705
706 // Set up the context from the function argument. 706 // Set up the context from the function argument.
(...skipping 20 matching lines...) Expand all
727 __ bind(&entry); 727 __ bind(&entry);
728 __ cmp(r4, r2); 728 __ cmp(r4, r2);
729 __ b(ne, &loop); 729 __ b(ne, &loop);
730 730
731 // Initialize all JavaScript callee-saved registers, since they will be seen 731 // Initialize all JavaScript callee-saved registers, since they will be seen
732 // by the garbage collector as part of handlers. 732 // by the garbage collector as part of handlers.
733 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); 733 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex);
734 __ mov(r5, Operand(r4)); 734 __ mov(r5, Operand(r4));
735 __ mov(r6, Operand(r4)); 735 __ mov(r6, Operand(r4));
736 if (!FLAG_enable_ool_constant_pool) { 736 if (!FLAG_enable_ool_constant_pool) {
737 __ mov(r7, Operand(r4)); 737 __ mov(r8, Operand(r4));
738 } 738 }
739 if (kR9Available == 1) { 739 if (kR9Available == 1) {
740 __ mov(r9, Operand(r4)); 740 __ mov(r9, Operand(r4));
741 } 741 }
742 742
743 // Invoke the code and pass argc as r0. 743 // Invoke the code and pass argc as r0.
744 __ mov(r0, Operand(r3)); 744 __ mov(r0, Operand(r3));
745 if (is_construct) { 745 if (is_construct) {
746 // No type feedback cell is available 746 // No type feedback cell is available
747 Handle<Object> undefined_sentinel( 747 Handle<Object> undefined_sentinel(
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { 931 void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) {
932 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); 932 Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY);
933 } 933 }
934 934
935 935
936 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { 936 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
937 // Lookup the function in the JavaScript frame. 937 // Lookup the function in the JavaScript frame.
938 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 938 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
939 { 939 {
940 FrameScope scope(masm, StackFrame::INTERNAL); 940 FrameScope scope(masm, StackFrame::INTERNAL);
941 // Lookup and calculate pc offset. 941 // Pass function as argument.
942 __ ldr(r1, MemOperand(fp, StandardFrameConstants::kCallerPCOffset));
943 __ ldr(r2, FieldMemOperand(r0, JSFunction::kSharedFunctionInfoOffset));
944 __ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset));
945 __ sub(r1, r1, Operand(Code::kHeaderSize - kHeapObjectTag));
946 __ sub(r1, r1, r2);
947 __ SmiTag(r1);
948
949 // Pass both function and pc offset as arguments.
950 __ push(r0); 942 __ push(r0);
951 __ push(r1); 943 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
952 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 2);
953 } 944 }
954 945
955 // If the code object is null, just return to the unoptimized code. 946 // If the code object is null, just return to the unoptimized code.
956 Label skip; 947 Label skip;
957 __ cmp(r0, Operand(Smi::FromInt(0))); 948 __ cmp(r0, Operand(Smi::FromInt(0)));
958 __ b(ne, &skip); 949 __ b(ne, &skip);
959 __ Ret(); 950 __ Ret();
960 951
961 __ bind(&skip); 952 __ bind(&skip);
962 953
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 __ bind(&dont_adapt_arguments); 1473 __ bind(&dont_adapt_arguments);
1483 __ Jump(r3); 1474 __ Jump(r3);
1484 } 1475 }
1485 1476
1486 1477
1487 #undef __ 1478 #undef __
1488 1479
1489 } } // namespace v8::internal 1480 } } // namespace v8::internal
1490 1481
1491 #endif // V8_TARGET_ARCH_ARM 1482 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm/code-stubs-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698