| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 // space for nested functions that don't need literals cloning. If | 1245 // space for nested functions that don't need literals cloning. If |
| 1246 // we're running with the --always-opt or the --prepare-always-opt | 1246 // we're running with the --always-opt or the --prepare-always-opt |
| 1247 // flag, we need to use the runtime function so that the new function | 1247 // flag, we need to use the runtime function so that the new function |
| 1248 // we are creating here gets a chance to have its code optimized and | 1248 // we are creating here gets a chance to have its code optimized and |
| 1249 // doesn't just get a copy of the existing unoptimized code. | 1249 // doesn't just get a copy of the existing unoptimized code. |
| 1250 if (!FLAG_always_opt && | 1250 if (!FLAG_always_opt && |
| 1251 !FLAG_prepare_always_opt && | 1251 !FLAG_prepare_always_opt && |
| 1252 !pretenure && | 1252 !pretenure && |
| 1253 scope()->is_function_scope() && | 1253 scope()->is_function_scope() && |
| 1254 info->num_literals() == 0) { | 1254 info->num_literals() == 0) { |
| 1255 FastNewClosureStub stub(isolate(), | 1255 FastNewClosureStub stub(isolate(), info->strict_mode(), info->kind()); |
| 1256 info->strict_mode(), | |
| 1257 info->is_generator()); | |
| 1258 __ mov(ebx, Immediate(info)); | 1256 __ mov(ebx, Immediate(info)); |
| 1259 __ CallStub(&stub); | 1257 __ CallStub(&stub); |
| 1260 } else { | 1258 } else { |
| 1261 __ push(esi); | 1259 __ push(esi); |
| 1262 __ push(Immediate(info)); | 1260 __ push(Immediate(info)); |
| 1263 __ push(Immediate(pretenure | 1261 __ push(Immediate(pretenure |
| 1264 ? isolate()->factory()->true_value() | 1262 ? isolate()->factory()->true_value() |
| 1265 : isolate()->factory()->false_value())); | 1263 : isolate()->factory()->false_value())); |
| 1266 __ CallRuntime(Runtime::kNewClosure, 3); | 1264 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1267 } | 1265 } |
| (...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4818 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4816 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4819 Assembler::target_address_at(call_target_address, | 4817 Assembler::target_address_at(call_target_address, |
| 4820 unoptimized_code)); | 4818 unoptimized_code)); |
| 4821 return OSR_AFTER_STACK_CHECK; | 4819 return OSR_AFTER_STACK_CHECK; |
| 4822 } | 4820 } |
| 4823 | 4821 |
| 4824 | 4822 |
| 4825 } } // namespace v8::internal | 4823 } } // namespace v8::internal |
| 4826 | 4824 |
| 4827 #endif // V8_TARGET_ARCH_X87 | 4825 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |