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

Side by Side Diff: src/arm/lithium-arm.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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } 1110 }
1111 stream->Add("]"); 1111 stream->Add("]");
1112 } 1112 }
1113 1113
1114 1114
1115 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) { 1115 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
1116 if (hydrogen_env == NULL) return NULL; 1116 if (hydrogen_env == NULL) return NULL;
1117 1117
1118 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer()); 1118 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
1119 int ast_id = hydrogen_env->ast_id(); 1119 int ast_id = hydrogen_env->ast_id();
1120 ASSERT(ast_id != AstNode::kNoNumber); 1120 ASSERT(ast_id != kNoAstId);
1121 int value_count = hydrogen_env->values()->length(); 1121 int value_count = hydrogen_env->values()->length();
1122 LEnvironment* result = new LEnvironment(hydrogen_env->closure(), 1122 LEnvironment* result = new LEnvironment(hydrogen_env->closure(),
1123 ast_id, 1123 ast_id,
1124 hydrogen_env->parameter_count(), 1124 hydrogen_env->parameter_count(),
1125 argument_count_, 1125 argument_count_,
1126 value_count, 1126 value_count,
1127 outer); 1127 outer);
1128 int argument_index = 0; 1128 int argument_index = 0;
1129 for (int i = 0; i < value_count; ++i) { 1129 for (int i = 0; i < value_count; ++i) {
1130 HValue* value = hydrogen_env->values()->at(i); 1130 HValue* value = hydrogen_env->values()->at(i);
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 void LPointerMap::PrintTo(StringStream* stream) const { 2075 void LPointerMap::PrintTo(StringStream* stream) const {
2076 stream->Add("{"); 2076 stream->Add("{");
2077 for (int i = 0; i < pointer_operands_.length(); ++i) { 2077 for (int i = 0; i < pointer_operands_.length(); ++i) {
2078 if (i != 0) stream->Add(";"); 2078 if (i != 0) stream->Add(";");
2079 pointer_operands_[i]->PrintTo(stream); 2079 pointer_operands_[i]->PrintTo(stream);
2080 } 2080 }
2081 stream->Add("} @%d", position()); 2081 stream->Add("} @%d", position());
2082 } 2082 }
2083 2083
2084 } } // namespace v8::internal 2084 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/assembler.h » ('j') | src/assembler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698