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

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

Issue 14850006: Use mutable heapnumbers to store doubles in fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to ARM and x64 Created 7 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/hydrogen-instructions.cc ('k') | src/ia32/ic-ia32.cc » ('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 // 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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1522 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1523 Comment cmnt(masm_, "[ ObjectLiteral"); 1523 Comment cmnt(masm_, "[ ObjectLiteral");
1524 Handle<FixedArray> constant_properties = expr->constant_properties(); 1524 Handle<FixedArray> constant_properties = expr->constant_properties();
1525 int flags = expr->fast_elements() 1525 int flags = expr->fast_elements()
1526 ? ObjectLiteral::kFastElements 1526 ? ObjectLiteral::kFastElements
1527 : ObjectLiteral::kNoFlags; 1527 : ObjectLiteral::kNoFlags;
1528 flags |= expr->has_function() 1528 flags |= expr->has_function()
1529 ? ObjectLiteral::kHasFunction 1529 ? ObjectLiteral::kHasFunction
1530 : ObjectLiteral::kNoFlags; 1530 : ObjectLiteral::kNoFlags;
1531 int properties_count = constant_properties->length() / 2; 1531 int properties_count = constant_properties->length() / 2;
1532 if (expr->depth() > 1) { 1532 if ((FLAG_track_double_fields && expr->may_store_doubles()) ||
1533 expr->depth() > 1) {
1533 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1534 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1534 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); 1535 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset));
1535 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1536 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1536 __ push(Immediate(constant_properties)); 1537 __ push(Immediate(constant_properties));
1537 __ push(Immediate(Smi::FromInt(flags))); 1538 __ push(Immediate(Smi::FromInt(flags)));
1538 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1539 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1539 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements || 1540 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements ||
1540 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 1541 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1541 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1542 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1542 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); 1543 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset));
(...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after
4731 *stack_depth = 0; 4732 *stack_depth = 0;
4732 *context_length = 0; 4733 *context_length = 0;
4733 return previous_; 4734 return previous_;
4734 } 4735 }
4735 4736
4736 #undef __ 4737 #undef __
4737 4738
4738 } } // namespace v8::internal 4739 } } // namespace v8::internal
4739 4740
4740 #endif // V8_TARGET_ARCH_IA32 4741 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698