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

Side by Side Diff: src/arm/lithium-arm.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
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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 UseRegisterAtStart(compare->right())); 1070 UseRegisterAtStart(compare->right()));
1071 } else if (v->IsInstanceOf()) { 1071 } else if (v->IsInstanceOf()) {
1072 HInstanceOf* instance_of = HInstanceOf::cast(v); 1072 HInstanceOf* instance_of = HInstanceOf::cast(v);
1073 LInstruction* result = 1073 LInstruction* result =
1074 new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0), 1074 new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0),
1075 UseFixed(instance_of->right(), r1)); 1075 UseFixed(instance_of->right(), r1));
1076 return MarkAsCall(result, instr); 1076 return MarkAsCall(result, instr);
1077 } else if (v->IsTypeofIs()) { 1077 } else if (v->IsTypeofIs()) {
1078 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1078 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1079 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1079 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1080 } else if (v->IsIsConstructCall()) {
1081 return new LIsConstructCallAndBranch(TempRegister(), TempRegister());
1080 } else { 1082 } else {
1081 if (v->IsConstant()) { 1083 if (v->IsConstant()) {
1082 if (HConstant::cast(v)->handle()->IsTrue()) { 1084 if (HConstant::cast(v)->handle()->IsTrue()) {
1083 return new LGoto(instr->FirstSuccessor()->block_id()); 1085 return new LGoto(instr->FirstSuccessor()->block_id());
1084 } else if (HConstant::cast(v)->handle()->IsFalse()) { 1086 } else if (HConstant::cast(v)->handle()->IsFalse()) {
1085 return new LGoto(instr->SecondSuccessor()->block_id()); 1087 return new LGoto(instr->SecondSuccessor()->block_id());
1086 } 1088 }
1087 } 1089 }
1088 Abort("Undefined compare before branch"); 1090 Abort("Undefined compare before branch");
1089 return NULL; 1091 return NULL;
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { 1885 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
1884 LTypeof* result = new LTypeof(UseRegisterAtStart(instr->value())); 1886 LTypeof* result = new LTypeof(UseRegisterAtStart(instr->value()));
1885 return MarkAsCall(DefineFixed(result, r0), instr); 1887 return MarkAsCall(DefineFixed(result, r0), instr);
1886 } 1888 }
1887 1889
1888 1890
1889 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { 1891 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
1890 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value()))); 1892 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value())));
1891 } 1893 }
1892 1894
1895
1896 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
1897 return DefineAsRegister(new LIsConstructCall(TempRegister()));
1898 }
1899
1900
1893 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 1901 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
1894 HEnvironment* env = current_block_->last_environment(); 1902 HEnvironment* env = current_block_->last_environment();
1895 ASSERT(env != NULL); 1903 ASSERT(env != NULL);
1896 1904
1897 env->set_ast_id(instr->ast_id()); 1905 env->set_ast_id(instr->ast_id());
1898 1906
1899 env->Drop(instr->pop_count()); 1907 env->Drop(instr->pop_count());
1900 for (int i = 0; i < instr->values()->length(); ++i) { 1908 for (int i = 0; i < instr->values()->length(); ++i) {
1901 HValue* value = instr->values()->at(i); 1909 HValue* value = instr->values()->at(i);
1902 if (instr->HasAssignedIndexAt(i)) { 1910 if (instr->HasAssignedIndexAt(i)) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 1950
1943 1951
1944 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1952 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1945 HEnvironment* outer = current_block_->last_environment()->outer(); 1953 HEnvironment* outer = current_block_->last_environment()->outer();
1946 current_block_->UpdateEnvironment(outer); 1954 current_block_->UpdateEnvironment(outer);
1947 return NULL; 1955 return NULL;
1948 } 1956 }
1949 1957
1950 1958
1951 } } // namespace v8::internal 1959 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698