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

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

Issue 5699002: RFC: Switch to ast ids (instead of positions) for type feedback. (Closed)
Patch Set: Cleanup Created 10 years 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { 784 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
785 HEnvironment* hydrogen_env = current_block_->last_environment(); 785 HEnvironment* hydrogen_env = current_block_->last_environment();
786 instr->set_environment(CreateEnvironment(hydrogen_env)); 786 instr->set_environment(CreateEnvironment(hydrogen_env));
787 return instr; 787 return instr;
788 } 788 }
789 789
790 790
791 LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment( 791 LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment(
792 LInstruction* instr, int ast_id) { 792 LInstruction* instr, int ast_id) {
793 ASSERT(instructions_pending_deoptimization_environment_ == NULL); 793 ASSERT(instructions_pending_deoptimization_environment_ == NULL);
794 ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); 794 ASSERT(pending_deoptimization_ast_id_ == kNoAstId);
795 instructions_pending_deoptimization_environment_ = instr; 795 instructions_pending_deoptimization_environment_ = instr;
796 pending_deoptimization_ast_id_ = ast_id; 796 pending_deoptimization_ast_id_ = ast_id;
797 return instr; 797 return instr;
798 } 798 }
799 799
800 800
801 void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() { 801 void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() {
802 instructions_pending_deoptimization_environment_ = NULL; 802 instructions_pending_deoptimization_environment_ = NULL;
803 pending_deoptimization_ast_id_ = AstNode::kNoNumber; 803 pending_deoptimization_ast_id_ = kNoAstId;
804 } 804 }
805 805
806 806
807 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, 807 LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
808 HInstruction* hinstr, 808 HInstruction* hinstr,
809 CanDeoptimize can_deoptimize) { 809 CanDeoptimize can_deoptimize) {
810 allocator_->MarkAsCall(); 810 allocator_->MarkAsCall();
811 instr = AssignPointerMap(instr); 811 instr = AssignPointerMap(instr);
812 812
813 if (hinstr->HasSideEffects()) { 813 if (hinstr->HasSideEffects()) {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1122 }
1123 } 1123 }
1124 stream->Add("]"); 1124 stream->Add("]");
1125 } 1125 }
1126 1126
1127 1127
1128 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) { 1128 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
1129 if (hydrogen_env == NULL) return NULL; 1129 if (hydrogen_env == NULL) return NULL;
1130 1130
1131 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer()); 1131 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
1132 int ast_id = hydrogen_env->ast_id(); 1132 AstId ast_id = hydrogen_env->ast_id();
1133 ASSERT(ast_id != AstNode::kNoNumber); 1133 ASSERT(ast_id != kNoAstId);
1134 int value_count = hydrogen_env->values()->length(); 1134 int value_count = hydrogen_env->values()->length();
1135 LEnvironment* result = new LEnvironment(hydrogen_env->closure(), 1135 LEnvironment* result = new LEnvironment(hydrogen_env->closure(),
1136 ast_id, 1136 ast_id,
1137 hydrogen_env->parameter_count(), 1137 hydrogen_env->parameter_count(),
1138 argument_count_, 1138 argument_count_,
1139 value_count, 1139 value_count,
1140 outer); 1140 outer);
1141 int argument_index = 0; 1141 int argument_index = 0;
1142 for (int i = 0; i < value_count; ++i) { 1142 for (int i = 0; i < value_count; ++i) {
1143 HValue* value = hydrogen_env->values()->at(i); 1143 HValue* value = hydrogen_env->values()->at(i);
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 void LPointerMap::PrintTo(StringStream* stream) const { 2099 void LPointerMap::PrintTo(StringStream* stream) const {
2100 stream->Add("{"); 2100 stream->Add("{");
2101 for (int i = 0; i < pointer_operands_.length(); ++i) { 2101 for (int i = 0; i < pointer_operands_.length(); ++i) {
2102 if (i != 0) stream->Add(";"); 2102 if (i != 0) stream->Add(";");
2103 pointer_operands_[i]->PrintTo(stream); 2103 pointer_operands_[i]->PrintTo(stream);
2104 } 2104 }
2105 stream->Add("} @%d", position()); 2105 stream->Add("} @%d", position());
2106 } 2106 }
2107 2107
2108 } } // namespace v8::internal 2108 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698