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 <array> | 7 #include <array> |
8 #include <fstream> | 8 #include <fstream> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); | 1038 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); |
1039 | 1039 |
1040 Node* feedback_vector = __ LoadFeedbackVector(); | 1040 Node* feedback_vector = __ LoadFeedbackVector(); |
1041 Node* context = __ GetContext(); | 1041 Node* context = __ GetContext(); |
1042 | 1042 |
1043 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, | 1043 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, |
1044 value, flags, feedback_vector, vector_index); | 1044 value, flags, feedback_vector, vector_index); |
1045 __ Dispatch(); | 1045 __ Dispatch(); |
1046 } | 1046 } |
1047 | 1047 |
1048 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { | |
1049 Node* name = __ LoadRegister(__ BytecodeOperandReg(0)); | |
1050 Node* value = __ GetAccumulator(); | |
1051 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(1)); | |
1052 | |
1053 Node* feedback_vector = __ LoadFeedbackVector(); | |
1054 Node* context = __ GetContext(); | |
1055 | |
1056 __ CallRuntime(Runtime::kCollectTypeProfile, context, name, value, | |
1057 feedback_vector, vector_index); | |
1058 __ Dispatch(); | |
1059 } | |
1060 | |
1061 // LdaModuleVariable <cell_index> <depth> | 1048 // LdaModuleVariable <cell_index> <depth> |
1062 // | 1049 // |
1063 // Load the contents of a module variable into the accumulator. The variable is | 1050 // Load the contents of a module variable into the accumulator. The variable is |
1064 // identified by <cell_index>. <depth> is the depth of the current context | 1051 // identified by <cell_index>. <depth> is the depth of the current context |
1065 // relative to the module context. | 1052 // relative to the module context. |
1066 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { | 1053 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { |
1067 Node* cell_index = __ BytecodeOperandImmIntPtr(0); | 1054 Node* cell_index = __ BytecodeOperandImmIntPtr(0); |
1068 Node* depth = __ BytecodeOperandUImm(1); | 1055 Node* depth = __ BytecodeOperandUImm(1); |
1069 | 1056 |
1070 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); | 1057 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); |
(...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 3477 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
3491 __ SmiTag(new_state)); | 3478 __ SmiTag(new_state)); |
3492 __ SetAccumulator(old_state); | 3479 __ SetAccumulator(old_state); |
3493 | 3480 |
3494 __ Dispatch(); | 3481 __ Dispatch(); |
3495 } | 3482 } |
3496 | 3483 |
3497 } // namespace interpreter | 3484 } // namespace interpreter |
3498 } // namespace internal | 3485 } // namespace internal |
3499 } // namespace v8 | 3486 } // namespace v8 |
OLD | NEW |