Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 651
652 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { 652 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
653 HEnvironment* hydrogen_env = current_block_->last_environment(); 653 HEnvironment* hydrogen_env = current_block_->last_environment();
654 instr->set_environment(CreateEnvironment(hydrogen_env)); 654 instr->set_environment(CreateEnvironment(hydrogen_env));
655 return instr; 655 return instr;
656 } 656 }
657 657
658 658
659 LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment( 659 LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment(
660 LInstruction* instr, int ast_id) { 660 LInstruction* instr, int ast_id) {
661 ASSERT(instructions_pending_deoptimization_environment_ == NULL); 661 ASSERT(instruction_pending_deoptimization_environment_ == NULL);
662 ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); 662 ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber);
663 instructions_pending_deoptimization_environment_ = instr; 663 instruction_pending_deoptimization_environment_ = instr;
664 pending_deoptimization_ast_id_ = ast_id; 664 pending_deoptimization_ast_id_ = ast_id;
665 return instr; 665 return instr;
666 } 666 }
667 667
668 668
669 void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() { 669 void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() {
670 instructions_pending_deoptimization_environment_ = NULL; 670 instruction_pending_deoptimization_environment_ = NULL;
671 pending_deoptimization_ast_id_ = AstNode::kNoNumber; 671 pending_deoptimization_ast_id_ = AstNode::kNoNumber;
672 } 672 }
673 673
674 674
675 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, 675 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
676 HInstruction* hinstr, 676 HInstruction* hinstr,
677 CanDeoptimize can_deoptimize) { 677 CanDeoptimize can_deoptimize) {
678 allocator_->MarkAsCall(); 678 allocator_->MarkAsCall();
679 instr = AssignPointerMap(instr); 679 instr = AssignPointerMap(instr);
680 680
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 return AssignEnvironment(DefineSameAsFirst(result)); 1500 return AssignEnvironment(DefineSameAsFirst(result));
1501 } 1501 }
1502 1502
1503 1503
1504 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1504 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1505 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1505 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1506 Use(instr->length()))); 1506 Use(instr->length())));
1507 } 1507 }
1508 1508
1509 1509
1510 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) {
1511 // The control instruction marking the end of a block that completed
1512 // abruptly (e.g., threw an exception). There is nothing specific to do.
1513 return NULL;
1514 }
1515
1516
1510 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { 1517 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
1511 LOperand* value = UseFixed(instr->value(), eax); 1518 LOperand* value = UseFixed(instr->value(), eax);
1512 return MarkAsCall(new LThrow(value), instr); 1519 return MarkAsCall(new LThrow(value), instr);
1513 } 1520 }
1514 1521
1515 1522
1516 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1523 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1517 Representation from = instr->from(); 1524 Representation from = instr->from();
1518 Representation to = instr->to(); 1525 Representation to = instr->to();
1519 if (from.IsTagged()) { 1526 if (from.IsTagged()) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 1646
1640 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { 1647 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) {
1641 LLoadGlobal* result = new LLoadGlobal; 1648 LLoadGlobal* result = new LLoadGlobal;
1642 return instr->check_hole_value() 1649 return instr->check_hole_value()
1643 ? AssignEnvironment(DefineAsRegister(result)) 1650 ? AssignEnvironment(DefineAsRegister(result))
1644 : DefineAsRegister(result); 1651 : DefineAsRegister(result);
1645 } 1652 }
1646 1653
1647 1654
1648 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { 1655 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) {
1649 return new LStoreGlobal(UseRegisterAtStart(instr->value())); 1656 LStoreGlobal* result = new LStoreGlobal(UseRegisterAtStart(instr->value()));
1657 return instr->check_hole_value() ? AssignEnvironment(result) : result;
1650 } 1658 }
1651 1659
1652 1660
1653 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 1661 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1654 return DefineAsRegister(new LLoadContextSlot); 1662 return DefineAsRegister(new LLoadContextSlot);
1655 } 1663 }
1656 1664
1657 1665
1658 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1666 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1659 ASSERT(instr->representation().IsTagged()); 1667 ASSERT(instr->representation().IsTagged());
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 if (instr->HasAssignedIndexAt(i)) { 1876 if (instr->HasAssignedIndexAt(i)) {
1869 env->Bind(instr->GetAssignedIndexAt(i), value); 1877 env->Bind(instr->GetAssignedIndexAt(i), value);
1870 } else { 1878 } else {
1871 env->Push(value); 1879 env->Push(value);
1872 } 1880 }
1873 } 1881 }
1874 ASSERT(env->length() == instr->environment_length()); 1882 ASSERT(env->length() == instr->environment_length());
1875 1883
1876 // If there is an instruction pending deoptimization environment create a 1884 // If there is an instruction pending deoptimization environment create a
1877 // lazy bailout instruction to capture the environment. 1885 // lazy bailout instruction to capture the environment.
1878 if (pending_deoptimization_ast_id_ == instr->ast_id()) { 1886 if (pending_deoptimization_ast_id_ != AstNode::kNoNumber) {
1887 ASSERT(pending_deoptimization_ast_id_ == instr->ast_id());
1879 LLazyBailout* lazy_bailout = new LLazyBailout; 1888 LLazyBailout* lazy_bailout = new LLazyBailout;
1880 LInstruction* result = AssignEnvironment(lazy_bailout); 1889 LInstruction* result = AssignEnvironment(lazy_bailout);
1881 instructions_pending_deoptimization_environment_-> 1890 instruction_pending_deoptimization_environment_->
1882 set_deoptimization_environment(result->environment()); 1891 set_deoptimization_environment(result->environment());
1883 ClearInstructionPendingDeoptimizationEnvironment(); 1892 ClearInstructionPendingDeoptimizationEnvironment();
1884 return result; 1893 return result;
1885 } 1894 }
1886 1895
1887 return NULL; 1896 return NULL;
1888 } 1897 }
1889 1898
1890 1899
1891 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { 1900 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
(...skipping 17 matching lines...) Expand all
1909 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1918 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1910 HEnvironment* outer = current_block_->last_environment()->outer(); 1919 HEnvironment* outer = current_block_->last_environment()->outer();
1911 current_block_->UpdateEnvironment(outer); 1920 current_block_->UpdateEnvironment(outer);
1912 return NULL; 1921 return NULL;
1913 } 1922 }
1914 1923
1915 1924
1916 } } // namespace v8::internal 1925 } } // namespace v8::internal
1917 1926
1918 #endif // V8_TARGET_ARCH_IA32 1927 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/ast.cc ('K') | « src/ia32/lithium-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698