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

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

Issue 2555263002: [Interpreter] Add expression positions to BinaryOps. (Closed)
Patch Set: Add message test Created 4 years 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
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 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 FeedbackVectorSlot slot = expr->CompareOperationFeedbackSlot(); 2837 FeedbackVectorSlot slot = expr->CompareOperationFeedbackSlot();
2838 builder()->CompareOperation(expr->op(), lhs, feedback_index(slot)); 2838 builder()->CompareOperation(expr->op(), lhs, feedback_index(slot));
2839 } 2839 }
2840 2840
2841 void BytecodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) { 2841 void BytecodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) {
2842 // TODO(rmcilroy): Special case "x * 1.0" and "x * -1" which are generated for 2842 // TODO(rmcilroy): Special case "x * 1.0" and "x * -1" which are generated for
2843 // +x and -x by the parser. 2843 // +x and -x by the parser.
2844 Register lhs = VisitForRegisterValue(expr->left()); 2844 Register lhs = VisitForRegisterValue(expr->left());
2845 VisitForAccumulatorValue(expr->right()); 2845 VisitForAccumulatorValue(expr->right());
2846 FeedbackVectorSlot slot = expr->BinaryOperationFeedbackSlot(); 2846 FeedbackVectorSlot slot = expr->BinaryOperationFeedbackSlot();
2847 builder()->SetExpressionPosition(expr);
2847 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); 2848 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot));
2848 } 2849 }
2849 2850
2850 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } 2851 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); }
2851 2852
2852 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { 2853 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) {
2853 UNREACHABLE(); 2854 UNREACHABLE();
2854 } 2855 }
2855 2856
2856 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { 2857 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
3259 } 3260 }
3260 3261
3261 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { 3262 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
3262 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict 3263 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
3263 : Runtime::kStoreKeyedToSuper_Sloppy; 3264 : Runtime::kStoreKeyedToSuper_Sloppy;
3264 } 3265 }
3265 3266
3266 } // namespace interpreter 3267 } // namespace interpreter
3267 } // namespace internal 3268 } // namespace internal
3268 } // namespace v8 3269 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden » ('j') | test/message/tonumber_symbol.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698