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

Side by Side Diff: src/stub-cache-ia32.cc

Issue 4035: Refactored the code for entering and leaving exit frames (calls... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
« src/codegen-ia32.cc ('K') | « src/stub-cache-arm.cc ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // Enter an internal frame. 469 // Enter an internal frame.
470 __ EnterInternalFrame(); 470 __ EnterInternalFrame();
471 471
472 // Push a copy of the function onto the stack. 472 // Push a copy of the function onto the stack.
473 __ push(edi); 473 __ push(edi);
474 474
475 __ push(edi); // function is also the parameter to the runtime call 475 __ push(edi); // function is also the parameter to the runtime call
476 __ CallRuntime(Runtime::kLazyCompile, 1); 476 __ CallRuntime(Runtime::kLazyCompile, 1);
477 __ pop(edi); 477 __ pop(edi);
478 478
479 __ ExitInternalFrame(); 479 __ LeaveInternalFrame();
480 480
481 // Do a tail-call of the compiled function. 481 // Do a tail-call of the compiled function.
482 __ lea(ecx, FieldOperand(eax, Code::kHeaderSize)); 482 __ lea(ecx, FieldOperand(eax, Code::kHeaderSize));
483 __ jmp(Operand(ecx)); 483 __ jmp(Operand(ecx));
484 484
485 return GetCodeWithFlags(flags); 485 return GetCodeWithFlags(flags);
486 } 486 }
487 487
488 488
489 Object* CallStubCompiler::CompileCallField(Object* object, 489 Object* CallStubCompiler::CompileCallField(Object* object,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 __ mov(Operand(ebx), Immediate(load_interceptor)); 680 __ mov(Operand(ebx), Immediate(load_interceptor));
681 681
682 CEntryStub stub; 682 CEntryStub stub;
683 __ CallStub(&stub); 683 __ CallStub(&stub);
684 684
685 // Move result to edi and restore receiver. 685 // Move result to edi and restore receiver.
686 __ mov(Operand(edi), eax); 686 __ mov(Operand(edi), eax);
687 __ mov(edx, Operand(ebp, (argc + 2) * kPointerSize)); // receiver 687 __ mov(edx, Operand(ebp, (argc + 2) * kPointerSize)); // receiver
688 688
689 // Exit frame. 689 // Exit frame.
690 __ ExitInternalFrame(); 690 __ LeaveInternalFrame();
691 691
692 // Check that the function really is a function. 692 // Check that the function really is a function.
693 __ test(edi, Immediate(kSmiTagMask)); 693 __ test(edi, Immediate(kSmiTagMask));
694 __ j(zero, &miss, not_taken); 694 __ j(zero, &miss, not_taken);
695 __ mov(ebx, FieldOperand(edi, HeapObject::kMapOffset)); 695 __ mov(ebx, FieldOperand(edi, HeapObject::kMapOffset));
696 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); 696 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
697 __ cmp(ebx, JS_FUNCTION_TYPE); 697 __ cmp(ebx, JS_FUNCTION_TYPE);
698 __ j(not_equal, &miss, not_taken); 698 __ j(not_equal, &miss, not_taken);
699 699
700 // Invoke the function. 700 // Invoke the function.
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 1232 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
1233 1233
1234 // Return the generated code. 1234 // Return the generated code.
1235 return GetCode(CALLBACKS); 1235 return GetCode(CALLBACKS);
1236 } 1236 }
1237 1237
1238 1238
1239 #undef __ 1239 #undef __
1240 1240
1241 } } // namespace v8::internal 1241 } } // namespace v8::internal
OLDNEW
« src/codegen-ia32.cc ('K') | « src/stub-cache-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698