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 5914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5925 Literal* key = property->key()->AsLiteral(); | 5925 Literal* key = property->key()->AsLiteral(); |
5926 Expression* value = property->value(); | 5926 Expression* value = property->value(); |
5927 | 5927 |
5928 switch (property->kind()) { | 5928 switch (property->kind()) { |
5929 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 5929 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
5930 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); | 5930 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); |
5931 // Fall through. | 5931 // Fall through. |
5932 case ObjectLiteral::Property::COMPUTED: | 5932 case ObjectLiteral::Property::COMPUTED: |
5933 // It is safe to use [[Put]] here because the boilerplate already | 5933 // It is safe to use [[Put]] here because the boilerplate already |
5934 // contains computed properties with an uninitialized value. | 5934 // contains computed properties with an uninitialized value. |
5935 if (key->IsPropertyName()) { | 5935 if (key->IsStringLiteral()) { |
| 5936 DCHECK(key->IsPropertyName()); |
5936 if (property->emit_store()) { | 5937 if (property->emit_store()) { |
5937 CHECK_ALIVE(VisitForValue(value)); | 5938 CHECK_ALIVE(VisitForValue(value)); |
5938 HValue* value = Pop(); | 5939 HValue* value = Pop(); |
5939 | 5940 |
5940 Handle<Map> map = property->GetReceiverType(); | 5941 Handle<Map> map = property->GetReceiverType(); |
5941 Handle<String> name = key->AsPropertyName(); | 5942 Handle<String> name = key->AsPropertyName(); |
5942 HValue* store; | 5943 HValue* store; |
5943 FeedbackVectorSlot slot = property->GetSlot(); | 5944 FeedbackVectorSlot slot = property->GetSlot(); |
5944 if (map.is_null()) { | 5945 if (map.is_null()) { |
5945 // If we don't know the monomorphic type, do a generic store. | 5946 // If we don't know the monomorphic type, do a generic store. |
(...skipping 7487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13433 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13434 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13434 } | 13435 } |
13435 | 13436 |
13436 #ifdef DEBUG | 13437 #ifdef DEBUG |
13437 graph_->Verify(false); // No full verify. | 13438 graph_->Verify(false); // No full verify. |
13438 #endif | 13439 #endif |
13439 } | 13440 } |
13440 | 13441 |
13441 } // namespace internal | 13442 } // namespace internal |
13442 } // namespace v8 | 13443 } // namespace v8 |
OLD | NEW |