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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 416 |
417 SetReturnPosition(literal()); | 417 SetReturnPosition(literal()); |
418 __ leave(); | 418 __ leave(); |
419 | 419 |
420 int arg_count = info_->scope()->num_parameters() + 1; | 420 int arg_count = info_->scope()->num_parameters() + 1; |
421 int arguments_bytes = arg_count * kPointerSize; | 421 int arguments_bytes = arg_count * kPointerSize; |
422 __ Ret(arguments_bytes, ecx); | 422 __ Ret(arguments_bytes, ecx); |
423 } | 423 } |
424 } | 424 } |
425 | 425 |
| 426 void FullCodeGenerator::RestoreContext() { |
| 427 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 428 } |
426 | 429 |
427 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { | 430 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
428 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 431 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
429 MemOperand operand = codegen()->VarOperand(var, result_register()); | 432 MemOperand operand = codegen()->VarOperand(var, result_register()); |
430 // Memory operands can be pushed directly. | 433 // Memory operands can be pushed directly. |
431 codegen()->PushOperand(operand); | 434 codegen()->PushOperand(operand); |
432 } | 435 } |
433 | 436 |
434 | 437 |
435 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { | 438 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { |
(...skipping 3196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3632 Label* if_false = NULL; | 3635 Label* if_false = NULL; |
3633 Label* fall_through = NULL; | 3636 Label* fall_through = NULL; |
3634 context()->PrepareTest(&materialize_true, &materialize_false, | 3637 context()->PrepareTest(&materialize_true, &materialize_false, |
3635 &if_true, &if_false, &fall_through); | 3638 &if_true, &if_false, &fall_through); |
3636 | 3639 |
3637 Token::Value op = expr->op(); | 3640 Token::Value op = expr->op(); |
3638 VisitForStackValue(expr->left()); | 3641 VisitForStackValue(expr->left()); |
3639 switch (op) { | 3642 switch (op) { |
3640 case Token::IN: | 3643 case Token::IN: |
3641 VisitForStackValue(expr->right()); | 3644 VisitForStackValue(expr->right()); |
3642 CallRuntimeWithOperands(Runtime::kHasProperty); | 3645 EmitHasProperty(); |
3643 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 3646 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
3644 __ cmp(eax, isolate()->factory()->true_value()); | 3647 __ cmp(eax, isolate()->factory()->true_value()); |
3645 Split(equal, if_true, if_false, fall_through); | 3648 Split(equal, if_true, if_false, fall_through); |
3646 break; | 3649 break; |
3647 | 3650 |
3648 case Token::INSTANCEOF: { | 3651 case Token::INSTANCEOF: { |
3649 VisitForAccumulatorValue(expr->right()); | 3652 VisitForAccumulatorValue(expr->right()); |
3650 PopOperand(edx); | 3653 PopOperand(edx); |
3651 InstanceOfStub stub(isolate()); | 3654 InstanceOfStub stub(isolate()); |
3652 __ CallStub(&stub); | 3655 __ CallStub(&stub); |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3896 isolate->builtins()->OnStackReplacement()->entry(), | 3899 isolate->builtins()->OnStackReplacement()->entry(), |
3897 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3900 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3898 return ON_STACK_REPLACEMENT; | 3901 return ON_STACK_REPLACEMENT; |
3899 } | 3902 } |
3900 | 3903 |
3901 | 3904 |
3902 } // namespace internal | 3905 } // namespace internal |
3903 } // namespace v8 | 3906 } // namespace v8 |
3904 | 3907 |
3905 #endif // V8_TARGET_ARCH_IA32 | 3908 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |