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

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

Issue 1455883004: [crankshaft] only compile string index access with element key. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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-554831.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-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 7858 matching lines...) Expand 10 before | Expand all | Expand 10 after
7869 ValueContext for_value(this, ARGUMENTS_NOT_ALLOWED); 7869 ValueContext for_value(this, ARGUMENTS_NOT_ALLOWED);
7870 Push(object); 7870 Push(object);
7871 if (key != NULL) Push(key); 7871 if (key != NULL) Push(key);
7872 BuildLoad(expr, expr->LoadId()); 7872 BuildLoad(expr, expr->LoadId());
7873 } 7873 }
7874 7874
7875 7875
7876 void HOptimizedGraphBuilder::BuildLoad(Property* expr, 7876 void HOptimizedGraphBuilder::BuildLoad(Property* expr,
7877 BailoutId ast_id) { 7877 BailoutId ast_id) {
7878 HInstruction* instr = NULL; 7878 HInstruction* instr = NULL;
7879 if (expr->IsStringAccess()) { 7879 if (expr->IsStringAccess() && expr->GetKeyType() == ELEMENT) {
7880 HValue* index = Pop(); 7880 HValue* index = Pop();
7881 HValue* string = Pop(); 7881 HValue* string = Pop();
7882 HInstruction* char_code = BuildStringCharCodeAt(string, index); 7882 HInstruction* char_code = BuildStringCharCodeAt(string, index);
7883 AddInstruction(char_code); 7883 AddInstruction(char_code);
7884 instr = NewUncasted<HStringCharFromCode>(char_code); 7884 instr = NewUncasted<HStringCharFromCode>(char_code);
7885 7885
7886 } else if (expr->key()->IsPropertyName()) { 7886 } else if (expr->key()->IsPropertyName()) {
7887 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName(); 7887 Handle<String> name = expr->key()->AsLiteral()->AsPropertyName();
7888 HValue* object = Pop(); 7888 HValue* object = Pop();
7889 7889
(...skipping 5740 matching lines...) Expand 10 before | Expand all | Expand 10 after
13630 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13630 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13631 } 13631 }
13632 13632
13633 #ifdef DEBUG 13633 #ifdef DEBUG
13634 graph_->Verify(false); // No full verify. 13634 graph_->Verify(false); // No full verify.
13635 #endif 13635 #endif
13636 } 13636 }
13637 13637
13638 } // namespace internal 13638 } // namespace internal
13639 } // namespace v8 13639 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-554831.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698