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

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

Issue 795573005: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 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 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 // Mark all computed expressions that are bound to a key that 1648 // Mark all computed expressions that are bound to a key that
1649 // is shadowed by a later occurrence of the same key. For the 1649 // is shadowed by a later occurrence of the same key. For the
1650 // marked expressions, no store code is emitted. 1650 // marked expressions, no store code is emitted.
1651 expr->CalculateEmitStore(zone()); 1651 expr->CalculateEmitStore(zone());
1652 1652
1653 AccessorTable accessor_table(zone()); 1653 AccessorTable accessor_table(zone());
1654 for (int i = 0; i < expr->properties()->length(); i++) { 1654 for (int i = 0; i < expr->properties()->length(); i++) {
1655 ObjectLiteral::Property* property = expr->properties()->at(i); 1655 ObjectLiteral::Property* property = expr->properties()->at(i);
1656 if (property->IsCompileTimeValue()) continue; 1656 if (property->IsCompileTimeValue()) continue;
1657 1657
1658 Literal* key = property->key(); 1658 Literal* key = property->key()->AsLiteral();
1659 Expression* value = property->value(); 1659 Expression* value = property->value();
1660 if (!result_saved) { 1660 if (!result_saved) {
1661 __ Push(rax); // Save result on the stack 1661 __ Push(rax); // Save result on the stack
1662 result_saved = true; 1662 result_saved = true;
1663 } 1663 }
1664 switch (property->kind()) { 1664 switch (property->kind()) {
1665 case ObjectLiteral::Property::CONSTANT: 1665 case ObjectLiteral::Property::CONSTANT:
1666 UNREACHABLE(); 1666 UNREACHABLE();
1667 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1667 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1668 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); 1668 DCHECK(!CompileTimeValue::IsCompileTimeValue(value));
(...skipping 3524 matching lines...) Expand 10 before | Expand all | Expand 10 after
5193 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5193 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5194 Assembler::target_address_at(call_target_address, 5194 Assembler::target_address_at(call_target_address,
5195 unoptimized_code)); 5195 unoptimized_code));
5196 return OSR_AFTER_STACK_CHECK; 5196 return OSR_AFTER_STACK_CHECK;
5197 } 5197 }
5198 5198
5199 5199
5200 } } // namespace v8::internal 5200 } } // namespace v8::internal
5201 5201
5202 #endif // V8_TARGET_ARCH_X64 5202 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/typing.cc ('K') | « src/typing.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698