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

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

Issue 795573005: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: moar cleanup Created 6 years 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 Literal* key = property->key()->AsLiteral(); 2515 Literal* key = property->key()->AsLiteral();
2516 Expression* value = property->value(); 2516 Expression* value = property->value();
2517 DCHECK(key != NULL); 2517 DCHECK(key != NULL);
2518 2518
2519 if (property->is_static()) { 2519 if (property->is_static()) {
2520 __ LoadP(scratch, MemOperand(sp, kPointerSize)); // constructor 2520 __ LoadP(scratch, MemOperand(sp, kPointerSize)); // constructor
2521 } else { 2521 } else {
2522 __ LoadP(scratch, MemOperand(sp, 0)); // prototype 2522 __ LoadP(scratch, MemOperand(sp, 0)); // prototype
2523 } 2523 }
2524 __ push(scratch); 2524 __ push(scratch);
2525 VisitForStackValue(key); 2525 EmitPropertyKey(property);
2526 VisitForStackValue(value); 2526 VisitForStackValue(value);
2527 2527
2528 switch (property->kind()) { 2528 switch (property->kind()) {
2529 case ObjectLiteral::Property::CONSTANT: 2529 case ObjectLiteral::Property::CONSTANT:
2530 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2530 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2531 case ObjectLiteral::Property::COMPUTED: 2531 case ObjectLiteral::Property::COMPUTED:
2532 case ObjectLiteral::Property::PROTOTYPE: 2532 case ObjectLiteral::Property::PROTOTYPE:
2533 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2533 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2534 break; 2534 break;
2535 2535
2536 case ObjectLiteral::Property::GETTER: 2536 case ObjectLiteral::Property::GETTER:
2537 __ CallRuntime(Runtime::kDefineClassGetter, 3); 2537 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3);
2538 break; 2538 break;
2539 2539
2540 case ObjectLiteral::Property::SETTER: 2540 case ObjectLiteral::Property::SETTER:
2541 __ CallRuntime(Runtime::kDefineClassSetter, 3); 2541 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3);
2542 break; 2542 break;
2543 2543
2544 default: 2544 default:
2545 UNREACHABLE(); 2545 UNREACHABLE();
2546 } 2546 }
2547 } 2547 }
2548 2548
2549 // prototype 2549 // prototype
2550 __ CallRuntime(Runtime::kToFastProperties, 1); 2550 __ CallRuntime(Runtime::kToFastProperties, 1);
2551 2551
(...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
5281 return ON_STACK_REPLACEMENT; 5281 return ON_STACK_REPLACEMENT;
5282 } 5282 }
5283 5283
5284 DCHECK(interrupt_address == 5284 DCHECK(interrupt_address ==
5285 isolate->builtins()->OsrAfterStackCheck()->entry()); 5285 isolate->builtins()->OsrAfterStackCheck()->entry());
5286 return OSR_AFTER_STACK_CHECK; 5286 return OSR_AFTER_STACK_CHECK;
5287 } 5287 }
5288 } 5288 }
5289 } // namespace v8::internal 5289 } // namespace v8::internal
5290 #endif // V8_TARGET_ARCH_PPC 5290 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698