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

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

Issue 2597163002: Revert of [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)
Patch Set: Created 3 years, 12 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/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.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/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-info.h" 10 #include "src/compilation-info.h"
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 1398
1399 void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) { 1399 void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) {
1400 builder()->SetStatementPosition(stmt); 1400 builder()->SetStatementPosition(stmt);
1401 builder()->Debugger(); 1401 builder()->Debugger();
1402 } 1402 }
1403 1403
1404 void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { 1404 void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
1405 uint8_t flags = CreateClosureFlags::Encode(expr->pretenure(), 1405 uint8_t flags = CreateClosureFlags::Encode(expr->pretenure(),
1406 scope()->is_function_scope()); 1406 scope()->is_function_scope());
1407 size_t entry = builder()->AllocateConstantPoolEntry(); 1407 size_t entry = builder()->AllocateConstantPoolEntry();
1408 int slot_index = feedback_index(expr->LiteralFeedbackSlot()); 1408 builder()->CreateClosure(entry, flags);
1409 builder()->CreateClosure(entry, slot_index, flags);
1410 function_literals_.push_back(std::make_pair(expr, entry)); 1409 function_literals_.push_back(std::make_pair(expr, entry));
1411 } 1410 }
1412 1411
1413 void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) { 1412 void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
1414 VisitClassLiteralForRuntimeDefinition(expr); 1413 VisitClassLiteralForRuntimeDefinition(expr);
1415 1414
1416 // Load the "prototype" from the constructor. 1415 // Load the "prototype" from the constructor.
1417 Register literal = register_allocator()->NewRegister(); 1416 Register literal = register_allocator()->NewRegister();
1418 Register prototype = register_allocator()->NewRegister(); 1417 Register prototype = register_allocator()->NewRegister();
1419 FeedbackVectorSlot slot = expr->PrototypeSlot(); 1418 FeedbackVectorSlot slot = expr->PrototypeSlot();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 expr->has_static_computed_names() 1531 expr->has_static_computed_names()
1533 ? Runtime::kInstallClassNameAccessorWithCheck 1532 ? Runtime::kInstallClassNameAccessorWithCheck
1534 : Runtime::kInstallClassNameAccessor; 1533 : Runtime::kInstallClassNameAccessor;
1535 builder()->CallRuntime(runtime_id, literal); 1534 builder()->CallRuntime(runtime_id, literal);
1536 } 1535 }
1537 } 1536 }
1538 1537
1539 void BytecodeGenerator::VisitNativeFunctionLiteral( 1538 void BytecodeGenerator::VisitNativeFunctionLiteral(
1540 NativeFunctionLiteral* expr) { 1539 NativeFunctionLiteral* expr) {
1541 size_t entry = builder()->AllocateConstantPoolEntry(); 1540 size_t entry = builder()->AllocateConstantPoolEntry();
1542 int slot_index = feedback_index(expr->LiteralFeedbackSlot()); 1541 builder()->CreateClosure(entry, NOT_TENURED);
1543 builder()->CreateClosure(entry, slot_index, NOT_TENURED);
1544 native_function_literals_.push_back(std::make_pair(expr, entry)); 1542 native_function_literals_.push_back(std::make_pair(expr, entry));
1545 } 1543 }
1546 1544
1547 void BytecodeGenerator::VisitDoExpression(DoExpression* expr) { 1545 void BytecodeGenerator::VisitDoExpression(DoExpression* expr) {
1548 VisitBlock(expr->block()); 1546 VisitBlock(expr->block());
1549 VisitVariableProxy(expr->result()); 1547 VisitVariableProxy(expr->result());
1550 } 1548 }
1551 1549
1552 void BytecodeGenerator::VisitConditional(Conditional* expr) { 1550 void BytecodeGenerator::VisitConditional(Conditional* expr) {
1553 if (expr->condition()->ToBooleanIsTrue()) { 1551 if (expr->condition()->ToBooleanIsTrue()) {
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 } 3306 }
3309 3307
3310 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { 3308 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
3311 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict 3309 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
3312 : Runtime::kStoreKeyedToSuper_Sloppy; 3310 : Runtime::kStoreKeyedToSuper_Sloppy;
3313 } 3311 }
3314 3312
3315 } // namespace interpreter 3313 } // namespace interpreter
3316 } // namespace internal 3314 } // namespace internal
3317 } // namespace v8 3315 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698