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

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

Issue 896643003: Class methods should be non enumerable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 5 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 } else { 1804 } else {
1805 __ Drop(3); 1805 __ Drop(3);
1806 } 1806 }
1807 break; 1807 break;
1808 1808
1809 case ObjectLiteral::Property::PROTOTYPE: 1809 case ObjectLiteral::Property::PROTOTYPE:
1810 UNREACHABLE(); 1810 UNREACHABLE();
1811 break; 1811 break;
1812 1812
1813 case ObjectLiteral::Property::GETTER: 1813 case ObjectLiteral::Property::GETTER:
1814 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 1814 __ li(a0, Operand(Smi::FromInt(NONE)));
1815 __ push(a0);
1816 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
1815 break; 1817 break;
1816 1818
1817 case ObjectLiteral::Property::SETTER: 1819 case ObjectLiteral::Property::SETTER:
1818 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 1820 __ li(a0, Operand(Smi::FromInt(NONE)));
1821 __ push(a0);
1822 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
1819 break; 1823 break;
1820 } 1824 }
1821 } 1825 }
1822 } 1826 }
1823 1827
1824 if (expr->has_function()) { 1828 if (expr->has_function()) {
1825 DCHECK(result_saved); 1829 DCHECK(result_saved);
1826 __ lw(a0, MemOperand(sp)); 1830 __ lw(a0, MemOperand(sp));
1827 __ push(a0); 1831 __ push(a0);
1828 __ CallRuntime(Runtime::kToFastProperties, 1); 1832 __ CallRuntime(Runtime::kToFastProperties, 1);
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 switch (property->kind()) { 2534 switch (property->kind()) {
2531 case ObjectLiteral::Property::CONSTANT: 2535 case ObjectLiteral::Property::CONSTANT:
2532 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2536 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2533 case ObjectLiteral::Property::PROTOTYPE: 2537 case ObjectLiteral::Property::PROTOTYPE:
2534 UNREACHABLE(); 2538 UNREACHABLE();
2535 case ObjectLiteral::Property::COMPUTED: 2539 case ObjectLiteral::Property::COMPUTED:
2536 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2540 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2537 break; 2541 break;
2538 2542
2539 case ObjectLiteral::Property::GETTER: 2543 case ObjectLiteral::Property::GETTER:
2540 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 2544 __ li(a0, Operand(Smi::FromInt(DONT_ENUM)));
2545 __ push(a0);
2546 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
2541 break; 2547 break;
2542 2548
2543 case ObjectLiteral::Property::SETTER: 2549 case ObjectLiteral::Property::SETTER:
2544 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 2550 __ li(a0, Operand(Smi::FromInt(DONT_ENUM)));
2551 __ push(a0);
2552 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
2545 break; 2553 break;
2546 2554
2547 default: 2555 default:
2548 UNREACHABLE(); 2556 UNREACHABLE();
2549 } 2557 }
2550 } 2558 }
2551 2559
2552 // prototype 2560 // prototype
2553 __ CallRuntime(Runtime::kToFastProperties, 1); 2561 __ CallRuntime(Runtime::kToFastProperties, 1);
2554 2562
(...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after
5343 Assembler::target_address_at(pc_immediate_load_address)) == 5351 Assembler::target_address_at(pc_immediate_load_address)) ==
5344 reinterpret_cast<uint32_t>( 5352 reinterpret_cast<uint32_t>(
5345 isolate->builtins()->OsrAfterStackCheck()->entry())); 5353 isolate->builtins()->OsrAfterStackCheck()->entry()));
5346 return OSR_AFTER_STACK_CHECK; 5354 return OSR_AFTER_STACK_CHECK;
5347 } 5355 }
5348 5356
5349 5357
5350 } } // namespace v8::internal 5358 } } // namespace v8::internal
5351 5359
5352 #endif // V8_TARGET_ARCH_MIPS 5360 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698