| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 #include "src/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
| 7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/osr.h" | |
| 10 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
| 11 #include "src/scopes.h" | 10 #include "src/scopes.h" |
| 12 | 11 |
| 13 namespace v8 { | 12 namespace v8 { |
| 14 namespace internal { | 13 namespace internal { |
| 15 namespace compiler { | 14 namespace compiler { |
| 16 | 15 |
| 17 #define __ masm()-> | 16 #define __ masm()-> |
| 18 | 17 |
| 19 | 18 |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 if (info()->is_osr()) { | 1078 if (info()->is_osr()) { |
| 1080 // TurboFan OSR-compiled functions cannot be entered directly. | 1079 // TurboFan OSR-compiled functions cannot be entered directly. |
| 1081 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1080 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
| 1082 | 1081 |
| 1083 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1082 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
| 1084 // frame is still on the stack. Optimized code uses OSR values directly from | 1083 // frame is still on the stack. Optimized code uses OSR values directly from |
| 1085 // the unoptimized frame. Thus, all that needs to be done is to allocate the | 1084 // the unoptimized frame. Thus, all that needs to be done is to allocate the |
| 1086 // remaining stack slots. | 1085 // remaining stack slots. |
| 1087 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); | 1086 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); |
| 1088 osr_pc_offset_ = __ pc_offset(); | 1087 osr_pc_offset_ = __ pc_offset(); |
| 1089 int unoptimized_slots = | 1088 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); |
| 1090 static_cast<int>(OsrHelper(info()).UnoptimizedFrameSlots()); | 1089 stack_slots -= frame()->GetOsrStackSlotCount(); |
| 1091 DCHECK(stack_slots >= unoptimized_slots); | |
| 1092 stack_slots -= unoptimized_slots; | |
| 1093 } | 1090 } |
| 1094 | 1091 |
| 1095 if (stack_slots > 0) { | 1092 if (stack_slots > 0) { |
| 1096 __ Dsubu(sp, sp, Operand(stack_slots * kPointerSize)); | 1093 __ Dsubu(sp, sp, Operand(stack_slots * kPointerSize)); |
| 1097 } | 1094 } |
| 1098 } | 1095 } |
| 1099 | 1096 |
| 1100 | 1097 |
| 1101 void CodeGenerator::AssembleReturn() { | 1098 void CodeGenerator::AssembleReturn() { |
| 1102 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1099 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 } | 1313 } |
| 1317 } | 1314 } |
| 1318 MarkLazyDeoptSite(); | 1315 MarkLazyDeoptSite(); |
| 1319 } | 1316 } |
| 1320 | 1317 |
| 1321 #undef __ | 1318 #undef __ |
| 1322 | 1319 |
| 1323 } // namespace compiler | 1320 } // namespace compiler |
| 1324 } // namespace internal | 1321 } // namespace internal |
| 1325 } // namespace v8 | 1322 } // namespace v8 |
| OLD | NEW |