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

Side by Side Diff: src/x64/full-codegen-x64.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/stub-cache.cc ('k') | src/x64/ic-x64.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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { 1547 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
1548 Comment cmnt(masm_, "[ ObjectLiteral"); 1548 Comment cmnt(masm_, "[ ObjectLiteral");
1549 Handle<FixedArray> constant_properties = expr->constant_properties(); 1549 Handle<FixedArray> constant_properties = expr->constant_properties();
1550 int flags = expr->fast_elements() 1550 int flags = expr->fast_elements()
1551 ? ObjectLiteral::kFastElements 1551 ? ObjectLiteral::kFastElements
1552 : ObjectLiteral::kNoFlags; 1552 : ObjectLiteral::kNoFlags;
1553 flags |= expr->has_function() 1553 flags |= expr->has_function()
1554 ? ObjectLiteral::kHasFunction 1554 ? ObjectLiteral::kHasFunction
1555 : ObjectLiteral::kNoFlags; 1555 : ObjectLiteral::kNoFlags;
1556 int properties_count = constant_properties->length() / 2; 1556 int properties_count = constant_properties->length() / 2;
1557 if (expr->depth() > 1) { 1557 if ((FLAG_track_double_fields && expr->may_store_doubles()) ||
1558 expr->depth() > 1) {
1558 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1559 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1559 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1560 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
1560 __ Push(Smi::FromInt(expr->literal_index())); 1561 __ Push(Smi::FromInt(expr->literal_index()));
1561 __ Push(constant_properties); 1562 __ Push(constant_properties);
1562 __ Push(Smi::FromInt(flags)); 1563 __ Push(Smi::FromInt(flags));
1563 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1564 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1564 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements || 1565 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements ||
1565 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 1566 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1566 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1567 __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1567 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1568 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset));
(...skipping 3155 matching lines...) Expand 10 before | Expand all | Expand 10 after
4723 *context_length = 0; 4724 *context_length = 0;
4724 return previous_; 4725 return previous_;
4725 } 4726 }
4726 4727
4727 4728
4728 #undef __ 4729 #undef __
4729 4730
4730 } } // namespace v8::internal 4731 } } // namespace v8::internal
4731 4732
4732 #endif // V8_TARGET_ARCH_X64 4733 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698