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

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

Issue 1963973003: [runtime] Deprecate Runtime_FinalizeClassDefinition entry. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-enable-eval
Patch Set: Created 4 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/full-codegen/full-codegen.cc ('k') | src/runtime/runtime.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/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 Register literal = register_allocator()->NextConsecutiveRegister(); 1389 Register literal = register_allocator()->NextConsecutiveRegister();
1390 Register prototype = register_allocator()->NextConsecutiveRegister(); 1390 Register prototype = register_allocator()->NextConsecutiveRegister();
1391 Handle<String> name = isolate()->factory()->prototype_string(); 1391 Handle<String> name = isolate()->factory()->prototype_string();
1392 FeedbackVectorSlot slot = expr->PrototypeSlot(); 1392 FeedbackVectorSlot slot = expr->PrototypeSlot();
1393 builder() 1393 builder()
1394 ->StoreAccumulatorInRegister(literal) 1394 ->StoreAccumulatorInRegister(literal)
1395 .LoadNamedProperty(literal, name, feedback_index(slot)) 1395 .LoadNamedProperty(literal, name, feedback_index(slot))
1396 .StoreAccumulatorInRegister(prototype); 1396 .StoreAccumulatorInRegister(prototype);
1397 1397
1398 VisitClassLiteralProperties(expr, literal, prototype); 1398 VisitClassLiteralProperties(expr, literal, prototype);
1399 builder()->CallRuntime(Runtime::kFinalizeClassDefinition, literal, 2); 1399 builder()->CallRuntime(Runtime::kToFastProperties, literal, 1);
1400 // Assign to class variable. 1400 // Assign to class variable.
1401 if (expr->class_variable_proxy() != nullptr) { 1401 if (expr->class_variable_proxy() != nullptr) {
1402 Variable* var = expr->class_variable_proxy()->var(); 1402 Variable* var = expr->class_variable_proxy()->var();
1403 FeedbackVectorSlot slot = expr->NeedsProxySlot() 1403 FeedbackVectorSlot slot = expr->NeedsProxySlot()
1404 ? expr->ProxySlot() 1404 ? expr->ProxySlot()
1405 : FeedbackVectorSlot::Invalid(); 1405 : FeedbackVectorSlot::Invalid();
1406 VisitVariableAssignment(var, Token::INIT, slot); 1406 VisitVariableAssignment(var, Token::INIT, slot);
1407 } 1407 }
1408 execution_result()->SetResultInAccumulator(); 1408 execution_result()->SetResultInAccumulator();
1409 } 1409 }
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 } 3270 }
3271 3271
3272 3272
3273 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3273 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3274 return info()->shared_info()->feedback_vector()->GetIndex(slot); 3274 return info()->shared_info()->feedback_vector()->GetIndex(slot);
3275 } 3275 }
3276 3276
3277 } // namespace interpreter 3277 } // namespace interpreter
3278 } // namespace internal 3278 } // namespace internal
3279 } // namespace v8 3279 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698