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

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

Issue 99013003: Fix incorrect patching for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comment 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 | « no previous file | src/compiler.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 920 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 | « no previous file | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698