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 "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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2479 | 2479 |
2480 // Call ResolvePossiblyDirectEval and modify the callee. | 2480 // Call ResolvePossiblyDirectEval and modify the callee. |
2481 builder() | 2481 builder() |
2482 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, runtime_call_args) | 2482 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, runtime_call_args) |
2483 .StoreAccumulatorInRegister(callee); | 2483 .StoreAccumulatorInRegister(callee); |
2484 } | 2484 } |
2485 | 2485 |
2486 builder()->SetExpressionPosition(expr); | 2486 builder()->SetExpressionPosition(expr); |
2487 | 2487 |
2488 int const feedback_slot_index = feedback_index(expr->CallFeedbackICSlot()); | 2488 int const feedback_slot_index = feedback_index(expr->CallFeedbackICSlot()); |
2489 builder()->Call(callee, args, feedback_slot_index, expr->tail_call_mode()); | 2489 builder()->Call(callee, args, feedback_slot_index, call_type, |
| 2490 expr->tail_call_mode()); |
2490 } | 2491 } |
2491 | 2492 |
2492 void BytecodeGenerator::VisitCallSuper(Call* expr) { | 2493 void BytecodeGenerator::VisitCallSuper(Call* expr) { |
2493 RegisterAllocationScope register_scope(this); | 2494 RegisterAllocationScope register_scope(this); |
2494 SuperCallReference* super = expr->expression()->AsSuperCallReference(); | 2495 SuperCallReference* super = expr->expression()->AsSuperCallReference(); |
2495 | 2496 |
2496 // Prepare the constructor to the super call. | 2497 // Prepare the constructor to the super call. |
2497 Register this_function = VisitForRegisterValue(super->this_function_var()); | 2498 Register this_function = VisitForRegisterValue(super->this_function_var()); |
2498 builder()->CallRuntime(Runtime::kInlineGetSuperConstructor, this_function); | 2499 builder()->CallRuntime(Runtime::kInlineGetSuperConstructor, this_function); |
2499 | 2500 |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3208 } | 3209 } |
3209 | 3210 |
3210 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3211 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
3211 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3212 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
3212 : Runtime::kStoreKeyedToSuper_Sloppy; | 3213 : Runtime::kStoreKeyedToSuper_Sloppy; |
3213 } | 3214 } |
3214 | 3215 |
3215 } // namespace interpreter | 3216 } // namespace interpreter |
3216 } // namespace internal | 3217 } // namespace internal |
3217 } // namespace v8 | 3218 } // namespace v8 |
OLD | NEW |