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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1483373002: [crankshaft] Fix crash when case labels inline endless loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/bailout-reason.h ('k') | test/mjsunit/regress/regress-crbug-551287.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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 5026 matching lines...) Expand 10 before | Expand all | Expand 10 after
5037 BailoutId default_id = BailoutId::None(); 5037 BailoutId default_id = BailoutId::None();
5038 for (int i = 0; i < clause_count; ++i) { 5038 for (int i = 0; i < clause_count; ++i) {
5039 CaseClause* clause = clauses->at(i); 5039 CaseClause* clause = clauses->at(i);
5040 if (clause->is_default()) { 5040 if (clause->is_default()) {
5041 body_blocks.Add(NULL, zone()); 5041 body_blocks.Add(NULL, zone());
5042 if (default_id.IsNone()) default_id = clause->EntryId(); 5042 if (default_id.IsNone()) default_id = clause->EntryId();
5043 continue; 5043 continue;
5044 } 5044 }
5045 5045
5046 // Generate a compare and branch. 5046 // Generate a compare and branch.
5047 CHECK_ALIVE(VisitForValue(clause->label())); 5047 CHECK_BAILOUT(VisitForValue(clause->label()));
5048 if (current_block() == NULL) return Bailout(kUnsupportedSwitchStatement);
5048 HValue* label_value = Pop(); 5049 HValue* label_value = Pop();
5049 5050
5050 Type* label_type = clause->label()->bounds().lower; 5051 Type* label_type = clause->label()->bounds().lower;
5051 Type* combined_type = clause->compare_type(); 5052 Type* combined_type = clause->compare_type();
5052 HControlInstruction* compare = BuildCompareInstruction( 5053 HControlInstruction* compare = BuildCompareInstruction(
5053 Token::EQ_STRICT, tag_value, label_value, tag_type, label_type, 5054 Token::EQ_STRICT, tag_value, label_value, tag_type, label_type,
5054 combined_type, 5055 combined_type,
5055 ScriptPositionToSourcePosition(stmt->tag()->position()), 5056 ScriptPositionToSourcePosition(stmt->tag()->position()),
5056 ScriptPositionToSourcePosition(clause->label()->position()), 5057 ScriptPositionToSourcePosition(clause->label()->position()),
5057 PUSH_BEFORE_SIMULATE, clause->id()); 5058 PUSH_BEFORE_SIMULATE, clause->id());
(...skipping 8561 matching lines...) Expand 10 before | Expand all | Expand 10 after
13619 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13620 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13620 } 13621 }
13621 13622
13622 #ifdef DEBUG 13623 #ifdef DEBUG
13623 graph_->Verify(false); // No full verify. 13624 graph_->Verify(false); // No full verify.
13624 #endif 13625 #endif
13625 } 13626 }
13626 13627
13627 } // namespace internal 13628 } // namespace internal
13628 } // namespace v8 13629 } // namespace v8
OLDNEW
« no previous file with comments | « src/bailout-reason.h ('k') | test/mjsunit/regress/regress-crbug-551287.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698