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

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

Issue 1165463007: Build ObjectLiteral constant properties in the numbering phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 6 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/mips64/full-codegen-mips64.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_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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 __ PushRoot(Heap::kNullValueRootIndex); 1610 __ PushRoot(Heap::kNullValueRootIndex);
1611 } else { 1611 } else {
1612 VisitForStackValue(expression); 1612 VisitForStackValue(expression);
1613 } 1613 }
1614 } 1614 }
1615 1615
1616 1616
1617 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1617 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1618 Comment cmnt(masm_, "[ ObjectLiteral"); 1618 Comment cmnt(masm_, "[ ObjectLiteral");
1619 1619
1620 expr->BuildConstantProperties(isolate());
1621 Handle<FixedArray> constant_properties = expr->constant_properties(); 1620 Handle<FixedArray> constant_properties = expr->constant_properties();
1622 int flags = expr->ComputeFlags(); 1621 int flags = expr->ComputeFlags();
1623 if (MustCreateObjectLiteralWithRuntime(expr)) { 1622 if (MustCreateObjectLiteralWithRuntime(expr)) {
1624 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1623 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1625 __ Push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1624 __ Push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
1626 __ Push(Smi::FromInt(expr->literal_index())); 1625 __ Push(Smi::FromInt(expr->literal_index()));
1627 __ Push(constant_properties); 1626 __ Push(constant_properties);
1628 __ Push(Smi::FromInt(flags)); 1627 __ Push(Smi::FromInt(flags));
1629 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1628 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1630 } else { 1629 } else {
(...skipping 3821 matching lines...) Expand 10 before | Expand all | Expand 10 after
5452 Assembler::target_address_at(call_target_address, 5451 Assembler::target_address_at(call_target_address,
5453 unoptimized_code)); 5452 unoptimized_code));
5454 return OSR_AFTER_STACK_CHECK; 5453 return OSR_AFTER_STACK_CHECK;
5455 } 5454 }
5456 5455
5457 5456
5458 } // namespace internal 5457 } // namespace internal
5459 } // namespace v8 5458 } // namespace v8
5460 5459
5461 #endif // V8_TARGET_ARCH_X64 5460 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698