| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/ic/ic.h" | 7 #include "src/ic/ic.h" |
| 8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 #include "src/type-feedback-vector-inl.h" | 10 #include "src/type-feedback-vector-inl.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 void CallICNexus::ConfigureMonomorphicArray() { | 336 void CallICNexus::ConfigureMonomorphicArray() { |
| 337 Object* feedback = GetFeedback(); | 337 Object* feedback = GetFeedback(); |
| 338 if (!feedback->IsAllocationSite()) { | 338 if (!feedback->IsAllocationSite()) { |
| 339 Handle<AllocationSite> new_site = | 339 Handle<AllocationSite> new_site = |
| 340 GetIsolate()->factory()->NewAllocationSite(); | 340 GetIsolate()->factory()->NewAllocationSite(); |
| 341 SetFeedback(*new_site); | 341 SetFeedback(*new_site); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 void CallICNexus::ConfigureMonomorphicMathFunction( |
| 347 Handle<JSFunction> function) { |
| 348 Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function); |
| 349 SetFeedback(*new_cell); |
| 350 SetFeedbackExtra(Smi::FromInt(0)); |
| 351 } |
| 352 |
| 353 |
| 346 void CallICNexus::ConfigureUninitialized() { | 354 void CallICNexus::ConfigureUninitialized() { |
| 347 SetFeedback(*vector()->UninitializedSentinel(GetIsolate()), | 355 SetFeedback(*vector()->UninitializedSentinel(GetIsolate()), |
| 348 SKIP_WRITE_BARRIER); | 356 SKIP_WRITE_BARRIER); |
| 349 } | 357 } |
| 350 | 358 |
| 351 | 359 |
| 352 void CallICNexus::ConfigureMonomorphic(Handle<JSFunction> function) { | 360 void CallICNexus::ConfigureMonomorphic(Handle<JSFunction> function) { |
| 353 Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function); | 361 Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function); |
| 354 SetFeedback(*new_cell); | 362 SetFeedback(*new_cell); |
| 355 } | 363 } |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 562 |
| 555 Name* KeyedLoadICNexus::FindFirstName() const { | 563 Name* KeyedLoadICNexus::FindFirstName() const { |
| 556 Object* feedback = GetFeedback(); | 564 Object* feedback = GetFeedback(); |
| 557 if (feedback->IsString()) { | 565 if (feedback->IsString()) { |
| 558 return Name::cast(feedback); | 566 return Name::cast(feedback); |
| 559 } | 567 } |
| 560 return NULL; | 568 return NULL; |
| 561 } | 569 } |
| 562 } | 570 } |
| 563 } // namespace v8::internal | 571 } // namespace v8::internal |
| OLD | NEW |