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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 413 |
414 SetReturnPosition(literal()); | 414 SetReturnPosition(literal()); |
415 __ leave(); | 415 __ leave(); |
416 | 416 |
417 int arg_count = info_->scope()->num_parameters() + 1; | 417 int arg_count = info_->scope()->num_parameters() + 1; |
418 int arguments_bytes = arg_count * kPointerSize; | 418 int arguments_bytes = arg_count * kPointerSize; |
419 __ Ret(arguments_bytes, ecx); | 419 __ Ret(arguments_bytes, ecx); |
420 } | 420 } |
421 } | 421 } |
422 | 422 |
| 423 void FullCodeGenerator::RestoreContext() { |
| 424 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 425 } |
423 | 426 |
424 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { | 427 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
425 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 428 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
426 MemOperand operand = codegen()->VarOperand(var, result_register()); | 429 MemOperand operand = codegen()->VarOperand(var, result_register()); |
427 // Memory operands can be pushed directly. | 430 // Memory operands can be pushed directly. |
428 codegen()->PushOperand(operand); | 431 codegen()->PushOperand(operand); |
429 } | 432 } |
430 | 433 |
431 | 434 |
432 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { | 435 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { |
(...skipping 3191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3624 Label* if_false = NULL; | 3627 Label* if_false = NULL; |
3625 Label* fall_through = NULL; | 3628 Label* fall_through = NULL; |
3626 context()->PrepareTest(&materialize_true, &materialize_false, | 3629 context()->PrepareTest(&materialize_true, &materialize_false, |
3627 &if_true, &if_false, &fall_through); | 3630 &if_true, &if_false, &fall_through); |
3628 | 3631 |
3629 Token::Value op = expr->op(); | 3632 Token::Value op = expr->op(); |
3630 VisitForStackValue(expr->left()); | 3633 VisitForStackValue(expr->left()); |
3631 switch (op) { | 3634 switch (op) { |
3632 case Token::IN: | 3635 case Token::IN: |
3633 VisitForStackValue(expr->right()); | 3636 VisitForStackValue(expr->right()); |
3634 CallRuntimeWithOperands(Runtime::kHasProperty); | 3637 EmitHasProperty(); |
3635 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 3638 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
3636 __ cmp(eax, isolate()->factory()->true_value()); | 3639 __ cmp(eax, isolate()->factory()->true_value()); |
3637 Split(equal, if_true, if_false, fall_through); | 3640 Split(equal, if_true, if_false, fall_through); |
3638 break; | 3641 break; |
3639 | 3642 |
3640 case Token::INSTANCEOF: { | 3643 case Token::INSTANCEOF: { |
3641 VisitForAccumulatorValue(expr->right()); | 3644 VisitForAccumulatorValue(expr->right()); |
3642 PopOperand(edx); | 3645 PopOperand(edx); |
3643 InstanceOfStub stub(isolate()); | 3646 InstanceOfStub stub(isolate()); |
3644 __ CallStub(&stub); | 3647 __ CallStub(&stub); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3888 isolate->builtins()->OnStackReplacement()->entry(), | 3891 isolate->builtins()->OnStackReplacement()->entry(), |
3889 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3892 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3890 return ON_STACK_REPLACEMENT; | 3893 return ON_STACK_REPLACEMENT; |
3891 } | 3894 } |
3892 | 3895 |
3893 | 3896 |
3894 } // namespace internal | 3897 } // namespace internal |
3895 } // namespace v8 | 3898 } // namespace v8 |
3896 | 3899 |
3897 #endif // V8_TARGET_ARCH_X87 | 3900 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |