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

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

Issue 6368138: Support %_IsConstructCall in Crankshaft pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: don't check argc_bound twice Created 9 years, 10 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/x64/lithium-codegen-x64.cc ('K') | « src/x64/lithium-x64.h ('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 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } else if (v->IsInstanceOf()) { 1075 } else if (v->IsInstanceOf()) {
1076 HInstanceOf* instance_of = HInstanceOf::cast(v); 1076 HInstanceOf* instance_of = HInstanceOf::cast(v);
1077 LInstanceOfAndBranch* result = 1077 LInstanceOfAndBranch* result =
1078 new LInstanceOfAndBranch( 1078 new LInstanceOfAndBranch(
1079 UseFixed(instance_of->left(), InstanceofStub::left()), 1079 UseFixed(instance_of->left(), InstanceofStub::left()),
1080 UseFixed(instance_of->right(), InstanceofStub::right())); 1080 UseFixed(instance_of->right(), InstanceofStub::right()));
1081 return MarkAsCall(result, instr); 1081 return MarkAsCall(result, instr);
1082 } else if (v->IsTypeofIs()) { 1082 } else if (v->IsTypeofIs()) {
1083 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1083 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1084 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1084 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1085 } else if (v->IsIsConstructCall()) {
1086 return new LIsConstructCallAndBranch(TempRegister());
1085 } else { 1087 } else {
1086 if (v->IsConstant()) { 1088 if (v->IsConstant()) {
1087 if (HConstant::cast(v)->handle()->IsTrue()) { 1089 if (HConstant::cast(v)->handle()->IsTrue()) {
1088 return new LGoto(instr->FirstSuccessor()->block_id()); 1090 return new LGoto(instr->FirstSuccessor()->block_id());
1089 } else if (HConstant::cast(v)->handle()->IsFalse()) { 1091 } else if (HConstant::cast(v)->handle()->IsFalse()) {
1090 return new LGoto(instr->SecondSuccessor()->block_id()); 1092 return new LGoto(instr->SecondSuccessor()->block_id());
1091 } 1093 }
1092 } 1094 }
1093 Abort("Undefined compare before branch"); 1095 Abort("Undefined compare before branch");
1094 return NULL; 1096 return NULL;
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 Abort("Unimplemented: %s", "DoTypeof"); 1758 Abort("Unimplemented: %s", "DoTypeof");
1757 return NULL; 1759 return NULL;
1758 } 1760 }
1759 1761
1760 1762
1761 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { 1763 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
1762 Abort("Unimplemented: %s", "DoTypeofIs"); 1764 Abort("Unimplemented: %s", "DoTypeofIs");
1763 return NULL; 1765 return NULL;
1764 } 1766 }
1765 1767
1768
1769 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
1770 return DefineAsRegister(new LIsConstructCall);
1771 }
1772
1773
1766 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 1774 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
1767 HEnvironment* env = current_block_->last_environment(); 1775 HEnvironment* env = current_block_->last_environment();
1768 ASSERT(env != NULL); 1776 ASSERT(env != NULL);
1769 1777
1770 env->set_ast_id(instr->ast_id()); 1778 env->set_ast_id(instr->ast_id());
1771 1779
1772 env->Drop(instr->pop_count()); 1780 env->Drop(instr->pop_count());
1773 for (int i = 0; i < instr->values()->length(); ++i) { 1781 for (int i = 0; i < instr->values()->length(); ++i) {
1774 HValue* value = instr->values()->at(i); 1782 HValue* value = instr->values()->at(i);
1775 if (instr->HasAssignedIndexAt(i)) { 1783 if (instr->HasAssignedIndexAt(i)) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 1823
1816 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1824 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1817 HEnvironment* outer = current_block_->last_environment()->outer(); 1825 HEnvironment* outer = current_block_->last_environment()->outer();
1818 current_block_->UpdateEnvironment(outer); 1826 current_block_->UpdateEnvironment(outer);
1819 return NULL; 1827 return NULL;
1820 } 1828 }
1821 1829
1822 } } // namespace v8::internal 1830 } } // namespace v8::internal
1823 1831
1824 #endif // V8_TARGET_ARCH_X64 1832 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/x64/lithium-codegen-x64.cc ('K') | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698