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

Side by Side Diff: src/x64/full-codegen-x64.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_X64 7 #if V8_TARGET_ARCH_X64
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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 } else { 1774 } else {
1775 __ Drop(3); 1775 __ Drop(3);
1776 } 1776 }
1777 break; 1777 break;
1778 1778
1779 case ObjectLiteral::Property::PROTOTYPE: 1779 case ObjectLiteral::Property::PROTOTYPE:
1780 UNREACHABLE(); 1780 UNREACHABLE();
1781 break; 1781 break;
1782 1782
1783 case ObjectLiteral::Property::GETTER: 1783 case ObjectLiteral::Property::GETTER:
1784 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 1784 __ Push(Smi::FromInt(NONE));
1785 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
1785 break; 1786 break;
1786 1787
1787 case ObjectLiteral::Property::SETTER: 1788 case ObjectLiteral::Property::SETTER:
1788 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 1789 __ Push(Smi::FromInt(NONE));
1790 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
1789 break; 1791 break;
1790 } 1792 }
1791 } 1793 }
1792 } 1794 }
1793 1795
1794 if (expr->has_function()) { 1796 if (expr->has_function()) {
1795 DCHECK(result_saved); 1797 DCHECK(result_saved);
1796 __ Push(Operand(rsp, 0)); 1798 __ Push(Operand(rsp, 0));
1797 __ CallRuntime(Runtime::kToFastProperties, 1); 1799 __ CallRuntime(Runtime::kToFastProperties, 1);
1798 } 1800 }
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 switch (property->kind()) { 2466 switch (property->kind()) {
2465 case ObjectLiteral::Property::CONSTANT: 2467 case ObjectLiteral::Property::CONSTANT:
2466 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2468 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2467 case ObjectLiteral::Property::PROTOTYPE: 2469 case ObjectLiteral::Property::PROTOTYPE:
2468 UNREACHABLE(); 2470 UNREACHABLE();
2469 case ObjectLiteral::Property::COMPUTED: 2471 case ObjectLiteral::Property::COMPUTED:
2470 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2472 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2471 break; 2473 break;
2472 2474
2473 case ObjectLiteral::Property::GETTER: 2475 case ObjectLiteral::Property::GETTER:
2474 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 2476 __ Push(Smi::FromInt(DONT_ENUM));
2477 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
2475 break; 2478 break;
2476 2479
2477 case ObjectLiteral::Property::SETTER: 2480 case ObjectLiteral::Property::SETTER:
2478 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 2481 __ Push(Smi::FromInt(DONT_ENUM));
2482 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
2479 break; 2483 break;
2480 2484
2481 default: 2485 default:
2482 UNREACHABLE(); 2486 UNREACHABLE();
2483 } 2487 }
2484 } 2488 }
2485 2489
2486 // prototype 2490 // prototype
2487 __ CallRuntime(Runtime::kToFastProperties, 1); 2491 __ CallRuntime(Runtime::kToFastProperties, 1);
2488 2492
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
5297 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5301 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5298 Assembler::target_address_at(call_target_address, 5302 Assembler::target_address_at(call_target_address,
5299 unoptimized_code)); 5303 unoptimized_code));
5300 return OSR_AFTER_STACK_CHECK; 5304 return OSR_AFTER_STACK_CHECK;
5301 } 5305 }
5302 5306
5303 5307
5304 } } // namespace v8::internal 5308 } } // namespace v8::internal
5305 5309
5306 #endif // V8_TARGET_ARCH_X64 5310 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698