Chromium Code Reviews| 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.h" | 5 #include "src/interpreter/interpreter.h" |
| 6 | 6 |
| 7 #include <fstream> | 7 #include <fstream> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2034 // Record the fact that we hit the for-in slow path. | 2034 // Record the fact that we hit the for-in slow path. |
| 2035 Node* vector_index = __ BytecodeOperandIdx(3); | 2035 Node* vector_index = __ BytecodeOperandIdx(3); |
| 2036 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 2036 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
| 2037 Node* megamorphic_sentinel = | 2037 Node* megamorphic_sentinel = |
| 2038 __ HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate_)); | 2038 __ HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate_)); |
| 2039 __ StoreFixedArrayElement(type_feedback_vector, vector_index, | 2039 __ StoreFixedArrayElement(type_feedback_vector, vector_index, |
| 2040 megamorphic_sentinel, SKIP_WRITE_BARRIER); | 2040 megamorphic_sentinel, SKIP_WRITE_BARRIER); |
| 2041 | 2041 |
| 2042 // Need to filter the {key} for the {receiver}. | 2042 // Need to filter the {key} for the {receiver}. |
| 2043 Node* context = __ GetContext(); | 2043 Node* context = __ GetContext(); |
| 2044 Node* result = | 2044 Callable callable = CodeFactory::ForInFilter(assembler->isolate()); |
| 2045 __ CallRuntime(Runtime::kForInFilter, context, receiver, key); | 2045 Node* result = __ CallStub(callable, context, key, receiver); |
|
rmcilroy
2016/08/05 14:10:51
Any reason you didn't inline this TF stub into the
| |
| 2046 __ SetAccumulator(result); | 2046 __ SetAccumulator(result); |
| 2047 __ Dispatch(); | 2047 __ Dispatch(); |
| 2048 } | 2048 } |
| 2049 } | 2049 } |
| 2050 | 2050 |
| 2051 // ForInDone <index> <cache_length> | 2051 // ForInDone <index> <cache_length> |
| 2052 // | 2052 // |
| 2053 // Returns true if the end of the enumerable properties has been reached. | 2053 // Returns true if the end of the enumerable properties has been reached. |
| 2054 void Interpreter::DoForInDone(InterpreterAssembler* assembler) { | 2054 void Interpreter::DoForInDone(InterpreterAssembler* assembler) { |
| 2055 Node* index_reg = __ BytecodeOperandReg(0); | 2055 Node* index_reg = __ BytecodeOperandReg(0); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2174 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2174 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2175 __ SmiTag(new_state)); | 2175 __ SmiTag(new_state)); |
| 2176 __ SetAccumulator(old_state); | 2176 __ SetAccumulator(old_state); |
| 2177 | 2177 |
| 2178 __ Dispatch(); | 2178 __ Dispatch(); |
| 2179 } | 2179 } |
| 2180 | 2180 |
| 2181 } // namespace interpreter | 2181 } // namespace interpreter |
| 2182 } // namespace internal | 2182 } // namespace internal |
| 2183 } // namespace v8 | 2183 } // namespace v8 |
| OLD | NEW |