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 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 // space for nested functions that don't need literals cloning. If | 1270 // space for nested functions that don't need literals cloning. If |
1271 // we're running with the --always-opt or the --prepare-always-opt | 1271 // we're running with the --always-opt or the --prepare-always-opt |
1272 // flag, we need to use the runtime function so that the new function | 1272 // flag, we need to use the runtime function so that the new function |
1273 // we are creating here gets a chance to have its code optimized and | 1273 // we are creating here gets a chance to have its code optimized and |
1274 // doesn't just get a copy of the existing unoptimized code. | 1274 // doesn't just get a copy of the existing unoptimized code. |
1275 if (!FLAG_always_opt && | 1275 if (!FLAG_always_opt && |
1276 !FLAG_prepare_always_opt && | 1276 !FLAG_prepare_always_opt && |
1277 !pretenure && | 1277 !pretenure && |
1278 scope()->is_function_scope() && | 1278 scope()->is_function_scope() && |
1279 info->num_literals() == 0) { | 1279 info->num_literals() == 0) { |
1280 FastNewClosureStub stub(info->language_mode()); | 1280 FastNewClosureStub stub(info->language_mode(), info->is_generator()); |
1281 __ li(a0, Operand(info)); | 1281 __ li(a0, Operand(info)); |
1282 __ push(a0); | 1282 __ push(a0); |
1283 __ CallStub(&stub); | 1283 __ CallStub(&stub); |
1284 } else { | 1284 } else { |
1285 __ li(a0, Operand(info)); | 1285 __ li(a0, Operand(info)); |
1286 __ LoadRoot(a1, pretenure ? Heap::kTrueValueRootIndex | 1286 __ LoadRoot(a1, pretenure ? Heap::kTrueValueRootIndex |
1287 : Heap::kFalseValueRootIndex); | 1287 : Heap::kFalseValueRootIndex); |
1288 __ Push(cp, a0, a1); | 1288 __ Push(cp, a0, a1); |
1289 __ CallRuntime(Runtime::kNewClosure, 3); | 1289 __ CallRuntime(Runtime::kNewClosure, 3); |
1290 } | 1290 } |
(...skipping 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4605 *context_length = 0; | 4605 *context_length = 0; |
4606 return previous_; | 4606 return previous_; |
4607 } | 4607 } |
4608 | 4608 |
4609 | 4609 |
4610 #undef __ | 4610 #undef __ |
4611 | 4611 |
4612 } } // namespace v8::internal | 4612 } } // namespace v8::internal |
4613 | 4613 |
4614 #endif // V8_TARGET_ARCH_MIPS | 4614 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |