| 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/interpreter-assembler.h" | 5 #include "src/interpreter/interpreter-assembler.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 { | 769 { |
| 770 // Cache the called function in a feedback vector slot. Cache states | 770 // Cache the called function in a feedback vector slot. Cache states |
| 771 // are uninitialized, monomorphic (indicated by a JSFunction), and | 771 // are uninitialized, monomorphic (indicated by a JSFunction), and |
| 772 // megamorphic. | 772 // megamorphic. |
| 773 // TODO(mythria/v8:5210): Check if it is better to mark extra_checks as a | 773 // TODO(mythria/v8:5210): Check if it is better to mark extra_checks as a |
| 774 // deferred block so that call_construct_function will be scheduled. | 774 // deferred block so that call_construct_function will be scheduled. |
| 775 Label extra_checks(this), call_construct_function(this); | 775 Label extra_checks(this), call_construct_function(this); |
| 776 | 776 |
| 777 Node* feedback_element = | 777 Node* feedback_element = |
| 778 LoadFixedArrayElement(type_feedback_vector, slot_id); | 778 LoadFixedArrayElement(type_feedback_vector, slot_id); |
| 779 Node* feedback_value = LoadWeakCellValue(feedback_element); | 779 Node* feedback_value = LoadWeakCellValueUnchecked(feedback_element); |
| 780 Node* is_monomorphic = WordEqual(constructor, feedback_value); | 780 Node* is_monomorphic = WordEqual(constructor, feedback_value); |
| 781 Branch(is_monomorphic, &call_construct_function, &extra_checks); | 781 Branch(is_monomorphic, &call_construct_function, &extra_checks); |
| 782 | 782 |
| 783 Bind(&extra_checks); | 783 Bind(&extra_checks); |
| 784 { | 784 { |
| 785 Label mark_megamorphic(this), initialize(this), | 785 Label mark_megamorphic(this), initialize(this), |
| 786 check_allocation_site(this), check_initialized(this), | 786 check_allocation_site(this), check_initialized(this), |
| 787 set_alloc_feedback_and_call(this); | 787 set_alloc_feedback_and_call(this); |
| 788 { | 788 { |
| 789 // Check if it is a megamorphic target | 789 // Check if it is a megamorphic target |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 Goto(&loop); | 1378 Goto(&loop); |
| 1379 } | 1379 } |
| 1380 Bind(&done_loop); | 1380 Bind(&done_loop); |
| 1381 | 1381 |
| 1382 return array; | 1382 return array; |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 } // namespace interpreter | 1385 } // namespace interpreter |
| 1386 } // namespace internal | 1386 } // namespace internal |
| 1387 } // namespace v8 | 1387 } // namespace v8 |
| OLD | NEW |