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

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

Issue 1626423003: Support computed properties for ES2015 Function.name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Mostly working Created 4 years, 10 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/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 if (NeedsHomeObject(value)) { 1561 if (NeedsHomeObject(value)) {
1562 EmitSetHomeObject(value, 2, property->GetSlot()); 1562 EmitSetHomeObject(value, 2, property->GetSlot());
1563 } 1563 }
1564 1564
1565 switch (property->kind()) { 1565 switch (property->kind()) {
1566 case ObjectLiteral::Property::CONSTANT: 1566 case ObjectLiteral::Property::CONSTANT:
1567 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1567 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1568 case ObjectLiteral::Property::COMPUTED: 1568 case ObjectLiteral::Property::COMPUTED:
1569 if (property->emit_store()) { 1569 if (property->emit_store()) {
1570 __ push(Immediate(Smi::FromInt(NONE))); 1570 __ push(Immediate(Smi::FromInt(NONE)));
1571 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked); 1571 __ Push(Smi::FromInt(property->NeedsSetFunctionName()));
1572 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral);
1572 } else { 1573 } else {
1573 __ Drop(3); 1574 __ Drop(3);
1574 } 1575 }
1575 break; 1576 break;
1576 1577
1577 case ObjectLiteral::Property::PROTOTYPE: 1578 case ObjectLiteral::Property::PROTOTYPE:
1578 UNREACHABLE(); 1579 UNREACHABLE();
1579 break; 1580 break;
1580 1581
1581 case ObjectLiteral::Property::GETTER: 1582 case ObjectLiteral::Property::GETTER:
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 if (NeedsHomeObject(value)) { 2287 if (NeedsHomeObject(value)) {
2287 EmitSetHomeObject(value, 2, property->GetSlot()); 2288 EmitSetHomeObject(value, 2, property->GetSlot());
2288 } 2289 }
2289 2290
2290 switch (property->kind()) { 2291 switch (property->kind()) {
2291 case ObjectLiteral::Property::CONSTANT: 2292 case ObjectLiteral::Property::CONSTANT:
2292 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2293 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2293 case ObjectLiteral::Property::PROTOTYPE: 2294 case ObjectLiteral::Property::PROTOTYPE:
2294 UNREACHABLE(); 2295 UNREACHABLE();
2295 case ObjectLiteral::Property::COMPUTED: 2296 case ObjectLiteral::Property::COMPUTED:
2296 __ CallRuntime(Runtime::kDefineClassMethod); 2297 __ push(Immediate(Smi::FromInt(DONT_ENUM)));
2298 __ Push(Smi::FromInt(property->NeedsSetFunctionName()));
2299 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral);
2297 break; 2300 break;
2298 2301
2299 case ObjectLiteral::Property::GETTER: 2302 case ObjectLiteral::Property::GETTER:
2300 __ push(Immediate(Smi::FromInt(DONT_ENUM))); 2303 __ push(Immediate(Smi::FromInt(DONT_ENUM)));
2301 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked); 2304 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked);
2302 break; 2305 break;
2303 2306
2304 case ObjectLiteral::Property::SETTER: 2307 case ObjectLiteral::Property::SETTER:
2305 __ push(Immediate(Smi::FromInt(DONT_ENUM))); 2308 __ push(Immediate(Smi::FromInt(DONT_ENUM)));
2306 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked); 2309 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked);
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
4710 Assembler::target_address_at(call_target_address, 4713 Assembler::target_address_at(call_target_address,
4711 unoptimized_code)); 4714 unoptimized_code));
4712 return OSR_AFTER_STACK_CHECK; 4715 return OSR_AFTER_STACK_CHECK;
4713 } 4716 }
4714 4717
4715 4718
4716 } // namespace internal 4719 } // namespace internal
4717 } // namespace v8 4720 } // namespace v8
4718 4721
4719 #endif // V8_TARGET_ARCH_IA32 4722 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698