| 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 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2384 // Receiver is undefined for global calls. | 2384 // Receiver is undefined for global calls. |
| 2385 builder()->LoadUndefined().StoreAccumulatorInRegister(receiver); | 2385 builder()->LoadUndefined().StoreAccumulatorInRegister(receiver); |
| 2386 // Load callee as a global variable. | 2386 // Load callee as a global variable. |
| 2387 VariableProxy* proxy = callee_expr->AsVariableProxy(); | 2387 VariableProxy* proxy = callee_expr->AsVariableProxy(); |
| 2388 BuildVariableLoadForAccumulatorValue(proxy->var(), | 2388 BuildVariableLoadForAccumulatorValue(proxy->var(), |
| 2389 proxy->VariableFeedbackSlot(), | 2389 proxy->VariableFeedbackSlot(), |
| 2390 proxy->hole_check_mode()); | 2390 proxy->hole_check_mode()); |
| 2391 builder()->StoreAccumulatorInRegister(callee); | 2391 builder()->StoreAccumulatorInRegister(callee); |
| 2392 break; | 2392 break; |
| 2393 } | 2393 } |
| 2394 case Call::LOOKUP_SLOT_CALL: | 2394 case Call::WITH_CALL: |
| 2395 case Call::POSSIBLY_EVAL_CALL: { | 2395 case Call::POSSIBLY_EVAL_CALL: { |
| 2396 if (callee_expr->AsVariableProxy()->var()->IsLookupSlot()) { | 2396 if (callee_expr->AsVariableProxy()->var()->IsLookupSlot()) { |
| 2397 RegisterAllocationScope inner_register_scope(this); | 2397 RegisterAllocationScope inner_register_scope(this); |
| 2398 Register name = register_allocator()->NewRegister(); | 2398 Register name = register_allocator()->NewRegister(); |
| 2399 | 2399 |
| 2400 // Call %LoadLookupSlotForCall to get the callee and receiver. | 2400 // Call %LoadLookupSlotForCall to get the callee and receiver. |
| 2401 DCHECK(Register::AreContiguous(callee, receiver)); | 2401 DCHECK(Register::AreContiguous(callee, receiver)); |
| 2402 RegisterList result_pair(callee.index(), 2); | 2402 RegisterList result_pair(callee.index(), 2); |
| 2403 Variable* variable = callee_expr->AsVariableProxy()->var(); | 2403 Variable* variable = callee_expr->AsVariableProxy()->var(); |
| 2404 builder() | 2404 builder() |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3192 } | 3192 } |
| 3193 | 3193 |
| 3194 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3194 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
| 3195 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3195 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
| 3196 : Runtime::kStoreKeyedToSuper_Sloppy; | 3196 : Runtime::kStoreKeyedToSuper_Sloppy; |
| 3197 } | 3197 } |
| 3198 | 3198 |
| 3199 } // namespace interpreter | 3199 } // namespace interpreter |
| 3200 } // namespace internal | 3200 } // namespace internal |
| 3201 } // namespace v8 | 3201 } // namespace v8 |
| OLD | NEW |