| 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 // space for nested functions that don't need literals cloning. If | 1072 // space for nested functions that don't need literals cloning. If |
| 1073 // we're running with the --always-opt or the --prepare-always-opt | 1073 // we're running with the --always-opt or the --prepare-always-opt |
| 1074 // flag, we need to use the runtime function so that the new function | 1074 // flag, we need to use the runtime function so that the new function |
| 1075 // we are creating here gets a chance to have its code optimized and | 1075 // we are creating here gets a chance to have its code optimized and |
| 1076 // doesn't just get a copy of the existing unoptimized code. | 1076 // doesn't just get a copy of the existing unoptimized code. |
| 1077 if (!FLAG_always_opt && | 1077 if (!FLAG_always_opt && |
| 1078 !FLAG_prepare_always_opt && | 1078 !FLAG_prepare_always_opt && |
| 1079 !pretenure && | 1079 !pretenure && |
| 1080 scope()->is_function_scope() && | 1080 scope()->is_function_scope() && |
| 1081 info->num_literals() == 0) { | 1081 info->num_literals() == 0) { |
| 1082 FastNewClosureStub stub(info->strict_mode() ? kStrictMode : kNonStrictMode); | 1082 FastNewClosureStub stub(info->strict_mode_flag()); |
| 1083 __ push(Immediate(info)); | 1083 __ push(Immediate(info)); |
| 1084 __ CallStub(&stub); | 1084 __ CallStub(&stub); |
| 1085 } else { | 1085 } else { |
| 1086 __ push(esi); | 1086 __ push(esi); |
| 1087 __ push(Immediate(info)); | 1087 __ push(Immediate(info)); |
| 1088 __ push(Immediate(pretenure | 1088 __ push(Immediate(pretenure |
| 1089 ? isolate()->factory()->true_value() | 1089 ? isolate()->factory()->true_value() |
| 1090 : isolate()->factory()->false_value())); | 1090 : isolate()->factory()->false_value())); |
| 1091 __ CallRuntime(Runtime::kNewClosure, 3); | 1091 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1092 } | 1092 } |
| (...skipping 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4386 *context_length = 0; | 4386 *context_length = 0; |
| 4387 return previous_; | 4387 return previous_; |
| 4388 } | 4388 } |
| 4389 | 4389 |
| 4390 | 4390 |
| 4391 #undef __ | 4391 #undef __ |
| 4392 | 4392 |
| 4393 } } // namespace v8::internal | 4393 } } // namespace v8::internal |
| 4394 | 4394 |
| 4395 #endif // V8_TARGET_ARCH_IA32 | 4395 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |