| 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 __ cmpl(index, Immediate(1)); | 1117 __ cmpl(index, Immediate(1)); |
| 1118 __ j(greater, &loop_top); | 1118 __ j(greater, &loop_top); |
| 1119 | 1119 |
| 1120 // We found neither literals nor code. | 1120 // We found neither literals nor code. |
| 1121 __ jmp(&gotta_call_runtime); | 1121 __ jmp(&gotta_call_runtime); |
| 1122 | 1122 |
| 1123 __ bind(&try_shared); | 1123 __ bind(&try_shared); |
| 1124 __ movp(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1124 __ movp(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1125 // Is the shared function marked for optimization? | 1125 // Is the shared function marked for optimization? |
| 1126 __ testb( | 1126 __ testb( |
| 1127 FieldOperand(entry, | 1127 FieldOperand(entry, SharedFunctionInfo::kWasMarkedForTierUpByteOffset), |
| 1128 SharedFunctionInfo::kWasMarkedForOptimizationByteOffset), | 1128 Immediate(1 << SharedFunctionInfo::kWasMarkedForTierUpBitWithinByte)); |
| 1129 Immediate( | |
| 1130 1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte)); | |
| 1131 __ j(not_zero, &gotta_call_runtime); | 1129 __ j(not_zero, &gotta_call_runtime); |
| 1132 // Is the full code valid? | 1130 // Is the full code valid? |
| 1133 __ movp(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1131 __ movp(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); |
| 1134 __ movl(rbx, FieldOperand(entry, Code::kFlagsOffset)); | 1132 __ movl(rbx, FieldOperand(entry, Code::kFlagsOffset)); |
| 1135 __ andl(rbx, Immediate(Code::KindField::kMask)); | 1133 __ andl(rbx, Immediate(Code::KindField::kMask)); |
| 1136 __ shrl(rbx, Immediate(Code::KindField::kShift)); | 1134 __ shrl(rbx, Immediate(Code::KindField::kShift)); |
| 1137 __ cmpl(rbx, Immediate(Code::BUILTIN)); | 1135 __ cmpl(rbx, Immediate(Code::BUILTIN)); |
| 1138 __ j(equal, &gotta_call_runtime); | 1136 __ j(equal, &gotta_call_runtime); |
| 1139 // Yes, install the full code. | 1137 // Yes, install the full code. |
| 1140 __ leap(entry, FieldOperand(entry, Code::kHeaderSize)); | 1138 __ leap(entry, FieldOperand(entry, Code::kHeaderSize)); |
| (...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3080 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3078 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3081 Generate_OnStackReplacementHelper(masm, true); | 3079 Generate_OnStackReplacementHelper(masm, true); |
| 3082 } | 3080 } |
| 3083 | 3081 |
| 3084 #undef __ | 3082 #undef __ |
| 3085 | 3083 |
| 3086 } // namespace internal | 3084 } // namespace internal |
| 3087 } // namespace v8 | 3085 } // namespace v8 |
| 3088 | 3086 |
| 3089 #endif // V8_TARGET_ARCH_X64 | 3087 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |