| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 // we're running with the --always-opt or the --prepare-always-opt | 1323 // we're running with the --always-opt or the --prepare-always-opt |
| 1324 // flag, we need to use the runtime function so that the new function | 1324 // flag, we need to use the runtime function so that the new function |
| 1325 // we are creating here gets a chance to have its code optimized and | 1325 // we are creating here gets a chance to have its code optimized and |
| 1326 // doesn't just get a copy of the existing unoptimized code. | 1326 // doesn't just get a copy of the existing unoptimized code. |
| 1327 if (!FLAG_always_opt && | 1327 if (!FLAG_always_opt && |
| 1328 !FLAG_prepare_always_opt && | 1328 !FLAG_prepare_always_opt && |
| 1329 !pretenure && | 1329 !pretenure && |
| 1330 scope()->is_function_scope() && | 1330 scope()->is_function_scope() && |
| 1331 info->num_literals() == 0) { | 1331 info->num_literals() == 0) { |
| 1332 FastNewClosureStub stub(info->language_mode(), info->is_generator()); | 1332 FastNewClosureStub stub(info->language_mode(), info->is_generator()); |
| 1333 __ mov(r0, Operand(info)); | 1333 __ mov(r2, Operand(info)); |
| 1334 __ push(r0); | |
| 1335 __ CallStub(&stub); | 1334 __ CallStub(&stub); |
| 1336 } else { | 1335 } else { |
| 1337 __ mov(r0, Operand(info)); | 1336 __ mov(r0, Operand(info)); |
| 1338 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex | 1337 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex |
| 1339 : Heap::kFalseValueRootIndex); | 1338 : Heap::kFalseValueRootIndex); |
| 1340 __ Push(cp, r0, r1); | 1339 __ Push(cp, r0, r1); |
| 1341 __ CallRuntime(Runtime::kNewClosure, 3); | 1340 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1342 } | 1341 } |
| 1343 context()->Plug(r0); | 1342 context()->Plug(r0); |
| 1344 } | 1343 } |
| (...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4887 *context_length = 0; | 4886 *context_length = 0; |
| 4888 return previous_; | 4887 return previous_; |
| 4889 } | 4888 } |
| 4890 | 4889 |
| 4891 | 4890 |
| 4892 #undef __ | 4891 #undef __ |
| 4893 | 4892 |
| 4894 } } // namespace v8::internal | 4893 } } // namespace v8::internal |
| 4895 | 4894 |
| 4896 #endif // V8_TARGET_ARCH_ARM | 4895 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |