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 uintptr_t entry_hook = V8::GetFunctionEntryHook(); |
| 134 if (entry_hook != 0) { |
| 135 __ call(reinterpret_cast<byte*>(entry_hook), RelocInfo::RUNTIME_ENTRY); |
| 136 } |
| 137 |
133 // Strict mode functions and builtins need to replace the receiver | 138 // Strict mode functions and builtins need to replace the receiver |
134 // with undefined when called as functions (without an explicit | 139 // with undefined when called as functions (without an explicit |
135 // receiver object). ecx is zero for method calls and non-zero for | 140 // receiver object). ecx is zero for method calls and non-zero for |
136 // function calls. | 141 // function calls. |
137 if (!info->is_classic_mode() || info->is_native()) { | 142 if (!info->is_classic_mode() || info->is_native()) { |
138 Label ok; | 143 Label ok; |
139 __ test(ecx, ecx); | 144 __ test(ecx, ecx); |
140 __ j(zero, &ok, Label::kNear); | 145 __ j(zero, &ok, Label::kNear); |
141 // +1 for return address. | 146 // +1 for return address. |
142 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; | 147 int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; |
(...skipping 4406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4549 *context_length = 0; | 4554 *context_length = 0; |
4550 return previous_; | 4555 return previous_; |
4551 } | 4556 } |
4552 | 4557 |
4553 | 4558 |
4554 #undef __ | 4559 #undef __ |
4555 | 4560 |
4556 } } // namespace v8::internal | 4561 } } // namespace v8::internal |
4557 | 4562 |
4558 #endif // V8_TARGET_ARCH_IA32 | 4563 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |