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 11334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11345 (!to_string_tag.IsFound() || to_string_tag.IsData() || | 11345 (!to_string_tag.IsFound() || to_string_tag.IsData() || |
11346 to_string_tag.IsDataConstant()) && | 11346 to_string_tag.IsDataConstant()) && |
11347 value_of.CanAccessMonomorphic() && value_of.IsDataConstant() && | 11347 value_of.CanAccessMonomorphic() && value_of.IsDataConstant() && |
11348 value_of.constant().is_identical_to(isolate()->object_value_of()) && | 11348 value_of.constant().is_identical_to(isolate()->object_value_of()) && |
11349 to_string.CanAccessMonomorphic() && to_string.IsDataConstant() && | 11349 to_string.CanAccessMonomorphic() && to_string.IsDataConstant() && |
11350 to_string.constant().is_identical_to( | 11350 to_string.constant().is_identical_to( |
11351 isolate()->object_to_string())) { | 11351 isolate()->object_to_string())) { |
11352 // We depend on the prototype chain to stay the same, because we | 11352 // We depend on the prototype chain to stay the same, because we |
11353 // also need to deoptimize when someone installs @@toPrimitive | 11353 // also need to deoptimize when someone installs @@toPrimitive |
11354 // or @@toStringTag somewhere in the prototype chain. | 11354 // or @@toStringTag somewhere in the prototype chain. |
11355 BuildCheckPrototypeMaps(handle(JSObject::cast(map->prototype())), | 11355 Handle<Object> prototype(map->prototype(), isolate()); |
11356 Handle<JSObject>::null()); | 11356 if (prototype->IsJSObject()) { |
| 11357 BuildCheckPrototypeMaps(Handle<JSObject>::cast(prototype), |
| 11358 Handle<JSObject>::null()); |
| 11359 } |
11357 AddCheckMap(left, map); | 11360 AddCheckMap(left, map); |
11358 AddCheckMap(right, map); | 11361 AddCheckMap(right, map); |
11359 // The caller expects a branch instruction, so make it happy. | 11362 // The caller expects a branch instruction, so make it happy. |
11360 return New<HBranch>( | 11363 return New<HBranch>( |
11361 graph()->GetConstantBool(op == Token::LTE || op == Token::GTE)); | 11364 graph()->GetConstantBool(op == Token::LTE || op == Token::GTE)); |
11362 } | 11365 } |
11363 } | 11366 } |
11364 Bailout(kUnsupportedNonPrimitiveCompare); | 11367 Bailout(kUnsupportedNonPrimitiveCompare); |
11365 return NULL; | 11368 return NULL; |
11366 } | 11369 } |
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13009 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13012 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13010 } | 13013 } |
13011 | 13014 |
13012 #ifdef DEBUG | 13015 #ifdef DEBUG |
13013 graph_->Verify(false); // No full verify. | 13016 graph_->Verify(false); // No full verify. |
13014 #endif | 13017 #endif |
13015 } | 13018 } |
13016 | 13019 |
13017 } // namespace internal | 13020 } // namespace internal |
13018 } // namespace v8 | 13021 } // namespace v8 |
OLD | NEW |