| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 | 
| 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 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1198 | 1198 | 
| 1199 | 1199 | 
| 1200 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | 1200 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | 
| 1201                                        bool pretenure) { | 1201                                        bool pretenure) { | 
| 1202   // Use the fast case closure allocation code that allocates in new space for | 1202   // Use the fast case closure allocation code that allocates in new space for | 
| 1203   // nested functions that don't need literals cloning. If we're running with | 1203   // nested functions that don't need literals cloning. If we're running with | 
| 1204   // the --always-opt or the --prepare-always-opt flag, we need to use the | 1204   // the --always-opt or the --prepare-always-opt flag, we need to use the | 
| 1205   // runtime function so that the new function we are creating here gets a | 1205   // runtime function so that the new function we are creating here gets a | 
| 1206   // chance to have its code optimized and doesn't just get a copy of the | 1206   // chance to have its code optimized and doesn't just get a copy of the | 
| 1207   // existing unoptimized code. | 1207   // existing unoptimized code. | 
| 1208   if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && | 1208   if (!FLAG_always_opt && | 
| 1209       scope()->is_function_scope()) { | 1209       !FLAG_prepare_always_opt && | 
|  | 1210       !pretenure && | 
|  | 1211       scope()->is_function_scope() && | 
|  | 1212       info->num_literals() == 0) { | 
| 1210     FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1213     FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 
| 1211     __ Mov(x2, Operand(info)); | 1214     __ Mov(x2, Operand(info)); | 
| 1212     __ CallStub(&stub); | 1215     __ CallStub(&stub); | 
| 1213   } else { | 1216   } else { | 
| 1214     __ Push(info); | 1217     __ Push(info); | 
| 1215     __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | 1218     __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | 
| 1216                              : Runtime::kNewClosure); | 1219                              : Runtime::kNewClosure); | 
| 1217   } | 1220   } | 
| 1218   context()->Plug(x0); | 1221   context()->Plug(x0); | 
| 1219 } | 1222 } | 
| (...skipping 3615 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4835   } | 4838   } | 
| 4836 | 4839 | 
| 4837   return INTERRUPT; | 4840   return INTERRUPT; | 
| 4838 } | 4841 } | 
| 4839 | 4842 | 
| 4840 | 4843 | 
| 4841 }  // namespace internal | 4844 }  // namespace internal | 
| 4842 }  // namespace v8 | 4845 }  // namespace v8 | 
| 4843 | 4846 | 
| 4844 #endif  // V8_TARGET_ARCH_ARM64 | 4847 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW | 
|---|