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

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

Issue 2900333002: Revert of [turbofan] Speculatively optimize string character access. (Closed)
Patch Set: Created 3 years, 7 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 | « src/compiler/js-builtin-reducer.cc ('k') | src/heap/heap.h » ('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 <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 8333 matching lines...) Expand 10 before | Expand all | Expand 10 after
8344 HValue* receiver = environment()->ExpressionStackAt(1); 8344 HValue* receiver = environment()->ExpressionStackAt(1);
8345 if (!receiver->IsPhi() || receiver->OperandCount() != 1) return false; 8345 if (!receiver->IsPhi() || receiver->OperandCount() != 1) return false;
8346 if (cache->enumerable() != receiver->OperandAt(0)) return false; 8346 if (cache->enumerable() != receiver->OperandAt(0)) return false;
8347 Drop(3); // key, receiver, function 8347 Drop(3); // key, receiver, function
8348 Add<HCheckMapValue>(receiver, cache->map()); 8348 Add<HCheckMapValue>(receiver, cache->map());
8349 ast_context()->ReturnValue(graph()->GetConstantTrue()); 8349 ast_context()->ReturnValue(graph()->GetConstantTrue());
8350 return true; 8350 return true;
8351 } 8351 }
8352 case kStringCharCodeAt: 8352 case kStringCharCodeAt:
8353 case kStringCharAt: 8353 case kStringCharAt:
8354 if (argument_count == 2 && isolate()->IsStringBoundsCheckIntact()) { 8354 if (argument_count == 2) {
8355 HValue* index = Pop(); 8355 HValue* index = Pop();
8356 HValue* string = Pop(); 8356 HValue* string = Pop();
8357 Drop(1); // Function. 8357 Drop(1); // Function.
8358 HInstruction* char_code = 8358 HInstruction* char_code =
8359 BuildStringCharCodeAt(string, index); 8359 BuildStringCharCodeAt(string, index);
8360 if (id == kStringCharCodeAt) { 8360 if (id == kStringCharCodeAt) {
8361 ast_context()->ReturnInstruction(char_code, ast_id); 8361 ast_context()->ReturnInstruction(char_code, ast_id);
8362 return true; 8362 return true;
8363 } 8363 }
8364 AddInstruction(char_code); 8364 AddInstruction(char_code);
(...skipping 4158 matching lines...) Expand 10 before | Expand all | Expand 10 after
12523 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12523 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12524 } 12524 }
12525 12525
12526 #ifdef DEBUG 12526 #ifdef DEBUG
12527 graph_->Verify(false); // No full verify. 12527 graph_->Verify(false); // No full verify.
12528 #endif 12528 #endif
12529 } 12529 }
12530 12530
12531 } // namespace internal 12531 } // namespace internal
12532 } // namespace v8 12532 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698