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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 target_(target), | 276 target_(target), |
277 value_(value), | 277 value_(value), |
278 binary_operation_(NULL) { | 278 binary_operation_(NULL) { |
279 bit_field_ |= IsUninitializedField::encode(false) | | 279 bit_field_ |= IsUninitializedField::encode(false) | |
280 KeyTypeField::encode(ELEMENT) | | 280 KeyTypeField::encode(ELEMENT) | |
281 StoreModeField::encode(STANDARD_STORE) | TokenField::encode(op); | 281 StoreModeField::encode(STANDARD_STORE) | TokenField::encode(op); |
282 } | 282 } |
283 | 283 |
284 void Assignment::AssignFeedbackSlots(FeedbackVectorSpec* spec, | 284 void Assignment::AssignFeedbackSlots(FeedbackVectorSpec* spec, |
285 LanguageMode language_mode, | 285 LanguageMode language_mode, |
286 FeedbackSlotCache* cache) { | 286 FeedbackSlotCache* cache, |
| 287 bool collect_type_profile) { |
287 AssignVectorSlots(target(), spec, language_mode, &slot_); | 288 AssignVectorSlots(target(), spec, language_mode, &slot_); |
| 289 |
| 290 bit_field_ = |
| 291 CollectTypeProfileSlotField::update(bit_field_, collect_type_profile); |
| 292 if (HasCollectTypeProfileSlot()) { |
| 293 collect_type_profile_slot_ = spec->AddTypeProfileSlot(); |
| 294 } |
288 } | 295 } |
289 | 296 |
290 void CountOperation::AssignFeedbackSlots(FeedbackVectorSpec* spec, | 297 void CountOperation::AssignFeedbackSlots(FeedbackVectorSpec* spec, |
291 LanguageMode language_mode, | 298 LanguageMode language_mode, |
292 FeedbackSlotCache* cache) { | 299 FeedbackSlotCache* cache) { |
293 AssignVectorSlots(expression(), spec, language_mode, &slot_); | 300 AssignVectorSlots(expression(), spec, language_mode, &slot_); |
294 // Assign a slot to collect feedback about binary operations. Used only in | 301 // Assign a slot to collect feedback about binary operations. Used only in |
295 // ignition. Fullcodegen uses AstId to record type feedback. | 302 // ignition. Fullcodegen uses AstId to record type feedback. |
296 binary_operation_slot_ = spec->AddInterpreterBinaryOpICSlot(); | 303 binary_operation_slot_ = spec->AddInterpreterBinaryOpICSlot(); |
297 } | 304 } |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 #ifdef DEBUG | 1121 #ifdef DEBUG |
1115 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_) | 1122 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_) |
1116 : function_->name; | 1123 : function_->name; |
1117 #else | 1124 #else |
1118 return is_jsruntime() ? "(context function)" : function_->name; | 1125 return is_jsruntime() ? "(context function)" : function_->name; |
1119 #endif // DEBUG | 1126 #endif // DEBUG |
1120 } | 1127 } |
1121 | 1128 |
1122 } // namespace internal | 1129 } // namespace internal |
1123 } // namespace v8 | 1130 } // namespace v8 |
OLD | NEW |