| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 Smi::FromInt(1)); | 636 Smi::FromInt(1)); |
| 637 | 637 |
| 638 // Check function data field is actually a BytecodeArray object. | 638 // Check function data field is actually a BytecodeArray object. |
| 639 if (FLAG_debug_code) { | 639 if (FLAG_debug_code) { |
| 640 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); | 640 __ AssertNotSmi(kInterpreterBytecodeArrayRegister); |
| 641 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, | 641 __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, |
| 642 rax); | 642 rax); |
| 643 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 643 __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 644 } | 644 } |
| 645 | 645 |
| 646 // Reset code age. |
| 647 __ movb(FieldOperand(kInterpreterBytecodeArrayRegister, |
| 648 BytecodeArray::kBytecodeAgeOffset), |
| 649 Immediate(BytecodeArray::kNoAgeBytecodeAge)); |
| 650 |
| 646 // Load initial bytecode offset. | 651 // Load initial bytecode offset. |
| 647 __ movp(kInterpreterBytecodeOffsetRegister, | 652 __ movp(kInterpreterBytecodeOffsetRegister, |
| 648 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 653 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 649 | 654 |
| 650 // Push bytecode array and Smi tagged bytecode offset. | 655 // Push bytecode array and Smi tagged bytecode offset. |
| 651 __ Push(kInterpreterBytecodeArrayRegister); | 656 __ Push(kInterpreterBytecodeArrayRegister); |
| 652 __ Integer32ToSmi(rcx, kInterpreterBytecodeOffsetRegister); | 657 __ Integer32ToSmi(rcx, kInterpreterBytecodeOffsetRegister); |
| 653 __ Push(rcx); | 658 __ Push(rcx); |
| 654 | 659 |
| 655 // Allocate the local and temporary register file on the stack. | 660 // Allocate the local and temporary register file on the stack. |
| (...skipping 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3050 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3055 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3051 Generate_OnStackReplacementHelper(masm, true); | 3056 Generate_OnStackReplacementHelper(masm, true); |
| 3052 } | 3057 } |
| 3053 | 3058 |
| 3054 #undef __ | 3059 #undef __ |
| 3055 | 3060 |
| 3056 } // namespace internal | 3061 } // namespace internal |
| 3057 } // namespace v8 | 3062 } // namespace v8 |
| 3058 | 3063 |
| 3059 #endif // V8_TARGET_ARCH_X64 | 3064 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |