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

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

Issue 2165953002: [interpreter] Add a register operand to ToNumber (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 4 years, 5 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/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-flags.h" 10 #include "src/interpreter/bytecode-flags.h"
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 BuildKeyedSuperPropertyLoad(object, home_object, key); 2784 BuildKeyedSuperPropertyLoad(object, home_object, key);
2785 break; 2785 break;
2786 } 2786 }
2787 } 2787 }
2788 2788
2789 // Save result for postfix expressions. 2789 // Save result for postfix expressions.
2790 if (is_postfix) { 2790 if (is_postfix) {
2791 old_value = register_allocator()->outer()->NewRegister(); 2791 old_value = register_allocator()->outer()->NewRegister();
2792 2792
2793 // Convert old value into a number before saving it. 2793 // Convert old value into a number before saving it.
2794 builder()->CastAccumulatorToNumber().StoreAccumulatorInRegister(old_value); 2794 builder()->CastAccumulatorToNumber(old_value);
2795 } 2795 }
2796 2796
2797 // Perform +1/-1 operation. 2797 // Perform +1/-1 operation.
2798 builder()->CountOperation(expr->binary_op()); 2798 builder()->CountOperation(expr->binary_op());
2799 2799
2800 // Store the value. 2800 // Store the value.
2801 builder()->SetExpressionPosition(expr); 2801 builder()->SetExpressionPosition(expr);
2802 FeedbackVectorSlot feedback_slot = expr->CountSlot(); 2802 FeedbackVectorSlot feedback_slot = expr->CountSlot();
2803 switch (assign_type) { 2803 switch (assign_type) {
2804 case VARIABLE: { 2804 case VARIABLE: {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 return execution_context()->scope()->language_mode(); 3178 return execution_context()->scope()->language_mode();
3179 } 3179 }
3180 3180
3181 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3181 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3182 return TypeFeedbackVector::GetIndex(slot); 3182 return TypeFeedbackVector::GetIndex(slot);
3183 } 3183 }
3184 3184
3185 } // namespace interpreter 3185 } // namespace interpreter
3186 } // namespace internal 3186 } // namespace internal
3187 } // namespace v8 3187 } // 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