OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/ast/ast.h" | 5 #include "src/ast/ast.h" |
6 | 6 |
7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
8 | 8 |
9 #include "src/ast/compile-time-value.h" | 9 #include "src/ast/compile-time-value.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 bit_field_ = copy_from->bit_field_; | 211 bit_field_ = copy_from->bit_field_; |
212 DCHECK(!copy_from->is_resolved()); | 212 DCHECK(!copy_from->is_resolved()); |
213 raw_name_ = copy_from->raw_name_; | 213 raw_name_ = copy_from->raw_name_; |
214 } | 214 } |
215 | 215 |
216 void VariableProxy::BindTo(Variable* var) { | 216 void VariableProxy::BindTo(Variable* var) { |
217 DCHECK((is_this() && var->is_this()) || raw_name() == var->raw_name()); | 217 DCHECK((is_this() && var->is_this()) || raw_name() == var->raw_name()); |
218 set_var(var); | 218 set_var(var); |
219 set_is_resolved(); | 219 set_is_resolved(); |
220 var->set_is_used(); | 220 var->set_is_used(); |
| 221 if (is_assigned()) var->set_maybe_assigned(); |
221 } | 222 } |
222 | 223 |
223 void VariableProxy::AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, | 224 void VariableProxy::AssignFeedbackVectorSlots(FeedbackVectorSpec* spec, |
224 FeedbackVectorSlotCache* cache) { | 225 FeedbackVectorSlotCache* cache) { |
225 if (UsesVariableFeedbackSlot()) { | 226 if (UsesVariableFeedbackSlot()) { |
226 // VariableProxies that point to the same Variable within a function can | 227 // VariableProxies that point to the same Variable within a function can |
227 // make their loads from the same IC slot. | 228 // make their loads from the same IC slot. |
228 if (var()->IsUnallocated() || var()->mode() == DYNAMIC_GLOBAL) { | 229 if (var()->IsUnallocated() || var()->mode() == DYNAMIC_GLOBAL) { |
229 ZoneHashMap::Entry* entry = cache->Get(var()); | 230 ZoneHashMap::Entry* entry = cache->Get(var()); |
230 if (entry != NULL) { | 231 if (entry != NULL) { |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 const char* CallRuntime::debug_name() { | 1092 const char* CallRuntime::debug_name() { |
1092 #ifdef DEBUG | 1093 #ifdef DEBUG |
1093 return NameForNativeContextIntrinsicIndex(context_index_); | 1094 return NameForNativeContextIntrinsicIndex(context_index_); |
1094 #else | 1095 #else |
1095 return is_jsruntime() ? "(context function)" : function_->name; | 1096 return is_jsruntime() ? "(context function)" : function_->name; |
1096 #endif // DEBUG | 1097 #endif // DEBUG |
1097 } | 1098 } |
1098 | 1099 |
1099 } // namespace internal | 1100 } // namespace internal |
1100 } // namespace v8 | 1101 } // namespace v8 |
OLD | NEW |