| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 // nested functions that don't need literals cloning. If we're running with | 1311 // nested functions that don't need literals cloning. If we're running with |
| 1312 // the --always-opt or the --prepare-always-opt flag, we need to use the | 1312 // the --always-opt or the --prepare-always-opt flag, we need to use the |
| 1313 // runtime function so that the new function we are creating here gets a | 1313 // runtime function so that the new function we are creating here gets a |
| 1314 // chance to have its code optimized and doesn't just get a copy of the | 1314 // chance to have its code optimized and doesn't just get a copy of the |
| 1315 // existing unoptimized code. | 1315 // existing unoptimized code. |
| 1316 if (!FLAG_always_opt && | 1316 if (!FLAG_always_opt && |
| 1317 !FLAG_prepare_always_opt && | 1317 !FLAG_prepare_always_opt && |
| 1318 !pretenure && | 1318 !pretenure && |
| 1319 scope()->is_function_scope() && | 1319 scope()->is_function_scope() && |
| 1320 info->num_literals() == 0) { | 1320 info->num_literals() == 0) { |
| 1321 FastNewClosureStub stub(isolate(), | 1321 FastNewClosureStub stub(isolate(), info->strict_mode(), info->kind()); |
| 1322 info->strict_mode(), | |
| 1323 info->is_generator()); | |
| 1324 __ Mov(x2, Operand(info)); | 1322 __ Mov(x2, Operand(info)); |
| 1325 __ CallStub(&stub); | 1323 __ CallStub(&stub); |
| 1326 } else { | 1324 } else { |
| 1327 __ Mov(x11, Operand(info)); | 1325 __ Mov(x11, Operand(info)); |
| 1328 __ LoadRoot(x10, pretenure ? Heap::kTrueValueRootIndex | 1326 __ LoadRoot(x10, pretenure ? Heap::kTrueValueRootIndex |
| 1329 : Heap::kFalseValueRootIndex); | 1327 : Heap::kFalseValueRootIndex); |
| 1330 __ Push(cp, x11, x10); | 1328 __ Push(cp, x11, x10); |
| 1331 __ CallRuntime(Runtime::kNewClosure, 3); | 1329 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1332 } | 1330 } |
| 1333 context()->Plug(x0); | 1331 context()->Plug(x0); |
| (...skipping 3577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4911 return previous_; | 4909 return previous_; |
| 4912 } | 4910 } |
| 4913 | 4911 |
| 4914 | 4912 |
| 4915 #undef __ | 4913 #undef __ |
| 4916 | 4914 |
| 4917 | 4915 |
| 4918 } } // namespace v8::internal | 4916 } } // namespace v8::internal |
| 4919 | 4917 |
| 4920 #endif // V8_TARGET_ARCH_ARM64 | 4918 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |