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

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

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 1612
1613 expr->BuildConstantProperties(isolate()); 1613 expr->BuildConstantProperties(isolate());
1614 Handle<FixedArray> constant_properties = expr->constant_properties(); 1614 Handle<FixedArray> constant_properties = expr->constant_properties();
1615 int flags = expr->fast_elements() 1615 int flags = expr->fast_elements()
1616 ? ObjectLiteral::kFastElements 1616 ? ObjectLiteral::kFastElements
1617 : ObjectLiteral::kNoFlags; 1617 : ObjectLiteral::kNoFlags;
1618 flags |= expr->has_function() 1618 flags |= expr->has_function()
1619 ? ObjectLiteral::kHasFunction 1619 ? ObjectLiteral::kHasFunction
1620 : ObjectLiteral::kNoFlags; 1620 : ObjectLiteral::kNoFlags;
1621 int properties_count = constant_properties->length() / 2; 1621 int properties_count = constant_properties->length() / 2;
1622 if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || 1622 if (expr->may_store_doubles() || expr->depth() > 1 ||
1623 Serializer::enabled(isolate()) ||
1623 flags != ObjectLiteral::kFastElements || 1624 flags != ObjectLiteral::kFastElements ||
1624 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 1625 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1625 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1626 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1626 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); 1627 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset));
1627 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1628 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1628 __ push(Immediate(constant_properties)); 1629 __ push(Immediate(constant_properties));
1629 __ push(Immediate(Smi::FromInt(flags))); 1630 __ push(Immediate(Smi::FromInt(flags)));
1630 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); 1631 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4);
1631 } else { 1632 } else {
1632 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1633 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1768 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1768 __ mov(eax, FieldOperand(ebx, JSFunction::kLiteralsOffset)); 1769 __ mov(eax, FieldOperand(ebx, JSFunction::kLiteralsOffset));
1769 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); 1770 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index())));
1770 __ mov(ecx, Immediate(constant_elements)); 1771 __ mov(ecx, Immediate(constant_elements));
1771 FastCloneShallowArrayStub stub( 1772 FastCloneShallowArrayStub stub(
1772 isolate(), 1773 isolate(),
1773 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, 1774 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS,
1774 allocation_site_mode, 1775 allocation_site_mode,
1775 length); 1776 length);
1776 __ CallStub(&stub); 1777 __ CallStub(&stub);
1777 } else if (expr->depth() > 1 || Serializer::enabled() || 1778 } else if (expr->depth() > 1 || Serializer::enabled(isolate()) ||
1778 length > FastCloneShallowArrayStub::kMaximumClonedLength) { 1779 length > FastCloneShallowArrayStub::kMaximumClonedLength) {
1779 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1780 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1780 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); 1781 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset));
1781 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1782 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1782 __ push(Immediate(constant_elements)); 1783 __ push(Immediate(constant_elements));
1783 __ push(Immediate(Smi::FromInt(flags))); 1784 __ push(Immediate(Smi::FromInt(flags)));
1784 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); 1785 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4);
1785 } else { 1786 } else {
1786 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || 1787 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) ||
1787 FLAG_smi_only_arrays); 1788 FLAG_smi_only_arrays);
(...skipping 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after
4923 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4924 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4924 Assembler::target_address_at(call_target_address, 4925 Assembler::target_address_at(call_target_address,
4925 unoptimized_code)); 4926 unoptimized_code));
4926 return OSR_AFTER_STACK_CHECK; 4927 return OSR_AFTER_STACK_CHECK;
4927 } 4928 }
4928 4929
4929 4930
4930 } } // namespace v8::internal 4931 } } // namespace v8::internal
4931 4932
4932 #endif // V8_TARGET_ARCH_IA32 4933 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698