OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 // doesn't just get a copy of the existing unoptimized code. | 1193 // doesn't just get a copy of the existing unoptimized code. |
1194 if (!FLAG_always_opt && | 1194 if (!FLAG_always_opt && |
1195 !FLAG_prepare_always_opt && | 1195 !FLAG_prepare_always_opt && |
1196 !pretenure && | 1196 !pretenure && |
1197 scope()->is_function_scope() && | 1197 scope()->is_function_scope() && |
1198 info->num_literals() == 0) { | 1198 info->num_literals() == 0) { |
1199 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1199 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
1200 __ Move(rbx, info); | 1200 __ Move(rbx, info); |
1201 __ CallStub(&stub); | 1201 __ CallStub(&stub); |
1202 } else { | 1202 } else { |
1203 __ Push(rsi); | |
1204 __ Push(info); | 1203 __ Push(info); |
1205 __ Push(pretenure | 1204 __ CallRuntime( |
1206 ? isolate()->factory()->true_value() | 1205 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); |
1207 : isolate()->factory()->false_value()); | |
1208 __ CallRuntime(Runtime::kNewClosure, 3); | |
1209 } | 1206 } |
1210 context()->Plug(rax); | 1207 context()->Plug(rax); |
1211 } | 1208 } |
1212 | 1209 |
1213 | 1210 |
1214 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1211 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
1215 int offset, | 1212 int offset, |
1216 FeedbackVectorICSlot slot) { | 1213 FeedbackVectorICSlot slot) { |
1217 if (NeedsHomeObject(initializer)) { | 1214 if (NeedsHomeObject(initializer)) { |
1218 __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0)); | 1215 __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0)); |
(...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5251 Assembler::target_address_at(call_target_address, | 5248 Assembler::target_address_at(call_target_address, |
5252 unoptimized_code)); | 5249 unoptimized_code)); |
5253 return OSR_AFTER_STACK_CHECK; | 5250 return OSR_AFTER_STACK_CHECK; |
5254 } | 5251 } |
5255 | 5252 |
5256 | 5253 |
5257 } // namespace internal | 5254 } // namespace internal |
5258 } // namespace v8 | 5255 } // namespace v8 |
5259 | 5256 |
5260 #endif // V8_TARGET_ARCH_X64 | 5257 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |