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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 // space for nested functions that don't need literals cloning. If | 1244 // space for nested functions that don't need literals cloning. If |
1245 // we're running with the --always-opt or the --prepare-always-opt | 1245 // we're running with the --always-opt or the --prepare-always-opt |
1246 // flag, we need to use the runtime function so that the new function | 1246 // flag, we need to use the runtime function so that the new function |
1247 // we are creating here gets a chance to have its code optimized and | 1247 // we are creating here gets a chance to have its code optimized and |
1248 // doesn't just get a copy of the existing unoptimized code. | 1248 // doesn't just get a copy of the existing unoptimized code. |
1249 if (!FLAG_always_opt && | 1249 if (!FLAG_always_opt && |
1250 !FLAG_prepare_always_opt && | 1250 !FLAG_prepare_always_opt && |
1251 !pretenure && | 1251 !pretenure && |
1252 scope()->is_function_scope() && | 1252 scope()->is_function_scope() && |
1253 info->num_literals() == 0) { | 1253 info->num_literals() == 0) { |
1254 FastNewClosureStub stub(isolate(), | 1254 FastNewClosureStub stub(isolate(), info->strict_mode(), info->kind()); |
1255 info->strict_mode(), | |
1256 info->is_generator()); | |
1257 __ mov(ebx, Immediate(info)); | 1255 __ mov(ebx, Immediate(info)); |
1258 __ CallStub(&stub); | 1256 __ CallStub(&stub); |
1259 } else { | 1257 } else { |
1260 __ push(esi); | 1258 __ push(esi); |
1261 __ push(Immediate(info)); | 1259 __ push(Immediate(info)); |
1262 __ push(Immediate(pretenure | 1260 __ push(Immediate(pretenure |
1263 ? isolate()->factory()->true_value() | 1261 ? isolate()->factory()->true_value() |
1264 : isolate()->factory()->false_value())); | 1262 : isolate()->factory()->false_value())); |
1265 __ CallRuntime(Runtime::kNewClosure, 3); | 1263 __ CallRuntime(Runtime::kNewClosure, 3); |
1266 } | 1264 } |
(...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4819 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4817 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4820 Assembler::target_address_at(call_target_address, | 4818 Assembler::target_address_at(call_target_address, |
4821 unoptimized_code)); | 4819 unoptimized_code)); |
4822 return OSR_AFTER_STACK_CHECK; | 4820 return OSR_AFTER_STACK_CHECK; |
4823 } | 4821 } |
4824 | 4822 |
4825 | 4823 |
4826 } } // namespace v8::internal | 4824 } } // namespace v8::internal |
4827 | 4825 |
4828 #endif // V8_TARGET_ARCH_X87 | 4826 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |