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

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

Issue 2606833002: [ESnext] Implement Object spread (Closed)
Patch Set: fix test 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/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 DCHECK(!property->is_computed_name()); 1166 DCHECK(!property->is_computed_name());
1167 if (property->IsCompileTimeValue()) continue; 1167 if (property->IsCompileTimeValue()) continue;
1168 1168
1169 Literal* key = property->key()->AsLiteral(); 1169 Literal* key = property->key()->AsLiteral();
1170 Expression* value = property->value(); 1170 Expression* value = property->value();
1171 if (!result_saved) { 1171 if (!result_saved) {
1172 PushOperand(eax); // Save result on the stack 1172 PushOperand(eax); // Save result on the stack
1173 result_saved = true; 1173 result_saved = true;
1174 } 1174 }
1175 switch (property->kind()) { 1175 switch (property->kind()) {
1176 case ObjectLiteral::Property::SPREAD:
1176 case ObjectLiteral::Property::CONSTANT: 1177 case ObjectLiteral::Property::CONSTANT:
1177 UNREACHABLE(); 1178 UNREACHABLE();
1178 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1179 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1179 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); 1180 DCHECK(!CompileTimeValue::IsCompileTimeValue(value));
1180 // Fall through. 1181 // Fall through.
1181 case ObjectLiteral::Property::COMPUTED: 1182 case ObjectLiteral::Property::COMPUTED:
1182 // It is safe to use [[Put]] here because the boilerplate already 1183 // It is safe to use [[Put]] here because the boilerplate already
1183 // contains computed properties with an uninitialized value. 1184 // contains computed properties with an uninitialized value.
1184 if (key->IsStringLiteral()) { 1185 if (key->IsStringLiteral()) {
1185 DCHECK(key->IsPropertyName()); 1186 DCHECK(key->IsPropertyName());
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 isolate->builtins()->OnStackReplacement()->entry(), 2795 isolate->builtins()->OnStackReplacement()->entry(),
2795 Assembler::target_address_at(call_target_address, unoptimized_code)); 2796 Assembler::target_address_at(call_target_address, unoptimized_code));
2796 return ON_STACK_REPLACEMENT; 2797 return ON_STACK_REPLACEMENT;
2797 } 2798 }
2798 2799
2799 2800
2800 } // namespace internal 2801 } // namespace internal
2801 } // namespace v8 2802 } // namespace v8
2802 2803
2803 #endif // V8_TARGET_ARCH_IA32 2804 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698