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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); | 973 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); |
974 | 974 |
975 Node* feedback_vector = __ LoadFeedbackVector(); | 975 Node* feedback_vector = __ LoadFeedbackVector(); |
976 Node* context = __ GetContext(); | 976 Node* context = __ GetContext(); |
977 | 977 |
978 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, | 978 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, |
979 value, flags, feedback_vector, vector_index); | 979 value, flags, feedback_vector, vector_index); |
980 __ Dispatch(); | 980 __ Dispatch(); |
981 } | 981 } |
982 | 982 |
| 983 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { |
| 984 Node* name = __ LoadRegister(__ BytecodeOperandReg(0)); |
| 985 Node* value = __ LoadRegister(__ BytecodeOperandReg(1)); |
| 986 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(2)); |
| 987 |
| 988 Node* feedback_vector = __ LoadFeedbackVector(); |
| 989 Node* context = __ GetContext(); |
| 990 |
| 991 __ CallRuntime(Runtime::kStoreTypeInformation, context, name, value, |
| 992 feedback_vector, vector_index); |
| 993 __ Dispatch(); |
| 994 } |
| 995 |
983 // LdaModuleVariable <cell_index> <depth> | 996 // LdaModuleVariable <cell_index> <depth> |
984 // | 997 // |
985 // Load the contents of a module variable into the accumulator. The variable is | 998 // Load the contents of a module variable into the accumulator. The variable is |
986 // identified by <cell_index>. <depth> is the depth of the current context | 999 // identified by <cell_index>. <depth> is the depth of the current context |
987 // relative to the module context. | 1000 // relative to the module context. |
988 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { | 1001 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { |
989 Node* cell_index = __ BytecodeOperandImmIntPtr(0); | 1002 Node* cell_index = __ BytecodeOperandImmIntPtr(0); |
990 Node* depth = __ BytecodeOperandUImm(1); | 1003 Node* depth = __ BytecodeOperandUImm(1); |
991 | 1004 |
992 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); | 1005 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); |
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3378 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 3391 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
3379 __ SmiTag(new_state)); | 3392 __ SmiTag(new_state)); |
3380 __ SetAccumulator(old_state); | 3393 __ SetAccumulator(old_state); |
3381 | 3394 |
3382 __ Dispatch(); | 3395 __ Dispatch(); |
3383 } | 3396 } |
3384 | 3397 |
3385 } // namespace interpreter | 3398 } // namespace interpreter |
3386 } // namespace internal | 3399 } // namespace internal |
3387 } // namespace v8 | 3400 } // namespace v8 |
OLD | NEW |