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

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

Issue 896643003: Class methods should be non enumerable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use LanguageMode 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
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/harmony/classes.js » ('j') | 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_X87 7 #if V8_TARGET_ARCH_X87
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 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 } else { 1729 } else {
1730 __ Drop(3); 1730 __ Drop(3);
1731 } 1731 }
1732 break; 1732 break;
1733 1733
1734 case ObjectLiteral::Property::PROTOTYPE: 1734 case ObjectLiteral::Property::PROTOTYPE:
1735 UNREACHABLE(); 1735 UNREACHABLE();
1736 break; 1736 break;
1737 1737
1738 case ObjectLiteral::Property::GETTER: 1738 case ObjectLiteral::Property::GETTER:
1739 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 1739 __ push(Immediate(Smi::FromInt(NONE)));
1740 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
1740 break; 1741 break;
1741 1742
1742 case ObjectLiteral::Property::SETTER: 1743 case ObjectLiteral::Property::SETTER:
1743 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 1744 __ push(Immediate(Smi::FromInt(NONE)));
1745 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
1744 break; 1746 break;
1745 } 1747 }
1746 } 1748 }
1747 } 1749 }
1748 1750
1749 if (expr->has_function()) { 1751 if (expr->has_function()) {
1750 DCHECK(result_saved); 1752 DCHECK(result_saved);
1751 __ push(Operand(esp, 0)); 1753 __ push(Operand(esp, 0));
1752 __ CallRuntime(Runtime::kToFastProperties, 1); 1754 __ CallRuntime(Runtime::kToFastProperties, 1);
1753 } 1755 }
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 switch (property->kind()) { 2454 switch (property->kind()) {
2453 case ObjectLiteral::Property::CONSTANT: 2455 case ObjectLiteral::Property::CONSTANT:
2454 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2456 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2455 case ObjectLiteral::Property::PROTOTYPE: 2457 case ObjectLiteral::Property::PROTOTYPE:
2456 UNREACHABLE(); 2458 UNREACHABLE();
2457 case ObjectLiteral::Property::COMPUTED: 2459 case ObjectLiteral::Property::COMPUTED:
2458 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2460 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2459 break; 2461 break;
2460 2462
2461 case ObjectLiteral::Property::GETTER: 2463 case ObjectLiteral::Property::GETTER:
2462 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); 2464 __ push(Immediate(Smi::FromInt(DONT_ENUM)));
2465 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 4);
2463 break; 2466 break;
2464 2467
2465 case ObjectLiteral::Property::SETTER: 2468 case ObjectLiteral::Property::SETTER:
2466 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); 2469 __ push(Immediate(Smi::FromInt(DONT_ENUM)));
2470 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4);
2467 break; 2471 break;
2468 } 2472 }
2469 } 2473 }
2470 2474
2471 // prototype 2475 // prototype
2472 __ CallRuntime(Runtime::kToFastProperties, 1); 2476 __ CallRuntime(Runtime::kToFastProperties, 1);
2473 2477
2474 // constructor 2478 // constructor
2475 __ CallRuntime(Runtime::kToFastProperties, 1); 2479 __ CallRuntime(Runtime::kToFastProperties, 1);
2476 } 2480 }
(...skipping 2738 matching lines...) Expand 10 before | Expand all | Expand 10 after
5215 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5219 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5216 Assembler::target_address_at(call_target_address, 5220 Assembler::target_address_at(call_target_address,
5217 unoptimized_code)); 5221 unoptimized_code));
5218 return OSR_AFTER_STACK_CHECK; 5222 return OSR_AFTER_STACK_CHECK;
5219 } 5223 }
5220 5224
5221 5225
5222 } } // namespace v8::internal 5226 } } // namespace v8::internal
5223 5227
5224 #endif // V8_TARGET_ARCH_X87 5228 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/harmony/classes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698