| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 GenerateDeferredCode() && | 60 GenerateDeferredCode() && |
| 61 GenerateJumpTable() && | 61 GenerateJumpTable() && |
| 62 GenerateSafepointTable(); | 62 GenerateSafepointTable(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 | 65 |
| 66 void LCodeGen::FinishCode(Handle<Code> code) { | 66 void LCodeGen::FinishCode(Handle<Code> code) { |
| 67 DCHECK(is_done()); | 67 DCHECK(is_done()); |
| 68 code->set_stack_slots(GetStackSlotCount()); | 68 code->set_stack_slots(GetStackSlotCount()); |
| 69 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 69 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
| 70 if (code->is_optimized_code()) RegisterWeakObjectsInOptimizedCode(code); | |
| 71 PopulateDeoptimizationData(code); | 70 PopulateDeoptimizationData(code); |
| 72 } | 71 } |
| 73 | 72 |
| 74 | 73 |
| 75 #ifdef _MSC_VER | 74 #ifdef _MSC_VER |
| 76 void LCodeGen::MakeSureStackPagesMapped(int offset) { | 75 void LCodeGen::MakeSureStackPagesMapped(int offset) { |
| 77 const int kPageSize = 4 * KB; | 76 const int kPageSize = 4 * KB; |
| 78 for (offset -= kPageSize; offset > 0; offset -= kPageSize) { | 77 for (offset -= kPageSize; offset > 0; offset -= kPageSize) { |
| 79 __ movp(Operand(rsp, offset), rax); | 78 __ movp(Operand(rsp, offset), rax); |
| 80 } | 79 } |
| (...skipping 5827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5908 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5907 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5909 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5908 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5910 } | 5909 } |
| 5911 | 5910 |
| 5912 | 5911 |
| 5913 #undef __ | 5912 #undef __ |
| 5914 | 5913 |
| 5915 } } // namespace v8::internal | 5914 } } // namespace v8::internal |
| 5916 | 5915 |
| 5917 #endif // V8_TARGET_ARCH_X64 | 5916 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |