Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.cc

Issue 2606833002: [ESnext] Implement Object spread (Closed)
Patch Set: fix build Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 DCHECK(!property->is_computed_name()); 1162 DCHECK(!property->is_computed_name());
1163 if (property->IsCompileTimeValue()) continue; 1163 if (property->IsCompileTimeValue()) continue;
1164 1164
1165 Literal* key = property->key()->AsLiteral(); 1165 Literal* key = property->key()->AsLiteral();
1166 Expression* value = property->value(); 1166 Expression* value = property->value();
1167 if (!result_saved) { 1167 if (!result_saved) {
1168 PushOperand(eax); // Save result on the stack 1168 PushOperand(eax); // Save result on the stack
1169 result_saved = true; 1169 result_saved = true;
1170 } 1170 }
1171 switch (property->kind()) { 1171 switch (property->kind()) {
1172 case ObjectLiteral::Property::SPREAD:
1172 case ObjectLiteral::Property::CONSTANT: 1173 case ObjectLiteral::Property::CONSTANT:
1173 UNREACHABLE(); 1174 UNREACHABLE();
1174 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1175 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1175 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); 1176 DCHECK(!CompileTimeValue::IsCompileTimeValue(value));
1176 // Fall through. 1177 // Fall through.
1177 case ObjectLiteral::Property::COMPUTED: 1178 case ObjectLiteral::Property::COMPUTED:
1178 // It is safe to use [[Put]] here because the boilerplate already 1179 // It is safe to use [[Put]] here because the boilerplate already
1179 // contains computed properties with an uninitialized value. 1180 // contains computed properties with an uninitialized value.
1180 if (key->IsStringLiteral()) { 1181 if (key->IsStringLiteral()) {
1181 DCHECK(key->IsPropertyName()); 1182 DCHECK(key->IsPropertyName());
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
2789 isolate->builtins()->OnStackReplacement()->entry(), 2790 isolate->builtins()->OnStackReplacement()->entry(),
2790 Assembler::target_address_at(call_target_address, unoptimized_code)); 2791 Assembler::target_address_at(call_target_address, unoptimized_code));
2791 return ON_STACK_REPLACEMENT; 2792 return ON_STACK_REPLACEMENT;
2792 } 2793 }
2793 2794
2794 2795
2795 } // namespace internal 2796 } // namespace internal
2796 } // namespace v8 2797 } // namespace v8
2797 2798
2798 #endif // V8_TARGET_ARCH_IA32 2799 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698