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

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

Issue 174883002: Skip unreachable blocks when looking for next emitted block. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // issues when the stack allocated buffer goes out of scope. 135 // issues when the stack allocated buffer goes out of scope.
136 size_t length = builder.position(); 136 size_t length = builder.position();
137 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); 137 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1);
138 OS::MemCopy(copy.start(), builder.Finalize(), copy.length()); 138 OS::MemCopy(copy.start(), builder.Finalize(), copy.length());
139 masm()->RecordComment(copy.start()); 139 masm()->RecordComment(copy.start());
140 } 140 }
141 141
142 142
143 int LCodeGenBase::GetNextEmittedBlock() const { 143 int LCodeGenBase::GetNextEmittedBlock() const {
144 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { 144 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) {
145 if (!graph()->blocks()->at(i)->IsReachable()) continue;
145 if (!chunk_->GetLabel(i)->HasReplacement()) return i; 146 if (!chunk_->GetLabel(i)->HasReplacement()) return i;
146 } 147 }
147 return -1; 148 return -1;
148 } 149 }
149 150
150 151
151 void LCodeGenBase::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) { 152 void LCodeGenBase::RegisterWeakObjectsInOptimizedCode(Handle<Code> code) {
152 ASSERT(code->is_optimized_code()); 153 ASSERT(code->is_optimized_code());
153 ZoneList<Handle<Map> > maps(1, zone()); 154 ZoneList<Handle<Map> > maps(1, zone());
154 ZoneList<Handle<JSObject> > objects(1, zone()); 155 ZoneList<Handle<JSObject> > objects(1, zone());
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 for (int i = 0; i < objects.length(); i++) { 188 for (int i = 0; i < objects.length(); i++) {
188 AddWeakObjectToCodeDependency(isolate()->heap(), objects.at(i), code); 189 AddWeakObjectToCodeDependency(isolate()->heap(), objects.at(i), code);
189 } 190 }
190 for (int i = 0; i < cells.length(); i++) { 191 for (int i = 0; i < cells.length(); i++) {
191 AddWeakObjectToCodeDependency(isolate()->heap(), cells.at(i), code); 192 AddWeakObjectToCodeDependency(isolate()->heap(), cells.at(i), code);
192 } 193 }
193 } 194 }
194 195
195 196
196 } } // namespace v8::internal 197 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698