| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #if V8_TARGET_ARCH_X64 | 30 #if V8_TARGET_ARCH_X64 |
| 31 | 31 |
| 32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "codegen.h" | 33 #include "codegen.h" |
| 34 #include "cpu-profiler.h" | 34 #include "cpu-profiler.h" |
| 35 #include "assembler-x64.h" | 35 #include "assembler-x64.h" |
| 36 #include "macro-assembler-x64.h" | 36 #include "macro-assembler-x64.h" |
| 37 #include "serialize.h" | 37 #include "serialize.h" |
| 38 #include "debug.h" | 38 #include "debug.h" |
| 39 #include "heap.h" | 39 #include "heap.h" |
| 40 #include "isolate-inl.h" |
| 40 | 41 |
| 41 namespace v8 { | 42 namespace v8 { |
| 42 namespace internal { | 43 namespace internal { |
| 43 | 44 |
| 44 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) | 45 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) |
| 45 : Assembler(arg_isolate, buffer, size), | 46 : Assembler(arg_isolate, buffer, size), |
| 46 generating_stub_(false), | 47 generating_stub_(false), |
| 47 allow_stub_calls_(true), | 48 allow_stub_calls_(true), |
| 48 has_frame_(false), | 49 has_frame_(false), |
| 49 root_array_available_(true) { | 50 root_array_available_(true) { |
| (...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3652 | 3653 |
| 3653 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 3654 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { |
| 3654 if (frame_mode == BUILD_STUB_FRAME) { | 3655 if (frame_mode == BUILD_STUB_FRAME) { |
| 3655 push(rbp); // Caller's frame pointer. | 3656 push(rbp); // Caller's frame pointer. |
| 3656 movq(rbp, rsp); | 3657 movq(rbp, rsp); |
| 3657 push(rsi); // Callee's context. | 3658 push(rsi); // Callee's context. |
| 3658 Push(Smi::FromInt(StackFrame::STUB)); | 3659 Push(Smi::FromInt(StackFrame::STUB)); |
| 3659 } else { | 3660 } else { |
| 3660 PredictableCodeSizeScope predictible_code_size_scope(this, | 3661 PredictableCodeSizeScope predictible_code_size_scope(this, |
| 3661 kNoCodeAgeSequenceLength); | 3662 kNoCodeAgeSequenceLength); |
| 3662 if (FLAG_optimize_for_size && FLAG_age_code) { | 3663 if (isolate()->IsCodePreAgingActive()) { |
| 3663 // Pre-age the code. | 3664 // Pre-age the code. |
| 3664 Call(isolate()->builtins()->MarkCodeAsExecutedOnce(), | 3665 Call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
| 3665 RelocInfo::CODE_AGE_SEQUENCE); | 3666 RelocInfo::CODE_AGE_SEQUENCE); |
| 3666 Nop(kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength); | 3667 Nop(kNoCodeAgeSequenceLength - Assembler::kShortCallInstructionLength); |
| 3667 } else { | 3668 } else { |
| 3668 push(rbp); // Caller's frame pointer. | 3669 push(rbp); // Caller's frame pointer. |
| 3669 movq(rbp, rsp); | 3670 movq(rbp, rsp); |
| 3670 push(rsi); // Callee's context. | 3671 push(rsi); // Callee's context. |
| 3671 push(rdi); // Callee's JS function. | 3672 push(rdi); // Callee's JS function. |
| 3672 } | 3673 } |
| (...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4964 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); | 4965 movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); |
| 4965 CallCFunction( | 4966 CallCFunction( |
| 4966 ExternalReference::record_object_allocation_function(isolate), 3); | 4967 ExternalReference::record_object_allocation_function(isolate), 3); |
| 4967 PopSafepointRegisters(); | 4968 PopSafepointRegisters(); |
| 4968 } | 4969 } |
| 4969 | 4970 |
| 4970 | 4971 |
| 4971 } } // namespace v8::internal | 4972 } } // namespace v8::internal |
| 4972 | 4973 |
| 4973 #endif // V8_TARGET_ARCH_X64 | 4974 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |