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

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

Issue 691503002: MIPS: Classes: Add super support in methods and accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 Expression* value = property->value(); 2497 Expression* value = property->value();
2498 DCHECK(key != NULL); 2498 DCHECK(key != NULL);
2499 2499
2500 if (property->is_static()) { 2500 if (property->is_static()) {
2501 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor 2501 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor
2502 } else { 2502 } else {
2503 __ ld(scratch, MemOperand(sp, 0)); // prototype 2503 __ ld(scratch, MemOperand(sp, 0)); // prototype
2504 } 2504 }
2505 __ push(scratch); 2505 __ push(scratch);
2506 VisitForStackValue(key); 2506 VisitForStackValue(key);
2507 VisitForStackValue(value);
2507 2508
2508 switch (property->kind()) { 2509 switch (property->kind()) {
2509 case ObjectLiteral::Property::CONSTANT: 2510 case ObjectLiteral::Property::CONSTANT:
2510 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2511 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2511 case ObjectLiteral::Property::COMPUTED: 2512 case ObjectLiteral::Property::COMPUTED:
2512 case ObjectLiteral::Property::PROTOTYPE: 2513 case ObjectLiteral::Property::PROTOTYPE:
2513 VisitForStackValue(value); 2514 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2514 __ li(scratch, Operand(Smi::FromInt(NONE)));
2515 __ push(scratch);
2516 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
2517 break; 2515 break;
2518 2516
2519 case ObjectLiteral::Property::GETTER: 2517 case ObjectLiteral::Property::GETTER:
2520 VisitForStackValue(value); 2518 __ CallRuntime(Runtime::kDefineClassGetter, 3);
2521 __ LoadRoot(scratch, Heap::kNullValueRootIndex);
2522 __ push(scratch);
2523 __ li(scratch, Operand(Smi::FromInt(NONE)));
2524 __ push(scratch);
2525 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
2526 break; 2519 break;
2527 2520
2528 case ObjectLiteral::Property::SETTER: 2521 case ObjectLiteral::Property::SETTER:
2529 __ LoadRoot(scratch, Heap::kNullValueRootIndex); 2522 __ CallRuntime(Runtime::kDefineClassSetter, 3);
2530 __ push(scratch);
2531 VisitForStackValue(value);
2532 __ li(scratch, Operand(Smi::FromInt(NONE)));
2533 __ push(scratch);
2534 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
2535 break; 2523 break;
2536 2524
2537 default: 2525 default:
2538 UNREACHABLE(); 2526 UNREACHABLE();
2539 } 2527 }
2540 } 2528 }
2541 2529
2542 // prototype 2530 // prototype
2543 __ CallRuntime(Runtime::kToFastProperties, 1); 2531 __ CallRuntime(Runtime::kToFastProperties, 1);
2544 2532
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
5292 Assembler::target_address_at(pc_immediate_load_address)) == 5280 Assembler::target_address_at(pc_immediate_load_address)) ==
5293 reinterpret_cast<uint64_t>( 5281 reinterpret_cast<uint64_t>(
5294 isolate->builtins()->OsrAfterStackCheck()->entry())); 5282 isolate->builtins()->OsrAfterStackCheck()->entry()));
5295 return OSR_AFTER_STACK_CHECK; 5283 return OSR_AFTER_STACK_CHECK;
5296 } 5284 }
5297 5285
5298 5286
5299 } } // namespace v8::internal 5287 } } // namespace v8::internal
5300 5288
5301 #endif // V8_TARGET_ARCH_MIPS64 5289 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698