| 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-assembler.h" | 5 #include "src/interpreter/interpreter-assembler.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, | 387 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, |
| 388 Node* value) { | 388 Node* value) { |
| 389 Node* offset = | 389 Node* offset = |
| 390 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), | 390 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), |
| 391 IntPtrConstant(Context::kHeaderSize - kHeapObjectTag)); | 391 IntPtrConstant(Context::kHeaderSize - kHeapObjectTag)); |
| 392 return Store(MachineRepresentation::kTagged, context, offset, value); | 392 return Store(MachineRepresentation::kTagged, context, offset, value); |
| 393 } | 393 } |
| 394 | 394 |
| 395 Node* InterpreterAssembler::LoadTypeFeedbackVector() { | 395 Node* InterpreterAssembler::LoadTypeFeedbackVector() { |
| 396 Node* function = LoadRegister(Register::function_closure()); | 396 Node* function = LoadRegister(Register::function_closure()); |
| 397 Node* shared_info = | 397 Node* literals = LoadObjectField(function, JSFunction::kLiteralsOffset); |
| 398 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); | |
| 399 Node* vector = | 398 Node* vector = |
| 400 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); | 399 LoadObjectField(literals, LiteralsArray::kFeedbackVectorOffset); |
| 401 return vector; | 400 return vector; |
| 402 } | 401 } |
| 403 | 402 |
| 404 void InterpreterAssembler::CallPrologue() { | 403 void InterpreterAssembler::CallPrologue() { |
| 405 StoreRegister(SmiTag(BytecodeOffset()), Register::bytecode_offset()); | 404 StoreRegister(SmiTag(BytecodeOffset()), Register::bytecode_offset()); |
| 406 | 405 |
| 407 if (FLAG_debug_code && !disable_stack_check_across_call_) { | 406 if (FLAG_debug_code && !disable_stack_check_across_call_) { |
| 408 DCHECK(stack_pointer_before_call_ == nullptr); | 407 DCHECK(stack_pointer_before_call_ == nullptr); |
| 409 stack_pointer_before_call_ = LoadStackPointer(); | 408 stack_pointer_before_call_ = LoadStackPointer(); |
| 410 } | 409 } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 Goto(&loop); | 761 Goto(&loop); |
| 763 } | 762 } |
| 764 Bind(&done_loop); | 763 Bind(&done_loop); |
| 765 | 764 |
| 766 return array; | 765 return array; |
| 767 } | 766 } |
| 768 | 767 |
| 769 } // namespace interpreter | 768 } // namespace interpreter |
| 770 } // namespace internal | 769 } // namespace internal |
| 771 } // namespace v8 | 770 } // namespace v8 |
| OLD | NEW |