| 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 4442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4453 DCHECK(expr->arguments()->length() == 0); | 4453 DCHECK(expr->arguments()->length() == 0); |
| 4454 ExternalReference debug_is_active = | 4454 ExternalReference debug_is_active = |
| 4455 ExternalReference::debug_is_active_address(isolate()); | 4455 ExternalReference::debug_is_active_address(isolate()); |
| 4456 __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); | 4456 __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); |
| 4457 __ SmiTag(eax); | 4457 __ SmiTag(eax); |
| 4458 context()->Plug(eax); | 4458 context()->Plug(eax); |
| 4459 } | 4459 } |
| 4460 | 4460 |
| 4461 | 4461 |
| 4462 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { | 4462 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
| 4463 // Push the builtins object as receiver. | 4463 // Push undefined as receiver. |
| 4464 __ push(Immediate(isolate()->factory()->undefined_value())); |
| 4465 |
| 4464 __ mov(eax, GlobalObjectOperand()); | 4466 __ mov(eax, GlobalObjectOperand()); |
| 4465 __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset)); | 4467 __ mov(eax, FieldOperand(eax, GlobalObject::kNativeContextOffset)); |
| 4466 | 4468 __ mov(eax, ContextOperand(eax, expr->context_index())); |
| 4467 // Load the function from the receiver. | |
| 4468 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); | |
| 4469 __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name())); | |
| 4470 __ mov(LoadDescriptor::SlotRegister(), | |
| 4471 Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); | |
| 4472 CallLoadIC(NOT_INSIDE_TYPEOF); | |
| 4473 } | 4469 } |
| 4474 | 4470 |
| 4475 | 4471 |
| 4476 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { | 4472 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { |
| 4477 ZoneList<Expression*>* args = expr->arguments(); | 4473 ZoneList<Expression*>* args = expr->arguments(); |
| 4478 int arg_count = args->length(); | 4474 int arg_count = args->length(); |
| 4479 | 4475 |
| 4480 SetCallPosition(expr, arg_count); | 4476 SetCallPosition(expr, arg_count); |
| 4481 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); | 4477 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
| 4482 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 4478 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 Assembler::target_address_at(call_target_address, | 5278 Assembler::target_address_at(call_target_address, |
| 5283 unoptimized_code)); | 5279 unoptimized_code)); |
| 5284 return OSR_AFTER_STACK_CHECK; | 5280 return OSR_AFTER_STACK_CHECK; |
| 5285 } | 5281 } |
| 5286 | 5282 |
| 5287 | 5283 |
| 5288 } // namespace internal | 5284 } // namespace internal |
| 5289 } // namespace v8 | 5285 } // namespace v8 |
| 5290 | 5286 |
| 5291 #endif // V8_TARGET_ARCH_X87 | 5287 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |