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 117 matching lines...) Loading... |
128 bool LCodeGen::GeneratePrologue() { | 128 bool LCodeGen::GeneratePrologue() { |
129 ASSERT(is_generating()); | 129 ASSERT(is_generating()); |
130 | 130 |
131 #ifdef DEBUG | 131 #ifdef DEBUG |
132 if (strlen(FLAG_stop_at) > 0 && | 132 if (strlen(FLAG_stop_at) > 0 && |
133 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | 133 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
134 __ int3(); | 134 __ int3(); |
135 } | 135 } |
136 #endif | 136 #endif |
137 | 137 |
| 138 const FunctionEntryHook* hook_location = V8::GetFunctionEntryHookLocation(); |
| 139 if (*hook_location != NULL) { |
| 140 ProfileEntryHookStub stub; |
| 141 __ CallStub(&stub); |
| 142 } |
| 143 |
138 // Strict mode functions need to replace the receiver with undefined | 144 // Strict mode functions need to replace the receiver with undefined |
139 // when called as functions (without an explicit receiver | 145 // when called as functions (without an explicit receiver |
140 // object). rcx is zero for method calls and non-zero for function | 146 // object). rcx is zero for method calls and non-zero for function |
141 // calls. | 147 // calls. |
142 if (!info_->is_classic_mode() || info_->is_native()) { | 148 if (!info_->is_classic_mode() || info_->is_native()) { |
143 Label ok; | 149 Label ok; |
144 __ testq(rcx, rcx); | 150 __ testq(rcx, rcx); |
145 __ j(zero, &ok, Label::kNear); | 151 __ j(zero, &ok, Label::kNear); |
146 // +1 for return address. | 152 // +1 for return address. |
147 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; | 153 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; |
(...skipping 4897 matching lines...) Loading... |
5045 FixedArray::kHeaderSize - kPointerSize)); | 5051 FixedArray::kHeaderSize - kPointerSize)); |
5046 __ bind(&done); | 5052 __ bind(&done); |
5047 } | 5053 } |
5048 | 5054 |
5049 | 5055 |
5050 #undef __ | 5056 #undef __ |
5051 | 5057 |
5052 } } // namespace v8::internal | 5058 } } // namespace v8::internal |
5053 | 5059 |
5054 #endif // V8_TARGET_ARCH_X64 | 5060 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |