OLD | NEW |
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/objects.h" | 10 #include "src/objects.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 } | 256 } |
257 case VariableLocation::GLOBAL: | 257 case VariableLocation::GLOBAL: |
258 case VariableLocation::UNALLOCATED: | 258 case VariableLocation::UNALLOCATED: |
259 case VariableLocation::CONTEXT: | 259 case VariableLocation::CONTEXT: |
260 case VariableLocation::LOOKUP: | 260 case VariableLocation::LOOKUP: |
261 UNIMPLEMENTED(); | 261 UNIMPLEMENTED(); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 | 265 |
| 266 void BytecodeGenerator::VisitRestParameter(RestParameter* node) { |
| 267 UNREACHABLE(); |
| 268 } |
| 269 |
| 270 |
266 void BytecodeGenerator::VisitAssignment(Assignment* expr) { | 271 void BytecodeGenerator::VisitAssignment(Assignment* expr) { |
267 DCHECK(expr->target()->IsValidReferenceExpression()); | 272 DCHECK(expr->target()->IsValidReferenceExpression()); |
268 | 273 |
269 // Left-hand side can only be a property, a global or a variable slot. | 274 // Left-hand side can only be a property, a global or a variable slot. |
270 Property* property = expr->target()->AsProperty(); | 275 Property* property = expr->target()->AsProperty(); |
271 LhsKind assign_type = Property::GetAssignType(property); | 276 LhsKind assign_type = Property::GetAssignType(property); |
272 | 277 |
273 DCHECK(!expr->is_compound()); | 278 DCHECK(!expr->is_compound()); |
274 Visit(expr->value()); | 279 Visit(expr->value()); |
275 | 280 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 376 |
372 Visit(left); | 377 Visit(left); |
373 builder().StoreAccumulatorInRegister(temporary); | 378 builder().StoreAccumulatorInRegister(temporary); |
374 Visit(right); | 379 Visit(right); |
375 builder().BinaryOperation(op, temporary); | 380 builder().BinaryOperation(op, temporary); |
376 } | 381 } |
377 | 382 |
378 } // namespace interpreter | 383 } // namespace interpreter |
379 } // namespace internal | 384 } // namespace internal |
380 } // namespace v8 | 385 } // namespace v8 |
OLD | NEW |