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