OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 HAdd::New(zone, context_, stack_parameter_count, amount)); | 179 HAdd::New(zone, context_, stack_parameter_count, amount)); |
180 stack_pop_count->ChangeRepresentation(Representation::Integer32()); | 180 stack_pop_count->ChangeRepresentation(Representation::Integer32()); |
181 stack_pop_count->ClearFlag(HValue::kCanOverflow); | 181 stack_pop_count->ClearFlag(HValue::kCanOverflow); |
182 } else { | 182 } else { |
183 int count = descriptor_->hint_stack_parameter_count_; | 183 int count = descriptor_->hint_stack_parameter_count_; |
184 stack_pop_count = AddInstruction(new(zone) | 184 stack_pop_count = AddInstruction(new(zone) |
185 HConstant(count, Representation::Integer32())); | 185 HConstant(count, Representation::Integer32())); |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 if (!current_block()->IsFinished()) { | 189 if (current_block() != NULL) { |
190 HReturn* hreturn_instruction = new(zone) HReturn(return_value, | 190 HReturn* hreturn_instruction = new(zone) HReturn(return_value, |
191 context_, | 191 context_, |
192 stack_pop_count); | 192 stack_pop_count); |
193 current_block()->Finish(hreturn_instruction); | 193 current_block()->Finish(hreturn_instruction); |
| 194 set_current_block(NULL); |
194 } | 195 } |
195 return true; | 196 return true; |
196 } | 197 } |
197 | 198 |
198 | 199 |
199 template <class Stub> | 200 template <class Stub> |
200 class CodeStubGraphBuilder: public CodeStubGraphBuilderBase { | 201 class CodeStubGraphBuilder: public CodeStubGraphBuilderBase { |
201 public: | 202 public: |
202 explicit CodeStubGraphBuilder(Stub* stub) | 203 explicit CodeStubGraphBuilder(Stub* stub) |
203 : CodeStubGraphBuilderBase(Isolate::Current(), stub) {} | 204 : CodeStubGraphBuilderBase(Isolate::Current(), stub) {} |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 ? graph()->GetConstant1() | 668 ? graph()->GetConstant1() |
668 : graph()->GetConstantUndefined(); | 669 : graph()->GetConstantUndefined(); |
669 } | 670 } |
670 | 671 |
671 | 672 |
672 Handle<Code> CompareNilICStub::GenerateCode() { | 673 Handle<Code> CompareNilICStub::GenerateCode() { |
673 return DoGenerateCode(this); | 674 return DoGenerateCode(this); |
674 } | 675 } |
675 | 676 |
676 } } // namespace v8::internal | 677 } } // namespace v8::internal |
OLD | NEW |