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

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

Issue 1410863002: [Interpreter] Add support for Throw. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 <stack> 7 #include <stack>
8 8
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/interpreter/control-flow-builders.h" 10 #include "src/interpreter/control-flow-builders.h"
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 case NAMED_SUPER_PROPERTY: 948 case NAMED_SUPER_PROPERTY:
949 case KEYED_SUPER_PROPERTY: 949 case KEYED_SUPER_PROPERTY:
950 UNIMPLEMENTED(); 950 UNIMPLEMENTED();
951 } 951 }
952 } 952 }
953 953
954 954
955 void BytecodeGenerator::VisitYield(Yield* expr) { UNIMPLEMENTED(); } 955 void BytecodeGenerator::VisitYield(Yield* expr) { UNIMPLEMENTED(); }
956 956
957 957
958 void BytecodeGenerator::VisitThrow(Throw* expr) { UNIMPLEMENTED(); } 958 void BytecodeGenerator::VisitThrow(Throw* expr) {
959 TemporaryRegisterScope temporary_register_scope(builder());
960 Visit(expr->exception());
961 builder()->Throw();
962 }
959 963
960 964
961 void BytecodeGenerator::VisitPropertyLoad(Register obj, Property* expr) { 965 void BytecodeGenerator::VisitPropertyLoad(Register obj, Property* expr) {
962 LhsKind property_kind = Property::GetAssignType(expr); 966 LhsKind property_kind = Property::GetAssignType(expr);
963 FeedbackVectorSlot slot = expr->PropertyFeedbackSlot(); 967 FeedbackVectorSlot slot = expr->PropertyFeedbackSlot();
964 switch (property_kind) { 968 switch (property_kind) {
965 case VARIABLE: 969 case VARIABLE:
966 UNREACHABLE(); 970 UNREACHABLE();
967 case NAMED_PROPERTY: { 971 case NAMED_PROPERTY: {
968 builder()->LoadLiteral(expr->key()->AsLiteral()->AsPropertyName()); 972 builder()->LoadLiteral(expr->key()->AsLiteral()->AsPropertyName());
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 } 1418 }
1415 1419
1416 1420
1417 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 1421 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
1418 return info()->feedback_vector()->GetIndex(slot); 1422 return info()->feedback_vector()->GetIndex(slot);
1419 } 1423 }
1420 1424
1421 } // namespace interpreter 1425 } // namespace interpreter
1422 } // namespace internal 1426 } // namespace internal
1423 } // namespace v8 1427 } // 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