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

Side by Side Diff: src/ia32/lithium-ia32.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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 } else if (v->IsInstanceOf()) { 1091 } else if (v->IsInstanceOf()) {
1092 HInstanceOf* instance_of = HInstanceOf::cast(v); 1092 HInstanceOf* instance_of = HInstanceOf::cast(v);
1093 LInstanceOfAndBranch* result = 1093 LInstanceOfAndBranch* result =
1094 new LInstanceOfAndBranch( 1094 new LInstanceOfAndBranch(
1095 UseFixed(instance_of->left(), InstanceofStub::left()), 1095 UseFixed(instance_of->left(), InstanceofStub::left()),
1096 UseFixed(instance_of->right(), InstanceofStub::right())); 1096 UseFixed(instance_of->right(), InstanceofStub::right()));
1097 return MarkAsCall(result, instr); 1097 return MarkAsCall(result, instr);
1098 } else if (v->IsTypeofIs()) { 1098 } else if (v->IsTypeofIs()) {
1099 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1099 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1100 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1100 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1101 } else if (v->IsIsConstructCall()) {
1102 return new LIsConstructCallAndBranch(TempRegister());
1101 } else { 1103 } else {
1102 if (v->IsConstant()) { 1104 if (v->IsConstant()) {
1103 if (HConstant::cast(v)->handle()->IsTrue()) { 1105 if (HConstant::cast(v)->handle()->IsTrue()) {
1104 return new LGoto(instr->FirstSuccessor()->block_id()); 1106 return new LGoto(instr->FirstSuccessor()->block_id());
1105 } else if (HConstant::cast(v)->handle()->IsFalse()) { 1107 } else if (HConstant::cast(v)->handle()->IsFalse()) {
1106 return new LGoto(instr->SecondSuccessor()->block_id()); 1108 return new LGoto(instr->SecondSuccessor()->block_id());
1107 } 1109 }
1108 } 1110 }
1109 Abort("Undefined compare before branch"); 1111 Abort("Undefined compare before branch");
1110 return NULL; 1112 return NULL;
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { 1920 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
1919 LTypeof* result = new LTypeof(UseAtStart(instr->value())); 1921 LTypeof* result = new LTypeof(UseAtStart(instr->value()));
1920 return MarkAsCall(DefineFixed(result, eax), instr); 1922 return MarkAsCall(DefineFixed(result, eax), instr);
1921 } 1923 }
1922 1924
1923 1925
1924 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { 1926 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
1925 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value()))); 1927 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value())));
1926 } 1928 }
1927 1929
1930
1931 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
1932 return DefineAsRegister(new LIsConstructCall);
1933 }
1934
1935
1928 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 1936 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
1929 HEnvironment* env = current_block_->last_environment(); 1937 HEnvironment* env = current_block_->last_environment();
1930 ASSERT(env != NULL); 1938 ASSERT(env != NULL);
1931 1939
1932 env->set_ast_id(instr->ast_id()); 1940 env->set_ast_id(instr->ast_id());
1933 1941
1934 env->Drop(instr->pop_count()); 1942 env->Drop(instr->pop_count());
1935 for (int i = 0; i < instr->values()->length(); ++i) { 1943 for (int i = 0; i < instr->values()->length(); ++i) {
1936 HValue* value = instr->values()->at(i); 1944 HValue* value = instr->values()->at(i);
1937 if (instr->HasAssignedIndexAt(i)) { 1945 if (instr->HasAssignedIndexAt(i)) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1987 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1980 HEnvironment* outer = current_block_->last_environment()->outer(); 1988 HEnvironment* outer = current_block_->last_environment()->outer();
1981 current_block_->UpdateEnvironment(outer); 1989 current_block_->UpdateEnvironment(outer);
1982 return NULL; 1990 return NULL;
1983 } 1991 }
1984 1992
1985 1993
1986 } } // namespace v8::internal 1994 } } // namespace v8::internal
1987 1995
1988 #endif // V8_TARGET_ARCH_IA32 1996 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698