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

Side by Side Diff: src/ia32/builtins-ia32.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 | « src/full-codegen.cc ('k') | src/mips/builtins-mips.cc » ('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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 __ bind(&dont_adapt_arguments); 1309 __ bind(&dont_adapt_arguments);
1310 __ jmp(edx); 1310 __ jmp(edx);
1311 } 1311 }
1312 1312
1313 1313
1314 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { 1314 void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
1315 // Lookup the function in the JavaScript frame. 1315 // Lookup the function in the JavaScript frame.
1316 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1316 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1317 { 1317 {
1318 FrameScope scope(masm, StackFrame::INTERNAL); 1318 FrameScope scope(masm, StackFrame::INTERNAL);
1319 // Lookup and calculate pc offset. 1319 // Pass function as argument.
1320 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerPCOffset));
1321 __ mov(ebx, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset));
1322 __ sub(edx, Immediate(Code::kHeaderSize - kHeapObjectTag));
1323 __ sub(edx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset));
1324 __ SmiTag(edx);
1325
1326 // Pass both function and pc offset as arguments.
1327 __ push(eax); 1320 __ push(eax);
1328 __ push(edx); 1321 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 1);
1329 __ CallRuntime(Runtime::kCompileForOnStackReplacement, 2);
1330 } 1322 }
1331 1323
1332 Label skip; 1324 Label skip;
1333 // If the code object is null, just return to the unoptimized code. 1325 // If the code object is null, just return to the unoptimized code.
1334 __ cmp(eax, Immediate(0)); 1326 __ cmp(eax, Immediate(0));
1335 __ j(not_equal, &skip, Label::kNear); 1327 __ j(not_equal, &skip, Label::kNear);
1336 __ ret(0); 1328 __ ret(0);
1337 1329
1338 __ bind(&skip); 1330 __ bind(&skip);
1339 1331
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 1364
1373 __ bind(&ok); 1365 __ bind(&ok);
1374 __ ret(0); 1366 __ ret(0);
1375 } 1367 }
1376 1368
1377 #undef __ 1369 #undef __
1378 } 1370 }
1379 } // namespace v8::internal 1371 } // namespace v8::internal
1380 1372
1381 #endif // V8_TARGET_ARCH_IA32 1373 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698