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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 8563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8574 // If there currently can be no elements accessors on the prototype chain, | 8574 // If there currently can be no elements accessors on the prototype chain, |
8575 // it doesn't mean that there won't be any later. Install a full prototype | 8575 // it doesn't mean that there won't be any later. Install a full prototype |
8576 // chain check to trap element accessors being installed on the prototype | 8576 // chain check to trap element accessors being installed on the prototype |
8577 // chain, which would cause elements to go to dictionary mode and result | 8577 // chain, which would cause elements to go to dictionary mode and result |
8578 // in a map change. | 8578 // in a map change. |
8579 BuildCheckPrototypeMaps( | 8579 BuildCheckPrototypeMaps( |
8580 handle(JSObject::cast(receiver_map->prototype()), isolate()), | 8580 handle(JSObject::cast(receiver_map->prototype()), isolate()), |
8581 Handle<JSObject>::null(), true); | 8581 Handle<JSObject>::null(), true); |
8582 | 8582 |
8583 // Threshold for fast inlined Array.shift(). | 8583 // Threshold for fast inlined Array.shift(). |
8584 HConstant* inline_threshold = Add<HConstant>(static_cast<int32_t>(16)); | 8584 HConstant* inline_threshold = Add<HConstant>(JSArray::kMaxCopyElements); |
8585 | 8585 |
8586 Drop(args_count_no_receiver); | 8586 Drop(args_count_no_receiver); |
8587 HValue* result; | 8587 HValue* result; |
8588 HValue* receiver = Pop(); | 8588 HValue* receiver = Pop(); |
8589 HValue* checked_object = AddCheckMap(receiver, receiver_map); | 8589 HValue* checked_object = AddCheckMap(receiver, receiver_map); |
8590 HValue* length = Add<HLoadNamedField>( | 8590 HValue* length = Add<HLoadNamedField>( |
8591 receiver, checked_object, HObjectAccess::ForArrayLength(kind)); | 8591 receiver, checked_object, HObjectAccess::ForArrayLength(kind)); |
8592 | 8592 |
8593 Drop(1); // Function. | 8593 Drop(1); // Function. |
8594 { | 8594 { |
(...skipping 3926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12521 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12521 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12522 } | 12522 } |
12523 | 12523 |
12524 #ifdef DEBUG | 12524 #ifdef DEBUG |
12525 graph_->Verify(false); // No full verify. | 12525 graph_->Verify(false); // No full verify. |
12526 #endif | 12526 #endif |
12527 } | 12527 } |
12528 | 12528 |
12529 } // namespace internal | 12529 } // namespace internal |
12530 } // namespace v8 | 12530 } // namespace v8 |
OLD | NEW |