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

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

Issue 3156028: Change code pointer in function objects to a pointer to the first... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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/arm/macro-assembler-arm.cc ('k') | src/ia32/codegen-ia32.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 RelocInfo::CODE_TARGET); 560 RelocInfo::CODE_TARGET);
561 __ bind(&function); 561 __ bind(&function);
562 } 562 }
563 563
564 // 5b. Get the code to call from the function and check that the number of 564 // 5b. Get the code to call from the function and check that the number of
565 // expected arguments matches what we're providing. If so, jump 565 // expected arguments matches what we're providing. If so, jump
566 // (tail-call) to the code in register edx without checking arguments. 566 // (tail-call) to the code in register edx without checking arguments.
567 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 567 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
568 __ mov(ebx, 568 __ mov(ebx,
569 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); 569 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset));
570 __ mov(edx, FieldOperand(edi, JSFunction::kCodeEntryOffset));
570 __ SmiUntag(ebx); 571 __ SmiUntag(ebx);
571 __ mov(edx, FieldOperand(edi, JSFunction::kCodeOffset));
572 __ lea(edx, FieldOperand(edx, Code::kHeaderSize));
573 __ cmp(eax, Operand(ebx)); 572 __ cmp(eax, Operand(ebx));
574 __ j(not_equal, Handle<Code>(builtin(ArgumentsAdaptorTrampoline))); 573 __ j(not_equal, Handle<Code>(builtin(ArgumentsAdaptorTrampoline)));
575 574
576 ParameterCount expected(0); 575 ParameterCount expected(0);
577 __ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION); 576 __ InvokeCode(Operand(edx), expected, expected, JUMP_FUNCTION);
578 } 577 }
579 578
580 579
581 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { 580 void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
582 __ EnterInternalFrame(); 581 __ EnterInternalFrame();
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 __ bind(&dont_adapt_arguments); 1271 __ bind(&dont_adapt_arguments);
1273 __ jmp(Operand(edx)); 1272 __ jmp(Operand(edx));
1274 } 1273 }
1275 1274
1276 1275
1277 #undef __ 1276 #undef __
1278 1277
1279 } } // namespace v8::internal 1278 } } // namespace v8::internal
1280 1279
1281 #endif // V8_TARGET_ARCH_IA32 1280 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698