OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 // space for nested functions that don't need literals cloning. If | 1099 // space for nested functions that don't need literals cloning. If |
1100 // we're running with the --always-opt or the --prepare-always-opt | 1100 // we're running with the --always-opt or the --prepare-always-opt |
1101 // flag, we need to use the runtime function so that the new function | 1101 // flag, we need to use the runtime function so that the new function |
1102 // we are creating here gets a chance to have its code optimized and | 1102 // we are creating here gets a chance to have its code optimized and |
1103 // doesn't just get a copy of the existing unoptimized code. | 1103 // doesn't just get a copy of the existing unoptimized code. |
1104 if (!FLAG_always_opt && | 1104 if (!FLAG_always_opt && |
1105 !FLAG_prepare_always_opt && | 1105 !FLAG_prepare_always_opt && |
1106 !pretenure && | 1106 !pretenure && |
1107 scope()->is_function_scope() && | 1107 scope()->is_function_scope() && |
1108 info->num_literals() == 0) { | 1108 info->num_literals() == 0) { |
1109 FastNewClosureStub stub(info->strict_mode() ? kStrictMode : kNonStrictMode); | 1109 FastNewClosureStub stub(info->strict_mode_flag()); |
1110 __ li(a0, Operand(info)); | 1110 __ li(a0, Operand(info)); |
1111 __ push(a0); | 1111 __ push(a0); |
1112 __ CallStub(&stub); | 1112 __ CallStub(&stub); |
1113 } else { | 1113 } else { |
1114 __ li(a0, Operand(info)); | 1114 __ li(a0, Operand(info)); |
1115 __ LoadRoot(a1, pretenure ? Heap::kTrueValueRootIndex | 1115 __ LoadRoot(a1, pretenure ? Heap::kTrueValueRootIndex |
1116 : Heap::kFalseValueRootIndex); | 1116 : Heap::kFalseValueRootIndex); |
1117 __ Push(cp, a0, a1); | 1117 __ Push(cp, a0, a1); |
1118 __ CallRuntime(Runtime::kNewClosure, 3); | 1118 __ CallRuntime(Runtime::kNewClosure, 3); |
1119 } | 1119 } |
(...skipping 3216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4336 *context_length = 0; | 4336 *context_length = 0; |
4337 return previous_; | 4337 return previous_; |
4338 } | 4338 } |
4339 | 4339 |
4340 | 4340 |
4341 #undef __ | 4341 #undef __ |
4342 | 4342 |
4343 } } // namespace v8::internal | 4343 } } // namespace v8::internal |
4344 | 4344 |
4345 #endif // V8_TARGET_ARCH_MIPS | 4345 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |