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 if (collect_type_profile) { |
| 291 type_profile_slot_ = spec->AddTypeProfileSlot(); |
| 292 } |
288 } | 293 } |
289 | 294 |
290 void CountOperation::AssignFeedbackSlots(FeedbackVectorSpec* spec, | 295 void CountOperation::AssignFeedbackSlots(FeedbackVectorSpec* spec, |
291 LanguageMode language_mode, | 296 LanguageMode language_mode, |
292 FeedbackSlotCache* cache) { | 297 FeedbackSlotCache* cache) { |
293 AssignVectorSlots(expression(), spec, language_mode, &slot_); | 298 AssignVectorSlots(expression(), spec, language_mode, &slot_); |
294 // Assign a slot to collect feedback about binary operations. Used only in | 299 // Assign a slot to collect feedback about binary operations. Used only in |
295 // ignition. Fullcodegen uses AstId to record type feedback. | 300 // ignition. Fullcodegen uses AstId to record type feedback. |
296 binary_operation_slot_ = spec->AddInterpreterBinaryOpICSlot(); | 301 binary_operation_slot_ = spec->AddInterpreterBinaryOpICSlot(); |
297 } | 302 } |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 #ifdef DEBUG | 1116 #ifdef DEBUG |
1112 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_) | 1117 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_) |
1113 : function_->name; | 1118 : function_->name; |
1114 #else | 1119 #else |
1115 return is_jsruntime() ? "(context function)" : function_->name; | 1120 return is_jsruntime() ? "(context function)" : function_->name; |
1116 #endif // DEBUG | 1121 #endif // DEBUG |
1117 } | 1122 } |
1118 | 1123 |
1119 } // namespace internal | 1124 } // namespace internal |
1120 } // namespace v8 | 1125 } // namespace v8 |
OLD | NEW |