| 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); | 960 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); |
| 961 | 961 |
| 962 Node* feedback_vector = __ LoadFeedbackVector(); | 962 Node* feedback_vector = __ LoadFeedbackVector(); |
| 963 Node* context = __ GetContext(); | 963 Node* context = __ GetContext(); |
| 964 | 964 |
| 965 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, | 965 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, |
| 966 value, flags, feedback_vector, vector_index); | 966 value, flags, feedback_vector, vector_index); |
| 967 __ Dispatch(); | 967 __ Dispatch(); |
| 968 } | 968 } |
| 969 | 969 |
| 970 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { |
| 971 Node* name = __ LoadRegister(__ BytecodeOperandReg(0)); |
| 972 Node* value = __ LoadRegister(__ BytecodeOperandReg(1)); |
| 973 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(2)); |
| 974 |
| 975 Node* feedback_vector = __ LoadFeedbackVector(); |
| 976 Node* context = __ GetContext(); |
| 977 |
| 978 __ CallRuntime(Runtime::kStoreTypeInformation, context, name, value, |
| 979 feedback_vector, vector_index); |
| 980 __ Dispatch(); |
| 981 } |
| 982 |
| 970 // LdaModuleVariable <cell_index> <depth> | 983 // LdaModuleVariable <cell_index> <depth> |
| 971 // | 984 // |
| 972 // Load the contents of a module variable into the accumulator. The variable is | 985 // Load the contents of a module variable into the accumulator. The variable is |
| 973 // identified by <cell_index>. <depth> is the depth of the current context | 986 // identified by <cell_index>. <depth> is the depth of the current context |
| 974 // relative to the module context. | 987 // relative to the module context. |
| 975 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { | 988 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { |
| 976 Node* cell_index = __ BytecodeOperandImmIntPtr(0); | 989 Node* cell_index = __ BytecodeOperandImmIntPtr(0); |
| 977 Node* depth = __ BytecodeOperandUImm(1); | 990 Node* depth = __ BytecodeOperandUImm(1); |
| 978 | 991 |
| 979 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); | 992 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); |
| (...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 3378 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 3366 __ SmiTag(new_state)); | 3379 __ SmiTag(new_state)); |
| 3367 __ SetAccumulator(old_state); | 3380 __ SetAccumulator(old_state); |
| 3368 | 3381 |
| 3369 __ Dispatch(); | 3382 __ Dispatch(); |
| 3370 } | 3383 } |
| 3371 | 3384 |
| 3372 } // namespace interpreter | 3385 } // namespace interpreter |
| 3373 } // namespace internal | 3386 } // namespace internal |
| 3374 } // namespace v8 | 3387 } // namespace v8 |
| OLD | NEW |