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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 // doesn't just get a copy of the existing unoptimized code. | 1158 // doesn't just get a copy of the existing unoptimized code. |
1159 if (!FLAG_always_opt && | 1159 if (!FLAG_always_opt && |
1160 !FLAG_prepare_always_opt && | 1160 !FLAG_prepare_always_opt && |
1161 !pretenure && | 1161 !pretenure && |
1162 scope()->is_function_scope() && | 1162 scope()->is_function_scope() && |
1163 info->num_literals() == 0) { | 1163 info->num_literals() == 0) { |
1164 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1164 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
1165 __ mov(ebx, Immediate(info)); | 1165 __ mov(ebx, Immediate(info)); |
1166 __ CallStub(&stub); | 1166 __ CallStub(&stub); |
1167 } else { | 1167 } else { |
1168 __ push(esi); | |
1169 __ push(Immediate(info)); | 1168 __ push(Immediate(info)); |
1170 __ push(Immediate(pretenure | 1169 __ CallRuntime( |
1171 ? isolate()->factory()->true_value() | 1170 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); |
1172 : isolate()->factory()->false_value())); | |
1173 __ CallRuntime(Runtime::kNewClosure, 3); | |
1174 } | 1171 } |
1175 context()->Plug(eax); | 1172 context()->Plug(eax); |
1176 } | 1173 } |
1177 | 1174 |
1178 | 1175 |
1179 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1176 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
1180 int offset, | 1177 int offset, |
1181 FeedbackVectorICSlot slot) { | 1178 FeedbackVectorICSlot slot) { |
1182 if (NeedsHomeObject(initializer)) { | 1179 if (NeedsHomeObject(initializer)) { |
1183 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); | 1180 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); |
(...skipping 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5214 Assembler::target_address_at(call_target_address, | 5211 Assembler::target_address_at(call_target_address, |
5215 unoptimized_code)); | 5212 unoptimized_code)); |
5216 return OSR_AFTER_STACK_CHECK; | 5213 return OSR_AFTER_STACK_CHECK; |
5217 } | 5214 } |
5218 | 5215 |
5219 | 5216 |
5220 } // namespace internal | 5217 } // namespace internal |
5221 } // namespace v8 | 5218 } // namespace v8 |
5222 | 5219 |
5223 #endif // V8_TARGET_ARCH_X87 | 5220 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |