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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); | 1007 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); |
1008 | 1008 |
1009 Node* feedback_vector = __ LoadFeedbackVector(); | 1009 Node* feedback_vector = __ LoadFeedbackVector(); |
1010 Node* context = __ GetContext(); | 1010 Node* context = __ GetContext(); |
1011 | 1011 |
1012 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, | 1012 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, |
1013 value, flags, feedback_vector, vector_index); | 1013 value, flags, feedback_vector, vector_index); |
1014 __ Dispatch(); | 1014 __ Dispatch(); |
1015 } | 1015 } |
1016 | 1016 |
| 1017 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { |
| 1018 Node* name = __ LoadRegister(__ BytecodeOperandReg(0)); |
| 1019 Node* value = __ GetAccumulator(); |
| 1020 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(1)); |
| 1021 |
| 1022 Node* feedback_vector = __ LoadFeedbackVector(); |
| 1023 Node* context = __ GetContext(); |
| 1024 |
| 1025 __ CallRuntime(Runtime::kCollectTypeProfile, context, name, value, |
| 1026 feedback_vector, vector_index); |
| 1027 __ Dispatch(); |
| 1028 } |
| 1029 |
1017 // LdaModuleVariable <cell_index> <depth> | 1030 // LdaModuleVariable <cell_index> <depth> |
1018 // | 1031 // |
1019 // Load the contents of a module variable into the accumulator. The variable is | 1032 // Load the contents of a module variable into the accumulator. The variable is |
1020 // identified by <cell_index>. <depth> is the depth of the current context | 1033 // identified by <cell_index>. <depth> is the depth of the current context |
1021 // relative to the module context. | 1034 // relative to the module context. |
1022 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { | 1035 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { |
1023 Node* cell_index = __ BytecodeOperandImmIntPtr(0); | 1036 Node* cell_index = __ BytecodeOperandImmIntPtr(0); |
1024 Node* depth = __ BytecodeOperandUImm(1); | 1037 Node* depth = __ BytecodeOperandUImm(1); |
1025 | 1038 |
1026 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); | 1039 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); |
(...skipping 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3398 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 3411 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
3399 __ SmiTag(new_state)); | 3412 __ SmiTag(new_state)); |
3400 __ SetAccumulator(old_state); | 3413 __ SetAccumulator(old_state); |
3401 | 3414 |
3402 __ Dispatch(); | 3415 __ Dispatch(); |
3403 } | 3416 } |
3404 | 3417 |
3405 } // namespace interpreter | 3418 } // namespace interpreter |
3406 } // namespace internal | 3419 } // namespace internal |
3407 } // namespace v8 | 3420 } // namespace v8 |
OLD | NEW |