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

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

Issue 2473223004: [Interpreter] Ensure ValueOf is only called once for post-increment operations. (Closed)
Patch Set: Fix golden files Created 4 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/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden » ('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 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after
2743 VisitForRegisterValue(property->key(), load_super_args[2]); 2743 VisitForRegisterValue(property->key(), load_super_args[2]);
2744 builder()->CallRuntime(Runtime::kLoadKeyedFromSuper, load_super_args); 2744 builder()->CallRuntime(Runtime::kLoadKeyedFromSuper, load_super_args);
2745 break; 2745 break;
2746 } 2746 }
2747 } 2747 }
2748 2748
2749 // Save result for postfix expressions. 2749 // Save result for postfix expressions.
2750 if (is_postfix) { 2750 if (is_postfix) {
2751 // Convert old value into a number before saving it. 2751 // Convert old value into a number before saving it.
2752 old_value = register_allocator()->NewRegister(); 2752 old_value = register_allocator()->NewRegister();
2753 builder()->ConvertAccumulatorToNumber(old_value); 2753 builder()
2754 ->ConvertAccumulatorToNumber(old_value)
2755 .LoadAccumulatorWithRegister(old_value);
Jarin 2016/11/08 14:39:28 Does not this mean that the feedback for the binop
2754 } 2756 }
2755 2757
2756 // Perform +1/-1 operation. 2758 // Perform +1/-1 operation.
2757 FeedbackVectorSlot slot = expr->CountBinaryOpFeedbackSlot(); 2759 FeedbackVectorSlot slot = expr->CountBinaryOpFeedbackSlot();
2758 builder()->CountOperation(expr->binary_op(), feedback_index(slot)); 2760 builder()->CountOperation(expr->binary_op(), feedback_index(slot));
2759 2761
2760 // Store the value. 2762 // Store the value.
2761 builder()->SetExpressionPosition(expr); 2763 builder()->SetExpressionPosition(expr);
2762 FeedbackVectorSlot feedback_slot = expr->CountSlot(); 2764 FeedbackVectorSlot feedback_slot = expr->CountSlot();
2763 switch (assign_type) { 2765 switch (assign_type) {
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3216 } 3218 }
3217 3219
3218 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { 3220 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
3219 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict 3221 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
3220 : Runtime::kStoreKeyedToSuper_Sloppy; 3222 : Runtime::kStoreKeyedToSuper_Sloppy;
3221 } 3223 }
3222 3224
3223 } // namespace interpreter 3225 } // namespace interpreter
3224 } // namespace internal 3226 } // namespace internal
3225 } // namespace v8 3227 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698