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

Side by Side Diff: src/hydrogen.cc

Issue 1183683004: [crankshaft] Fix wrong bailout points in for-in loop body. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test case. Created 5 years, 6 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-500435.js » ('j') | 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 // 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 5192 matching lines...) Expand 10 before | Expand all | Expand 10 after
5203 if (fast) { 5203 if (fast) {
5204 // Check if the expected map still matches that of the enumerable. 5204 // Check if the expected map still matches that of the enumerable.
5205 // If not just deoptimize. 5205 // If not just deoptimize.
5206 Add<HCheckMapValue>(enumerable, environment()->ExpressionStackAt(3)); 5206 Add<HCheckMapValue>(enumerable, environment()->ExpressionStackAt(3));
5207 Bind(each_var, key); 5207 Bind(each_var, key);
5208 } else { 5208 } else {
5209 Add<HPushArguments>(enumerable, key); 5209 Add<HPushArguments>(enumerable, key);
5210 Runtime::FunctionId function_id = Runtime::kForInFilter; 5210 Runtime::FunctionId function_id = Runtime::kForInFilter;
5211 key = Add<HCallRuntime>(isolate()->factory()->empty_string(), 5211 key = Add<HCallRuntime>(isolate()->factory()->empty_string(),
5212 Runtime::FunctionForId(function_id), 2); 5212 Runtime::FunctionForId(function_id), 2);
5213 Push(key);
5214 Add<HSimulate>(stmt->FilterId());
5215 key = Pop();
5213 Bind(each_var, key); 5216 Bind(each_var, key);
5214 Add<HSimulate>(stmt->AssignmentId());
5215 IfBuilder if_undefined(this); 5217 IfBuilder if_undefined(this);
5216 if_undefined.If<HCompareObjectEqAndBranch>(key, 5218 if_undefined.If<HCompareObjectEqAndBranch>(key,
5217 graph()->GetConstantUndefined()); 5219 graph()->GetConstantUndefined());
5218 if_undefined.ThenDeopt(Deoptimizer::kUndefined); 5220 if_undefined.ThenDeopt(Deoptimizer::kUndefined);
5219 if_undefined.End(); 5221 if_undefined.End();
5222 Add<HSimulate>(stmt->AssignmentId());
5220 } 5223 }
5221 5224
5222 BreakAndContinueInfo break_info(stmt, scope(), 5); 5225 BreakAndContinueInfo break_info(stmt, scope(), 5);
5223 { 5226 {
5224 BreakAndContinueScope push(&break_info, this); 5227 BreakAndContinueScope push(&break_info, this);
5225 CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry)); 5228 CHECK_BAILOUT(VisitLoopBody(stmt, loop_entry));
5226 } 5229 }
5227 5230
5228 HBasicBlock* body_exit = 5231 HBasicBlock* body_exit =
5229 JoinContinue(stmt, current_block(), break_info.continue_block()); 5232 JoinContinue(stmt, current_block(), break_info.continue_block());
(...skipping 7954 matching lines...) Expand 10 before | Expand all | Expand 10 after
13184 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13187 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13185 } 13188 }
13186 13189
13187 #ifdef DEBUG 13190 #ifdef DEBUG
13188 graph_->Verify(false); // No full verify. 13191 graph_->Verify(false); // No full verify.
13189 #endif 13192 #endif
13190 } 13193 }
13191 13194
13192 } // namespace internal 13195 } // namespace internal
13193 } // namespace v8 13196 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-500435.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698