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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 SetFunctionPosition(function()); | 123 SetFunctionPosition(function()); |
124 Comment cmnt(masm_, "[ function compiled by full code generator"); | 124 Comment cmnt(masm_, "[ function compiled by full code generator"); |
125 | 125 |
126 #ifdef DEBUG | 126 #ifdef DEBUG |
127 if (strlen(FLAG_stop_at) > 0 && | 127 if (strlen(FLAG_stop_at) > 0 && |
128 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | 128 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
129 __ int3(); | 129 __ int3(); |
130 } | 130 } |
131 #endif | 131 #endif |
132 | 132 |
| 133 const FunctionEntryHook* hook_location = V8::GetFunctionEntryHookLocation(); |
| 134 if (*hook_location != NULL) { |
| 135 ProfileEntryHookStub stub; |
| 136 __ CallStub(&stub); |
| 137 } |
| 138 |
133 // Strict mode functions and builtins need to replace the receiver | 139 // Strict mode functions and builtins need to replace the receiver |
134 // with undefined when called as functions (without an explicit | 140 // with undefined when called as functions (without an explicit |
135 // receiver object). rcx is zero for method calls and non-zero for | 141 // receiver object). rcx is zero for method calls and non-zero for |
136 // function calls. | 142 // function calls. |
137 if (!info->is_classic_mode() || info->is_native()) { | 143 if (!info->is_classic_mode() || info->is_native()) { |
138 Label ok; | 144 Label ok; |
139 __ testq(rcx, rcx); | 145 __ testq(rcx, rcx); |
140 __ j(zero, &ok, Label::kNear); | 146 __ j(zero, &ok, Label::kNear); |
141 // +1 for return address. | 147 // +1 for return address. |
142 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; | 148 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |
(...skipping 4400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4543 *context_length = 0; | 4549 *context_length = 0; |
4544 return previous_; | 4550 return previous_; |
4545 } | 4551 } |
4546 | 4552 |
4547 | 4553 |
4548 #undef __ | 4554 #undef __ |
4549 | 4555 |
4550 } } // namespace v8::internal | 4556 } } // namespace v8::internal |
4551 | 4557 |
4552 #endif // V8_TARGET_ARCH_X64 | 4558 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |