| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 isolate()->GetHTracer()->TraceCompilation(&info_); | 143 isolate()->GetHTracer()->TraceCompilation(&info_); |
| 144 } | 144 } |
| 145 | 145 |
| 146 int param_count = descriptor_->register_param_count_; | 146 int param_count = descriptor_->register_param_count_; |
| 147 HEnvironment* start_environment = graph()->start_environment(); | 147 HEnvironment* start_environment = graph()->start_environment(); |
| 148 HBasicBlock* next_block = CreateBasicBlock(start_environment); | 148 HBasicBlock* next_block = CreateBasicBlock(start_environment); |
| 149 current_block()->Goto(next_block); | 149 current_block()->Goto(next_block); |
| 150 next_block->SetJoinId(BailoutId::StubEntry()); | 150 next_block->SetJoinId(BailoutId::StubEntry()); |
| 151 set_current_block(next_block); | 151 set_current_block(next_block); |
| 152 | 152 |
| 153 HConstant* undefined_constant = | |
| 154 Add<HConstant>(isolate()->factory()->undefined_value()); | |
| 155 graph()->set_undefined_constant(undefined_constant); | |
| 156 | |
| 157 for (int i = 0; i < param_count; ++i) { | 153 for (int i = 0; i < param_count; ++i) { |
| 158 HParameter* param = | 154 HParameter* param = |
| 159 Add<HParameter>(i, HParameter::REGISTER_PARAMETER); | 155 Add<HParameter>(i, HParameter::REGISTER_PARAMETER); |
| 160 start_environment->Bind(i, param); | 156 start_environment->Bind(i, param); |
| 161 parameters_[i] = param; | 157 parameters_[i] = param; |
| 162 } | 158 } |
| 163 | 159 |
| 164 HInstruction* stack_parameter_count; | 160 HInstruction* stack_parameter_count; |
| 165 if (descriptor_->stack_parameter_count_.is_valid()) { | 161 if (descriptor_->stack_parameter_count_.is_valid()) { |
| 166 ASSERT(descriptor_->environment_length() == (param_count + 1)); | 162 ASSERT(descriptor_->environment_length() == (param_count + 1)); |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 return js_function; | 1238 return js_function; |
| 1243 } | 1239 } |
| 1244 | 1240 |
| 1245 | 1241 |
| 1246 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { | 1242 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { |
| 1247 return DoGenerateCode(isolate, this); | 1243 return DoGenerateCode(isolate, this); |
| 1248 } | 1244 } |
| 1249 | 1245 |
| 1250 | 1246 |
| 1251 } } // namespace v8::internal | 1247 } } // namespace v8::internal |
| OLD | NEW |