Chromium Code Reviews| 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 8316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8327 | 8327 |
| 8328 ast_context()->ReturnValue(new_size); | 8328 ast_context()->ReturnValue(new_size); |
| 8329 return true; | 8329 return true; |
| 8330 } | 8330 } |
| 8331 case kArrayShift: { | 8331 case kArrayShift: { |
| 8332 if (receiver_map.is_null()) return false; | 8332 if (receiver_map.is_null()) return false; |
| 8333 if (receiver_map->instance_type() != JS_ARRAY_TYPE) return false; | 8333 if (receiver_map->instance_type() != JS_ARRAY_TYPE) return false; |
| 8334 ElementsKind kind = receiver_map->elements_kind(); | 8334 ElementsKind kind = receiver_map->elements_kind(); |
| 8335 if (!IsFastElementsKind(kind)) return false; | 8335 if (!IsFastElementsKind(kind)) return false; |
| 8336 if (receiver_map->is_observed()) return false; | 8336 if (receiver_map->is_observed()) return false; |
| 8337 DCHECK(receiver_map->is_extensible()); | 8337 if (!receiver_map->is_extensible()) return false; |
|
Toon Verwaest
2014/08/20 13:39:43
Please also change kArrayPush etc if they are also
| |
| 8338 | 8338 |
| 8339 // If there may be elements accessors in the prototype chain, the fast | 8339 // If there may be elements accessors in the prototype chain, the fast |
| 8340 // inlined version can't be used. | 8340 // inlined version can't be used. |
| 8341 if (receiver_map->DictionaryElementsInPrototypeChainOnly()) return false; | 8341 if (receiver_map->DictionaryElementsInPrototypeChainOnly()) return false; |
| 8342 | 8342 |
| 8343 // If there currently can be no elements accessors on the prototype chain, | 8343 // If there currently can be no elements accessors on the prototype chain, |
| 8344 // it doesn't mean that there won't be any later. Install a full prototype | 8344 // it doesn't mean that there won't be any later. Install a full prototype |
| 8345 // chain check to trap element accessors being installed on the prototype | 8345 // chain check to trap element accessors being installed on the prototype |
| 8346 // chain, which would cause elements to go to dictionary mode and result | 8346 // chain, which would cause elements to go to dictionary mode and result |
| 8347 // in a map change. | 8347 // in a map change. |
| (...skipping 4138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12486 if (ShouldProduceTraceOutput()) { | 12486 if (ShouldProduceTraceOutput()) { |
| 12487 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12487 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12488 } | 12488 } |
| 12489 | 12489 |
| 12490 #ifdef DEBUG | 12490 #ifdef DEBUG |
| 12491 graph_->Verify(false); // No full verify. | 12491 graph_->Verify(false); // No full verify. |
| 12492 #endif | 12492 #endif |
| 12493 } | 12493 } |
| 12494 | 12494 |
| 12495 } } // namespace v8::internal | 12495 } } // namespace v8::internal |
| OLD | NEW |