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

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

Issue 1772423002: Don't do any special normalization if a boilerplate contains function literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mark osr-one/osr-two as skip on ignition/arm Created 4 years, 9 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/parsing/parser.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 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/compiler.h" 8 #include "src/compiler.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/control-flow-builders.h" 10 #include "src/interpreter/control-flow-builders.h"
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 builder()->CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 1697 builder()->CallRuntime(Runtime::kDefineGetterPropertyUnchecked,
1698 literal_argument, 4); 1698 literal_argument, 4);
1699 break; 1699 break;
1700 case ObjectLiteral::Property::SETTER: 1700 case ObjectLiteral::Property::SETTER:
1701 builder()->CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 1701 builder()->CallRuntime(Runtime::kDefineSetterPropertyUnchecked,
1702 literal_argument, 4); 1702 literal_argument, 4);
1703 break; 1703 break;
1704 } 1704 }
1705 } 1705 }
1706 1706
1707 // Transform literals that contain functions to fast properties.
1708 if (expr->has_function()) {
1709 builder()->CallRuntime(Runtime::kToFastProperties, literal, 1);
1710 }
1711
1712 execution_result()->SetResultInRegister(literal); 1707 execution_result()->SetResultInRegister(literal);
1713 } 1708 }
1714 1709
1715 1710
1716 void BytecodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { 1711 void BytecodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
1717 // Deep-copy the literal boilerplate. 1712 // Deep-copy the literal boilerplate.
1718 builder()->CreateArrayLiteral(expr->constant_elements(), 1713 builder()->CreateArrayLiteral(expr->constant_elements(),
1719 expr->literal_index(), 1714 expr->literal_index(),
1720 expr->ComputeFlags(true)); 1715 expr->ComputeFlags(true));
1721 Register index, literal; 1716 Register index, literal;
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 } 3151 }
3157 3152
3158 3153
3159 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3154 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3160 return info()->feedback_vector()->GetIndex(slot); 3155 return info()->feedback_vector()->GetIndex(slot);
3161 } 3156 }
3162 3157
3163 } // namespace interpreter 3158 } // namespace interpreter
3164 } // namespace internal 3159 } // namespace internal
3165 } // namespace v8 3160 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698