| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 | 1178 |
| 1179 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | 1179 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
| 1180 bool pretenure) { | 1180 bool pretenure) { |
| 1181 // Use the fast case closure allocation code that allocates in new | 1181 // Use the fast case closure allocation code that allocates in new |
| 1182 // space for nested functions that don't need literals cloning. If | 1182 // space for nested functions that don't need literals cloning. If |
| 1183 // we're running with the --always-opt or the --prepare-always-opt | 1183 // we're running with the --always-opt or the --prepare-always-opt |
| 1184 // flag, we need to use the runtime function so that the new function | 1184 // flag, we need to use the runtime function so that the new function |
| 1185 // we are creating here gets a chance to have its code optimized and | 1185 // we are creating here gets a chance to have its code optimized and |
| 1186 // doesn't just get a copy of the existing unoptimized code. | 1186 // doesn't just get a copy of the existing unoptimized code. |
| 1187 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && | 1187 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && |
| 1188 scope()->is_function_scope() && info->num_literals() == 0) { | 1188 scope()->is_function_scope()) { |
| 1189 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1189 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
| 1190 __ mov(r5, Operand(info)); | 1190 __ mov(r5, Operand(info)); |
| 1191 __ CallStub(&stub); | 1191 __ CallStub(&stub); |
| 1192 } else { | 1192 } else { |
| 1193 __ Push(info); | 1193 __ Push(info); |
| 1194 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | 1194 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured |
| 1195 : Runtime::kNewClosure); | 1195 : Runtime::kNewClosure); |
| 1196 } | 1196 } |
| 1197 context()->Plug(r3); | 1197 context()->Plug(r3); |
| 1198 } | 1198 } |
| (...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4767 return ON_STACK_REPLACEMENT; | 4767 return ON_STACK_REPLACEMENT; |
| 4768 } | 4768 } |
| 4769 | 4769 |
| 4770 DCHECK(interrupt_address == | 4770 DCHECK(interrupt_address == |
| 4771 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4771 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4772 return OSR_AFTER_STACK_CHECK; | 4772 return OSR_AFTER_STACK_CHECK; |
| 4773 } | 4773 } |
| 4774 } // namespace internal | 4774 } // namespace internal |
| 4775 } // namespace v8 | 4775 } // namespace v8 |
| 4776 #endif // V8_TARGET_ARCH_PPC | 4776 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |