OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 // we're running with the --always-opt or the --prepare-always-opt | 1200 // we're running with the --always-opt or the --prepare-always-opt |
1201 // flag, we need to use the runtime function so that the new function | 1201 // flag, we need to use the runtime function so that the new function |
1202 // we are creating here gets a chance to have its code optimized and | 1202 // we are creating here gets a chance to have its code optimized and |
1203 // doesn't just get a copy of the existing unoptimized code. | 1203 // doesn't just get a copy of the existing unoptimized code. |
1204 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && | 1204 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && |
1205 scope()->is_function_scope() && info->num_literals() == 0) { | 1205 scope()->is_function_scope() && info->num_literals() == 0) { |
1206 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1206 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
1207 __ mov(r5, Operand(info)); | 1207 __ mov(r5, Operand(info)); |
1208 __ CallStub(&stub); | 1208 __ CallStub(&stub); |
1209 } else { | 1209 } else { |
1210 __ mov(r3, Operand(info)); | 1210 __ Push(info); |
1211 __ LoadRoot( | 1211 __ CallRuntime( |
1212 r4, pretenure ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); | 1212 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); |
1213 __ Push(cp, r3, r4); | |
1214 __ CallRuntime(Runtime::kNewClosure, 3); | |
1215 } | 1213 } |
1216 context()->Plug(r3); | 1214 context()->Plug(r3); |
1217 } | 1215 } |
1218 | 1216 |
1219 | 1217 |
1220 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, | 1218 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
1221 int offset, | 1219 int offset, |
1222 FeedbackVectorICSlot slot) { | 1220 FeedbackVectorICSlot slot) { |
1223 if (NeedsHomeObject(initializer)) { | 1221 if (NeedsHomeObject(initializer)) { |
1224 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1222 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
(...skipping 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5313 return ON_STACK_REPLACEMENT; | 5311 return ON_STACK_REPLACEMENT; |
5314 } | 5312 } |
5315 | 5313 |
5316 DCHECK(interrupt_address == | 5314 DCHECK(interrupt_address == |
5317 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5315 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5318 return OSR_AFTER_STACK_CHECK; | 5316 return OSR_AFTER_STACK_CHECK; |
5319 } | 5317 } |
5320 } // namespace internal | 5318 } // namespace internal |
5321 } // namespace v8 | 5319 } // namespace v8 |
5322 #endif // V8_TARGET_ARCH_PPC | 5320 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |