OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
11 #include "src/code-factory.h" | 11 #include "src/code-factory.h" |
12 #include "src/compiler.h" | 12 #include "src/compiler.h" |
13 #include "src/factory.h" | 13 #include "src/factory.h" |
14 #include "src/interpreter/bytecode-flags.h" | 14 #include "src/interpreter/bytecode-flags.h" |
15 #include "src/interpreter/bytecode-generator.h" | 15 #include "src/interpreter/bytecode-generator.h" |
16 #include "src/interpreter/bytecodes.h" | 16 #include "src/interpreter/bytecodes.h" |
17 #include "src/interpreter/interpreter-assembler.h" | 17 #include "src/interpreter/interpreter-assembler.h" |
18 #include "src/interpreter/interpreter-intrinsics.h" | 18 #include "src/interpreter/interpreter-intrinsics.h" |
19 #include "src/log.h" | 19 #include "src/log.h" |
20 #include "src/zone.h" | 20 #include "src/zone.h" |
21 | 21 |
22 namespace v8 { | 22 namespace v8 { |
23 namespace internal { | 23 namespace internal { |
24 namespace interpreter { | 24 namespace interpreter { |
25 | 25 |
26 using compiler::Node; | 26 using compiler::Node; |
27 typedef CodeStubAssembler::Label Label; | 27 typedef CodeStubAssembler::Label Label; |
28 typedef CodeStubAssembler::Variable Variable; | 28 typedef CodeStubAssembler::Variable Variable; |
| 29 typedef InterpreterAssembler::Arg Arg; |
29 | 30 |
30 #define __ assembler-> | 31 #define __ assembler-> |
31 | 32 |
32 Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) { | 33 Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) { |
33 memset(dispatch_table_, 0, sizeof(dispatch_table_)); | 34 memset(dispatch_table_, 0, sizeof(dispatch_table_)); |
34 } | 35 } |
35 | 36 |
36 void Interpreter::Initialize() { | 37 void Interpreter::Initialize() { |
37 if (IsDispatchTableInitialized()) return; | 38 if (IsDispatchTableInitialized()) return; |
38 Zone zone(isolate_->allocator()); | 39 Zone zone(isolate_->allocator()); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 void Interpreter::DoMov(InterpreterAssembler* assembler) { | 377 void Interpreter::DoMov(InterpreterAssembler* assembler) { |
377 Node* src_index = __ BytecodeOperandReg(0); | 378 Node* src_index = __ BytecodeOperandReg(0); |
378 Node* src_value = __ LoadRegister(src_index); | 379 Node* src_value = __ LoadRegister(src_index); |
379 Node* dst_index = __ BytecodeOperandReg(1); | 380 Node* dst_index = __ BytecodeOperandReg(1); |
380 __ StoreRegister(src_value, dst_index); | 381 __ StoreRegister(src_value, dst_index); |
381 __ Dispatch(); | 382 __ Dispatch(); |
382 } | 383 } |
383 | 384 |
384 Node* Interpreter::BuildLoadGlobal(Callable ic, | 385 Node* Interpreter::BuildLoadGlobal(Callable ic, |
385 InterpreterAssembler* assembler) { | 386 InterpreterAssembler* assembler) { |
| 387 typedef LoadGlobalWithVectorDescriptor Descriptor; |
386 // Get the global object. | 388 // Get the global object. |
387 Node* context = __ GetContext(); | 389 Node* context = __ GetContext(); |
388 | 390 |
389 // Load the global via the LoadGlobalIC. | 391 // Load the global via the LoadGlobalIC. |
390 Node* code_target = __ HeapConstant(ic.code()); | 392 Node* code_target = __ HeapConstant(ic.code()); |
391 Node* raw_slot = __ BytecodeOperandIdx(0); | 393 Node* raw_slot = __ BytecodeOperandIdx(0); |
392 Node* smi_slot = __ SmiTag(raw_slot); | 394 Node* smi_slot = __ SmiTag(raw_slot); |
393 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 395 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
394 return __ CallStub(ic.descriptor(), code_target, context, smi_slot, | 396 return __ CallStub(ic.descriptor(), code_target, context, |
395 type_feedback_vector); | 397 Arg(Descriptor::kSlot, smi_slot), |
| 398 Arg(Descriptor::kVector, type_feedback_vector)); |
396 } | 399 } |
397 | 400 |
398 // LdaGlobal <slot> | 401 // LdaGlobal <slot> |
399 // | 402 // |
400 // Load the global with name in constant pool entry <name_index> into the | 403 // Load the global with name in constant pool entry <name_index> into the |
401 // accumulator using FeedBackVector slot <slot> outside of a typeof. | 404 // accumulator using FeedBackVector slot <slot> outside of a typeof. |
402 void Interpreter::DoLdaGlobal(InterpreterAssembler* assembler) { | 405 void Interpreter::DoLdaGlobal(InterpreterAssembler* assembler) { |
403 Callable ic = | 406 Callable ic = |
404 CodeFactory::LoadGlobalICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF); | 407 CodeFactory::LoadGlobalICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF); |
405 Node* result = BuildLoadGlobal(ic, assembler); | 408 Node* result = BuildLoadGlobal(ic, assembler); |
(...skipping 20 matching lines...) Expand all Loading... |
426 // accumulator using FeedBackVector slot <slot> inside of a typeof. | 429 // accumulator using FeedBackVector slot <slot> inside of a typeof. |
427 void Interpreter::DoLdaGlobalInsideTypeof(InterpreterAssembler* assembler) { | 430 void Interpreter::DoLdaGlobalInsideTypeof(InterpreterAssembler* assembler) { |
428 Callable ic = | 431 Callable ic = |
429 CodeFactory::LoadGlobalICInOptimizedCode(isolate_, INSIDE_TYPEOF); | 432 CodeFactory::LoadGlobalICInOptimizedCode(isolate_, INSIDE_TYPEOF); |
430 Node* result = BuildLoadGlobal(ic, assembler); | 433 Node* result = BuildLoadGlobal(ic, assembler); |
431 __ SetAccumulator(result); | 434 __ SetAccumulator(result); |
432 __ Dispatch(); | 435 __ Dispatch(); |
433 } | 436 } |
434 | 437 |
435 void Interpreter::DoStaGlobal(Callable ic, InterpreterAssembler* assembler) { | 438 void Interpreter::DoStaGlobal(Callable ic, InterpreterAssembler* assembler) { |
| 439 typedef StoreWithVectorDescriptor Descriptor; |
436 // Get the global object. | 440 // Get the global object. |
437 Node* context = __ GetContext(); | 441 Node* context = __ GetContext(); |
438 Node* native_context = | 442 Node* native_context = |
439 __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX); | 443 __ LoadContextSlot(context, Context::NATIVE_CONTEXT_INDEX); |
440 Node* global = __ LoadContextSlot(native_context, Context::EXTENSION_INDEX); | 444 Node* global = __ LoadContextSlot(native_context, Context::EXTENSION_INDEX); |
441 | 445 |
442 // Store the global via the StoreIC. | 446 // Store the global via the StoreIC. |
443 Node* code_target = __ HeapConstant(ic.code()); | 447 Node* code_target = __ HeapConstant(ic.code()); |
444 Node* constant_index = __ BytecodeOperandIdx(0); | 448 Node* constant_index = __ BytecodeOperandIdx(0); |
445 Node* name = __ LoadConstantPoolEntry(constant_index); | 449 Node* name = __ LoadConstantPoolEntry(constant_index); |
446 Node* value = __ GetAccumulator(); | 450 Node* value = __ GetAccumulator(); |
447 Node* raw_slot = __ BytecodeOperandIdx(1); | 451 Node* raw_slot = __ BytecodeOperandIdx(1); |
448 Node* smi_slot = __ SmiTag(raw_slot); | 452 Node* smi_slot = __ SmiTag(raw_slot); |
449 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 453 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
450 __ CallStub(ic.descriptor(), code_target, context, global, name, value, | 454 __ CallStub(ic.descriptor(), code_target, context, |
451 smi_slot, type_feedback_vector); | 455 Arg(Descriptor::kReceiver, global), Arg(Descriptor::kName, name), |
| 456 Arg(Descriptor::kValue, value), Arg(Descriptor::kSlot, smi_slot), |
| 457 Arg(Descriptor::kVector, type_feedback_vector)); |
452 __ Dispatch(); | 458 __ Dispatch(); |
453 } | 459 } |
454 | 460 |
455 // StaGlobalSloppy <name_index> <slot> | 461 // StaGlobalSloppy <name_index> <slot> |
456 // | 462 // |
457 // Store the value in the accumulator into the global with name in constant pool | 463 // Store the value in the accumulator into the global with name in constant pool |
458 // entry <name_index> using FeedBackVector slot <slot> in sloppy mode. | 464 // entry <name_index> using FeedBackVector slot <slot> in sloppy mode. |
459 void Interpreter::DoStaGlobalSloppy(InterpreterAssembler* assembler) { | 465 void Interpreter::DoStaGlobalSloppy(InterpreterAssembler* assembler) { |
460 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY); | 466 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY); |
461 DoStaGlobal(ic, assembler); | 467 DoStaGlobal(ic, assembler); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 // StaLookupSlotStrict <name_index> | 566 // StaLookupSlotStrict <name_index> |
561 // | 567 // |
562 // Store the object in accumulator to the object with the name in constant | 568 // Store the object in accumulator to the object with the name in constant |
563 // pool entry |name_index| in strict mode. | 569 // pool entry |name_index| in strict mode. |
564 void Interpreter::DoStaLookupSlotStrict(InterpreterAssembler* assembler) { | 570 void Interpreter::DoStaLookupSlotStrict(InterpreterAssembler* assembler) { |
565 DoStaLookupSlot(LanguageMode::STRICT, assembler); | 571 DoStaLookupSlot(LanguageMode::STRICT, assembler); |
566 } | 572 } |
567 | 573 |
568 Node* Interpreter::BuildLoadNamedProperty(Callable ic, | 574 Node* Interpreter::BuildLoadNamedProperty(Callable ic, |
569 InterpreterAssembler* assembler) { | 575 InterpreterAssembler* assembler) { |
| 576 typedef LoadWithVectorDescriptor Descriptor; |
570 Node* code_target = __ HeapConstant(ic.code()); | 577 Node* code_target = __ HeapConstant(ic.code()); |
571 Node* register_index = __ BytecodeOperandReg(0); | 578 Node* register_index = __ BytecodeOperandReg(0); |
572 Node* object = __ LoadRegister(register_index); | 579 Node* object = __ LoadRegister(register_index); |
573 Node* constant_index = __ BytecodeOperandIdx(1); | 580 Node* constant_index = __ BytecodeOperandIdx(1); |
574 Node* name = __ LoadConstantPoolEntry(constant_index); | 581 Node* name = __ LoadConstantPoolEntry(constant_index); |
575 Node* raw_slot = __ BytecodeOperandIdx(2); | 582 Node* raw_slot = __ BytecodeOperandIdx(2); |
576 Node* smi_slot = __ SmiTag(raw_slot); | 583 Node* smi_slot = __ SmiTag(raw_slot); |
577 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 584 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
578 Node* context = __ GetContext(); | 585 Node* context = __ GetContext(); |
579 return __ CallStub(ic.descriptor(), code_target, context, object, name, | 586 return __ CallStub( |
580 smi_slot, type_feedback_vector); | 587 ic.descriptor(), code_target, context, Arg(Descriptor::kReceiver, object), |
| 588 Arg(Descriptor::kName, name), Arg(Descriptor::kSlot, smi_slot), |
| 589 Arg(Descriptor::kVector, type_feedback_vector)); |
581 } | 590 } |
582 | 591 |
583 // LdaNamedProperty <object> <name_index> <slot> | 592 // LdaNamedProperty <object> <name_index> <slot> |
584 // | 593 // |
585 // Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at | 594 // Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at |
586 // constant pool entry <name_index>. | 595 // constant pool entry <name_index>. |
587 void Interpreter::DoLdaNamedProperty(InterpreterAssembler* assembler) { | 596 void Interpreter::DoLdaNamedProperty(InterpreterAssembler* assembler) { |
588 Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_); | 597 Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_); |
589 Node* result = BuildLoadNamedProperty(ic, assembler); | 598 Node* result = BuildLoadNamedProperty(ic, assembler); |
590 __ SetAccumulator(result); | 599 __ SetAccumulator(result); |
591 __ Dispatch(); | 600 __ Dispatch(); |
592 } | 601 } |
593 | 602 |
594 // LdrNamedProperty <object> <name_index> <slot> <reg> | 603 // LdrNamedProperty <object> <name_index> <slot> <reg> |
595 // | 604 // |
596 // Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at | 605 // Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at |
597 // constant pool entry <name_index> and puts the result into register <reg>. | 606 // constant pool entry <name_index> and puts the result into register <reg>. |
598 void Interpreter::DoLdrNamedProperty(InterpreterAssembler* assembler) { | 607 void Interpreter::DoLdrNamedProperty(InterpreterAssembler* assembler) { |
599 Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_); | 608 Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_); |
600 Node* result = BuildLoadNamedProperty(ic, assembler); | 609 Node* result = BuildLoadNamedProperty(ic, assembler); |
601 Node* destination = __ BytecodeOperandReg(3); | 610 Node* destination = __ BytecodeOperandReg(3); |
602 __ StoreRegister(result, destination); | 611 __ StoreRegister(result, destination); |
603 __ Dispatch(); | 612 __ Dispatch(); |
604 } | 613 } |
605 | 614 |
606 Node* Interpreter::BuildLoadKeyedProperty(Callable ic, | 615 Node* Interpreter::BuildLoadKeyedProperty(Callable ic, |
607 InterpreterAssembler* assembler) { | 616 InterpreterAssembler* assembler) { |
| 617 typedef LoadWithVectorDescriptor Descriptor; |
608 Node* code_target = __ HeapConstant(ic.code()); | 618 Node* code_target = __ HeapConstant(ic.code()); |
609 Node* reg_index = __ BytecodeOperandReg(0); | 619 Node* reg_index = __ BytecodeOperandReg(0); |
610 Node* object = __ LoadRegister(reg_index); | 620 Node* object = __ LoadRegister(reg_index); |
611 Node* name = __ GetAccumulator(); | 621 Node* name = __ GetAccumulator(); |
612 Node* raw_slot = __ BytecodeOperandIdx(1); | 622 Node* raw_slot = __ BytecodeOperandIdx(1); |
613 Node* smi_slot = __ SmiTag(raw_slot); | 623 Node* smi_slot = __ SmiTag(raw_slot); |
614 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 624 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
615 Node* context = __ GetContext(); | 625 Node* context = __ GetContext(); |
616 return __ CallStub(ic.descriptor(), code_target, context, object, name, | 626 return __ CallStub( |
617 smi_slot, type_feedback_vector); | 627 ic.descriptor(), code_target, context, Arg(Descriptor::kReceiver, object), |
| 628 Arg(Descriptor::kName, name), Arg(Descriptor::kSlot, smi_slot), |
| 629 Arg(Descriptor::kVector, type_feedback_vector)); |
618 } | 630 } |
619 | 631 |
620 // KeyedLoadIC <object> <slot> | 632 // KeyedLoadIC <object> <slot> |
621 // | 633 // |
622 // Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key | 634 // Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key |
623 // in the accumulator. | 635 // in the accumulator. |
624 void Interpreter::DoLdaKeyedProperty(InterpreterAssembler* assembler) { | 636 void Interpreter::DoLdaKeyedProperty(InterpreterAssembler* assembler) { |
625 Callable ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate_); | 637 Callable ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate_); |
626 Node* result = BuildLoadKeyedProperty(ic, assembler); | 638 Node* result = BuildLoadKeyedProperty(ic, assembler); |
627 __ SetAccumulator(result); | 639 __ SetAccumulator(result); |
628 __ Dispatch(); | 640 __ Dispatch(); |
629 } | 641 } |
630 | 642 |
631 // LdrKeyedProperty <object> <slot> <reg> | 643 // LdrKeyedProperty <object> <slot> <reg> |
632 // | 644 // |
633 // Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key | 645 // Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key |
634 // in the accumulator and puts the result in register <reg>. | 646 // in the accumulator and puts the result in register <reg>. |
635 void Interpreter::DoLdrKeyedProperty(InterpreterAssembler* assembler) { | 647 void Interpreter::DoLdrKeyedProperty(InterpreterAssembler* assembler) { |
636 Callable ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate_); | 648 Callable ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate_); |
637 Node* result = BuildLoadKeyedProperty(ic, assembler); | 649 Node* result = BuildLoadKeyedProperty(ic, assembler); |
638 Node* destination = __ BytecodeOperandReg(2); | 650 Node* destination = __ BytecodeOperandReg(2); |
639 __ StoreRegister(result, destination); | 651 __ StoreRegister(result, destination); |
640 __ Dispatch(); | 652 __ Dispatch(); |
641 } | 653 } |
642 | 654 |
643 void Interpreter::DoStoreIC(Callable ic, InterpreterAssembler* assembler) { | 655 void Interpreter::DoStoreIC(Callable ic, InterpreterAssembler* assembler) { |
| 656 typedef StoreWithVectorDescriptor Descriptor; |
644 Node* code_target = __ HeapConstant(ic.code()); | 657 Node* code_target = __ HeapConstant(ic.code()); |
645 Node* object_reg_index = __ BytecodeOperandReg(0); | 658 Node* object_reg_index = __ BytecodeOperandReg(0); |
646 Node* object = __ LoadRegister(object_reg_index); | 659 Node* object = __ LoadRegister(object_reg_index); |
647 Node* constant_index = __ BytecodeOperandIdx(1); | 660 Node* constant_index = __ BytecodeOperandIdx(1); |
648 Node* name = __ LoadConstantPoolEntry(constant_index); | 661 Node* name = __ LoadConstantPoolEntry(constant_index); |
649 Node* value = __ GetAccumulator(); | 662 Node* value = __ GetAccumulator(); |
650 Node* raw_slot = __ BytecodeOperandIdx(2); | 663 Node* raw_slot = __ BytecodeOperandIdx(2); |
651 Node* smi_slot = __ SmiTag(raw_slot); | 664 Node* smi_slot = __ SmiTag(raw_slot); |
652 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 665 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
653 Node* context = __ GetContext(); | 666 Node* context = __ GetContext(); |
654 __ CallStub(ic.descriptor(), code_target, context, object, name, value, | 667 __ CallStub(ic.descriptor(), code_target, context, |
655 smi_slot, type_feedback_vector); | 668 Arg(Descriptor::kReceiver, object), Arg(Descriptor::kName, name), |
| 669 Arg(Descriptor::kValue, value), Arg(Descriptor::kSlot, smi_slot), |
| 670 Arg(Descriptor::kVector, type_feedback_vector)); |
656 __ Dispatch(); | 671 __ Dispatch(); |
657 } | 672 } |
658 | 673 |
659 // StaNamedPropertySloppy <object> <name_index> <slot> | 674 // StaNamedPropertySloppy <object> <name_index> <slot> |
660 // | 675 // |
661 // Calls the sloppy mode StoreIC at FeedBackVector slot <slot> for <object> and | 676 // Calls the sloppy mode StoreIC at FeedBackVector slot <slot> for <object> and |
662 // the name in constant pool entry <name_index> with the value in the | 677 // the name in constant pool entry <name_index> with the value in the |
663 // accumulator. | 678 // accumulator. |
664 void Interpreter::DoStaNamedPropertySloppy(InterpreterAssembler* assembler) { | 679 void Interpreter::DoStaNamedPropertySloppy(InterpreterAssembler* assembler) { |
665 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY); | 680 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY); |
666 DoStoreIC(ic, assembler); | 681 DoStoreIC(ic, assembler); |
667 } | 682 } |
668 | 683 |
669 // StaNamedPropertyStrict <object> <name_index> <slot> | 684 // StaNamedPropertyStrict <object> <name_index> <slot> |
670 // | 685 // |
671 // Calls the strict mode StoreIC at FeedBackVector slot <slot> for <object> and | 686 // Calls the strict mode StoreIC at FeedBackVector slot <slot> for <object> and |
672 // the name in constant pool entry <name_index> with the value in the | 687 // the name in constant pool entry <name_index> with the value in the |
673 // accumulator. | 688 // accumulator. |
674 void Interpreter::DoStaNamedPropertyStrict(InterpreterAssembler* assembler) { | 689 void Interpreter::DoStaNamedPropertyStrict(InterpreterAssembler* assembler) { |
675 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, STRICT); | 690 Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, STRICT); |
676 DoStoreIC(ic, assembler); | 691 DoStoreIC(ic, assembler); |
677 } | 692 } |
678 | 693 |
679 void Interpreter::DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler) { | 694 void Interpreter::DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler) { |
| 695 typedef StoreWithVectorDescriptor Descriptor; |
680 Node* code_target = __ HeapConstant(ic.code()); | 696 Node* code_target = __ HeapConstant(ic.code()); |
681 Node* object_reg_index = __ BytecodeOperandReg(0); | 697 Node* object_reg_index = __ BytecodeOperandReg(0); |
682 Node* object = __ LoadRegister(object_reg_index); | 698 Node* object = __ LoadRegister(object_reg_index); |
683 Node* name_reg_index = __ BytecodeOperandReg(1); | 699 Node* name_reg_index = __ BytecodeOperandReg(1); |
684 Node* name = __ LoadRegister(name_reg_index); | 700 Node* name = __ LoadRegister(name_reg_index); |
685 Node* value = __ GetAccumulator(); | 701 Node* value = __ GetAccumulator(); |
686 Node* raw_slot = __ BytecodeOperandIdx(2); | 702 Node* raw_slot = __ BytecodeOperandIdx(2); |
687 Node* smi_slot = __ SmiTag(raw_slot); | 703 Node* smi_slot = __ SmiTag(raw_slot); |
688 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 704 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
689 Node* context = __ GetContext(); | 705 Node* context = __ GetContext(); |
690 __ CallStub(ic.descriptor(), code_target, context, object, name, value, | 706 __ CallStub(ic.descriptor(), code_target, context, |
691 smi_slot, type_feedback_vector); | 707 Arg(Descriptor::kReceiver, object), Arg(Descriptor::kName, name), |
| 708 Arg(Descriptor::kValue, value), Arg(Descriptor::kSlot, smi_slot), |
| 709 Arg(Descriptor::kVector, type_feedback_vector)); |
692 __ Dispatch(); | 710 __ Dispatch(); |
693 } | 711 } |
694 | 712 |
695 // StaKeyedPropertySloppy <object> <key> <slot> | 713 // StaKeyedPropertySloppy <object> <key> <slot> |
696 // | 714 // |
697 // Calls the sloppy mode KeyStoreIC at FeedBackVector slot <slot> for <object> | 715 // Calls the sloppy mode KeyStoreIC at FeedBackVector slot <slot> for <object> |
698 // and the key <key> with the value in the accumulator. | 716 // and the key <key> with the value in the accumulator. |
699 void Interpreter::DoStaKeyedPropertySloppy(InterpreterAssembler* assembler) { | 717 void Interpreter::DoStaKeyedPropertySloppy(InterpreterAssembler* assembler) { |
700 Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, SLOPPY); | 718 Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, SLOPPY); |
701 DoKeyedStoreIC(ic, assembler); | 719 DoKeyedStoreIC(ic, assembler); |
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2130 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2148 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2131 __ SmiTag(new_state)); | 2149 __ SmiTag(new_state)); |
2132 __ SetAccumulator(old_state); | 2150 __ SetAccumulator(old_state); |
2133 | 2151 |
2134 __ Dispatch(); | 2152 __ Dispatch(); |
2135 } | 2153 } |
2136 | 2154 |
2137 } // namespace interpreter | 2155 } // namespace interpreter |
2138 } // namespace internal | 2156 } // namespace internal |
2139 } // namespace v8 | 2157 } // namespace v8 |
OLD | NEW |