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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 #ifdef DEBUG | 123 #ifdef DEBUG |
124 if (strlen(FLAG_stop_at) > 0 && | 124 if (strlen(FLAG_stop_at) > 0 && |
125 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 125 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
126 __ int3(); | 126 __ int3(); |
127 } | 127 } |
128 #endif | 128 #endif |
129 | 129 |
130 // Sloppy mode functions need to replace the receiver with the global proxy | 130 // Sloppy mode functions need to replace the receiver with the global proxy |
131 // when called as functions (without an explicit receiver object). | 131 // when called as functions (without an explicit receiver object). |
132 if (graph()->this_has_uses() && is_sloppy(info_->language_mode()) && | 132 if (is_sloppy(info_->language_mode()) && info()->MayUseThis() && |
133 !info_->is_native()) { | 133 !info_->is_native()) { |
134 Label ok; | 134 Label ok; |
135 StackArgumentsAccessor args(rsp, scope()->num_parameters()); | 135 StackArgumentsAccessor args(rsp, scope()->num_parameters()); |
136 __ movp(rcx, args.GetReceiverOperand()); | 136 __ movp(rcx, args.GetReceiverOperand()); |
137 | 137 |
138 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); | 138 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); |
139 __ j(not_equal, &ok, Label::kNear); | 139 __ j(not_equal, &ok, Label::kNear); |
140 | 140 |
141 __ movp(rcx, GlobalObjectOperand()); | 141 __ movp(rcx, GlobalObjectOperand()); |
142 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); | 142 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalProxyOffset)); |
(...skipping 5802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5945 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5945 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5946 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5946 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5947 } | 5947 } |
5948 | 5948 |
5949 | 5949 |
5950 #undef __ | 5950 #undef __ |
5951 | 5951 |
5952 } } // namespace v8::internal | 5952 } } // namespace v8::internal |
5953 | 5953 |
5954 #endif // V8_TARGET_ARCH_X64 | 5954 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |