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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 // space for nested functions that don't need literals cloning. If | 1090 // space for nested functions that don't need literals cloning. If |
1091 // we're running with the --always-opt or the --prepare-always-opt | 1091 // we're running with the --always-opt or the --prepare-always-opt |
1092 // flag, we need to use the runtime function so that the new function | 1092 // flag, we need to use the runtime function so that the new function |
1093 // we are creating here gets a chance to have its code optimized and | 1093 // we are creating here gets a chance to have its code optimized and |
1094 // doesn't just get a copy of the existing unoptimized code. | 1094 // doesn't just get a copy of the existing unoptimized code. |
1095 if (!FLAG_always_opt && | 1095 if (!FLAG_always_opt && |
1096 !FLAG_prepare_always_opt && | 1096 !FLAG_prepare_always_opt && |
1097 !pretenure && | 1097 !pretenure && |
1098 scope()->is_function_scope() && | 1098 scope()->is_function_scope() && |
1099 info->num_literals() == 0) { | 1099 info->num_literals() == 0) { |
1100 FastNewClosureStub stub(info->strict_mode() ? kStrictMode : kNonStrictMode); | 1100 FastNewClosureStub stub(info->strict_mode_flag()); |
1101 __ mov(r0, Operand(info)); | 1101 __ mov(r0, Operand(info)); |
1102 __ push(r0); | 1102 __ push(r0); |
1103 __ CallStub(&stub); | 1103 __ CallStub(&stub); |
1104 } else { | 1104 } else { |
1105 __ mov(r0, Operand(info)); | 1105 __ mov(r0, Operand(info)); |
1106 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex | 1106 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex |
1107 : Heap::kFalseValueRootIndex); | 1107 : Heap::kFalseValueRootIndex); |
1108 __ Push(cp, r0, r1); | 1108 __ Push(cp, r0, r1); |
1109 __ CallRuntime(Runtime::kNewClosure, 3); | 1109 __ CallRuntime(Runtime::kNewClosure, 3); |
1110 } | 1110 } |
(...skipping 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4304 *context_length = 0; | 4304 *context_length = 0; |
4305 return previous_; | 4305 return previous_; |
4306 } | 4306 } |
4307 | 4307 |
4308 | 4308 |
4309 #undef __ | 4309 #undef __ |
4310 | 4310 |
4311 } } // namespace v8::internal | 4311 } } // namespace v8::internal |
4312 | 4312 |
4313 #endif // V8_TARGET_ARCH_ARM | 4313 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |