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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 // we're running with the --always-opt or the --prepare-always-opt | 1326 // we're running with the --always-opt or the --prepare-always-opt |
1327 // flag, we need to use the runtime function so that the new function | 1327 // flag, we need to use the runtime function so that the new function |
1328 // we are creating here gets a chance to have its code optimized and | 1328 // we are creating here gets a chance to have its code optimized and |
1329 // doesn't just get a copy of the existing unoptimized code. | 1329 // doesn't just get a copy of the existing unoptimized code. |
1330 if (!FLAG_always_opt && | 1330 if (!FLAG_always_opt && |
1331 !FLAG_prepare_always_opt && | 1331 !FLAG_prepare_always_opt && |
1332 !pretenure && | 1332 !pretenure && |
1333 scope()->is_function_scope() && | 1333 scope()->is_function_scope() && |
1334 info->num_literals() == 0) { | 1334 info->num_literals() == 0) { |
1335 FastNewClosureStub stub(info->language_mode(), info->is_generator()); | 1335 FastNewClosureStub stub(info->language_mode(), info->is_generator()); |
1336 __ li(a0, Operand(info)); | 1336 __ li(a2, Operand(info)); |
1337 __ push(a0); | |
1338 __ CallStub(&stub); | 1337 __ CallStub(&stub); |
1339 } else { | 1338 } else { |
1340 __ li(a0, Operand(info)); | 1339 __ li(a0, Operand(info)); |
1341 __ LoadRoot(a1, pretenure ? Heap::kTrueValueRootIndex | 1340 __ LoadRoot(a1, pretenure ? Heap::kTrueValueRootIndex |
1342 : Heap::kFalseValueRootIndex); | 1341 : Heap::kFalseValueRootIndex); |
1343 __ Push(cp, a0, a1); | 1342 __ Push(cp, a0, a1); |
1344 __ CallRuntime(Runtime::kNewClosure, 3); | 1343 __ CallRuntime(Runtime::kNewClosure, 3); |
1345 } | 1344 } |
1346 context()->Plug(v0); | 1345 context()->Plug(v0); |
1347 } | 1346 } |
(...skipping 3571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4919 *context_length = 0; | 4918 *context_length = 0; |
4920 return previous_; | 4919 return previous_; |
4921 } | 4920 } |
4922 | 4921 |
4923 | 4922 |
4924 #undef __ | 4923 #undef __ |
4925 | 4924 |
4926 } } // namespace v8::internal | 4925 } } // namespace v8::internal |
4927 | 4926 |
4928 #endif // V8_TARGET_ARCH_MIPS | 4927 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |