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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 2294913006: [Interpreter] Enable allocation site mementos in CreateArrayLiterals. (Closed)
Patch Set: Fixed cctest.status Created 4 years, 3 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/cctest/cctest.status » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 break; 1875 break;
1876 } 1876 }
1877 } 1877 }
1878 1878
1879 execution_result()->SetResultInRegister(literal); 1879 execution_result()->SetResultInRegister(literal);
1880 } 1880 }
1881 1881
1882 void BytecodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1882 void BytecodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1883 // Deep-copy the literal boilerplate. 1883 // Deep-copy the literal boilerplate.
1884 builder()->CreateArrayLiteral(expr->constant_elements(), 1884 builder()->CreateArrayLiteral(expr->constant_elements(),
1885 expr->literal_index(), 1885 expr->literal_index(), expr->ComputeFlags());
1886 expr->ComputeFlags(true));
mythria 2016/09/02 15:06:53 Ross, I think this is the only change that is requ
rmcilroy 2016/09/05 09:28:33 AST Graph Builder doesn't create mementos (presuma
Michael Starzinger 2016/09/05 12:23:04 Yes, correct. The reasoning was that only the unop
1887 Register index, literal; 1886 Register index, literal;
1888 1887
1889 // Evaluate all the non-constant subexpressions and store them into the 1888 // Evaluate all the non-constant subexpressions and store them into the
1890 // newly cloned array. 1889 // newly cloned array.
1891 bool literal_in_accumulator = true; 1890 bool literal_in_accumulator = true;
1892 for (int array_index = 0; array_index < expr->values()->length(); 1891 for (int array_index = 0; array_index < expr->values()->length();
1893 array_index++) { 1892 array_index++) {
1894 Expression* subexpr = expr->values()->at(array_index); 1893 Expression* subexpr = expr->values()->at(array_index);
1895 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; 1894 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
1896 DCHECK(!subexpr->IsSpread()); 1895 DCHECK(!subexpr->IsSpread());
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3404 return execution_context()->scope()->language_mode(); 3403 return execution_context()->scope()->language_mode();
3405 } 3404 }
3406 3405
3407 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3406 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3408 return TypeFeedbackVector::GetIndex(slot); 3407 return TypeFeedbackVector::GetIndex(slot);
3409 } 3408 }
3410 3409
3411 } // namespace interpreter 3410 } // namespace interpreter
3412 } // namespace internal 3411 } // namespace internal
3413 } // namespace v8 3412 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698