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

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

Issue 7966038: Record function call targets, use them for inlining. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/mark-compact.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 } 1681 }
1682 1682
1683 1683
1684 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { 1684 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
1685 LOperand* value = UseAtStart(instr->value()); 1685 LOperand* value = UseAtStart(instr->value());
1686 return AssignEnvironment(new LCheckSmi(value)); 1686 return AssignEnvironment(new LCheckSmi(value));
1687 } 1687 }
1688 1688
1689 1689
1690 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { 1690 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
1691 LOperand* value = UseAtStart(instr->value()); 1691 // If the target is in new space, we'll emit a global cell compare and so
1692 // want the value in a register. If the target gets promoted before we
1693 // emit code, we will still get the register but will do an immediate
1694 // compare instead of the cell compare. This is safe.
1695 LOperand* value = Isolate::Current()->heap()->InNewSpace(*instr->target())
1696 ? UseRegisterAtStart(instr->value())
1697 : UseAtStart(instr->value());
1692 return AssignEnvironment(new LCheckFunction(value)); 1698 return AssignEnvironment(new LCheckFunction(value));
1693 } 1699 }
1694 1700
1695 1701
1696 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { 1702 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) {
1697 LOperand* value = UseRegisterAtStart(instr->value()); 1703 LOperand* value = UseRegisterAtStart(instr->value());
1698 LCheckMap* result = new LCheckMap(value); 1704 LCheckMap* result = new LCheckMap(value);
1699 return AssignEnvironment(result); 1705 return AssignEnvironment(result);
1700 } 1706 }
1701 1707
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 LOperand* key = UseOrConstantAtStart(instr->key()); 2274 LOperand* key = UseOrConstantAtStart(instr->key());
2269 LOperand* object = UseOrConstantAtStart(instr->object()); 2275 LOperand* object = UseOrConstantAtStart(instr->object());
2270 LIn* result = new LIn(context, key, object); 2276 LIn* result = new LIn(context, key, object);
2271 return MarkAsCall(DefineFixed(result, eax), instr); 2277 return MarkAsCall(DefineFixed(result, eax), instr);
2272 } 2278 }
2273 2279
2274 2280
2275 } } // namespace v8::internal 2281 } } // namespace v8::internal
2276 2282
2277 #endif // V8_TARGET_ARCH_IA32 2283 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698