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

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

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/lithium-x64.h » ('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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 1627
1628 expr->BuildConstantProperties(isolate()); 1628 expr->BuildConstantProperties(isolate());
1629 Handle<FixedArray> constant_properties = expr->constant_properties(); 1629 Handle<FixedArray> constant_properties = expr->constant_properties();
1630 int flags = expr->fast_elements() 1630 int flags = expr->fast_elements()
1631 ? ObjectLiteral::kFastElements 1631 ? ObjectLiteral::kFastElements
1632 : ObjectLiteral::kNoFlags; 1632 : ObjectLiteral::kNoFlags;
1633 flags |= expr->has_function() 1633 flags |= expr->has_function()
1634 ? ObjectLiteral::kHasFunction 1634 ? ObjectLiteral::kHasFunction
1635 : ObjectLiteral::kNoFlags; 1635 : ObjectLiteral::kNoFlags;
1636 int properties_count = constant_properties->length() / 2; 1636 int properties_count = constant_properties->length() / 2;
1637 if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || 1637 if (expr->may_store_doubles() || expr->depth() > 1 ||
1638 flags != ObjectLiteral::kFastElements || 1638 Serializer::enabled(isolate()) || flags != ObjectLiteral::kFastElements ||
1639 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 1639 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1640 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1640 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1641 __ Push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1641 __ Push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
1642 __ Push(Smi::FromInt(expr->literal_index())); 1642 __ Push(Smi::FromInt(expr->literal_index()));
1643 __ Push(constant_properties); 1643 __ Push(constant_properties);
1644 __ Push(Smi::FromInt(flags)); 1644 __ Push(Smi::FromInt(flags));
1645 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); 1645 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4);
1646 } else { 1646 } else {
1647 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1647 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1648 __ movp(rax, FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1648 __ movp(rax, FieldOperand(rdi, JSFunction::kLiteralsOffset));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1782 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1783 __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); 1783 __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset));
1784 __ Move(rbx, Smi::FromInt(expr->literal_index())); 1784 __ Move(rbx, Smi::FromInt(expr->literal_index()));
1785 __ Move(rcx, constant_elements); 1785 __ Move(rcx, constant_elements);
1786 FastCloneShallowArrayStub stub( 1786 FastCloneShallowArrayStub stub(
1787 isolate(), 1787 isolate(),
1788 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, 1788 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS,
1789 allocation_site_mode, 1789 allocation_site_mode,
1790 length); 1790 length);
1791 __ CallStub(&stub); 1791 __ CallStub(&stub);
1792 } else if (expr->depth() > 1 || Serializer::enabled() || 1792 } else if (expr->depth() > 1 || Serializer::enabled(isolate()) ||
1793 length > FastCloneShallowArrayStub::kMaximumClonedLength) { 1793 length > FastCloneShallowArrayStub::kMaximumClonedLength) {
1794 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1794 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1795 __ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); 1795 __ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset));
1796 __ Push(Smi::FromInt(expr->literal_index())); 1796 __ Push(Smi::FromInt(expr->literal_index()));
1797 __ Push(constant_elements); 1797 __ Push(constant_elements);
1798 __ Push(Smi::FromInt(flags)); 1798 __ Push(Smi::FromInt(flags));
1799 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); 1799 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4);
1800 } else { 1800 } else {
1801 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || 1801 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) ||
1802 FLAG_smi_only_arrays); 1802 FLAG_smi_only_arrays);
(...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after
4905 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4905 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4906 Assembler::target_address_at(call_target_address, 4906 Assembler::target_address_at(call_target_address,
4907 unoptimized_code)); 4907 unoptimized_code));
4908 return OSR_AFTER_STACK_CHECK; 4908 return OSR_AFTER_STACK_CHECK;
4909 } 4909 }
4910 4910
4911 4911
4912 } } // namespace v8::internal 4912 } } // namespace v8::internal
4913 4913
4914 #endif // V8_TARGET_ARCH_X64 4914 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698