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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 16109018: Fix serialization tests and Mac build (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | test/cctest/test-serialize.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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 Label* miss) { 755 Label* miss) {
756 Handle<JSGlobalPropertyCell> cell = 756 Handle<JSGlobalPropertyCell> cell =
757 GlobalObject::EnsurePropertyCell(global, name); 757 GlobalObject::EnsurePropertyCell(global, name);
758 ASSERT(cell->value()->IsTheHole()); 758 ASSERT(cell->value()->IsTheHole());
759 Handle<Oddball> the_hole = masm->isolate()->factory()->the_hole_value(); 759 Handle<Oddball> the_hole = masm->isolate()->factory()->the_hole_value();
760 if (Serializer::enabled()) { 760 if (Serializer::enabled()) {
761 __ mov(scratch, Immediate(cell)); 761 __ mov(scratch, Immediate(cell));
762 __ cmp(FieldOperand(scratch, JSGlobalPropertyCell::kValueOffset), 762 __ cmp(FieldOperand(scratch, JSGlobalPropertyCell::kValueOffset),
763 Immediate(the_hole)); 763 Immediate(the_hole));
764 } else { 764 } else {
765 __ cmp(Operand::Cell(cell), Immediate(the_hole)); 765 __ cmp(Operand::ForCell(cell), Immediate(the_hole));
766 } 766 }
767 __ j(not_equal, miss); 767 __ j(not_equal, miss);
768 } 768 }
769 769
770 770
771 // Both name_reg and receiver_reg are preserved on jumps to miss_label, 771 // Both name_reg and receiver_reg are preserved on jumps to miss_label,
772 // but may be destroyed if store is successful. 772 // but may be destroyed if store is successful.
773 void StubCompiler::GenerateStoreTransition(MacroAssembler* masm, 773 void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
774 Handle<JSObject> object, 774 Handle<JSObject> object,
775 LookupResult* lookup, 775 LookupResult* lookup,
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1566
1567 void CallStubCompiler::GenerateLoadFunctionFromCell( 1567 void CallStubCompiler::GenerateLoadFunctionFromCell(
1568 Handle<Cell> cell, 1568 Handle<Cell> cell,
1569 Handle<JSFunction> function, 1569 Handle<JSFunction> function,
1570 Label* miss) { 1570 Label* miss) {
1571 // Get the value from the cell. 1571 // Get the value from the cell.
1572 if (Serializer::enabled()) { 1572 if (Serializer::enabled()) {
1573 __ mov(edi, Immediate(cell)); 1573 __ mov(edi, Immediate(cell));
1574 __ mov(edi, FieldOperand(edi, Cell::kValueOffset)); 1574 __ mov(edi, FieldOperand(edi, Cell::kValueOffset));
1575 } else { 1575 } else {
1576 __ mov(edi, Operand::Cell(cell)); 1576 __ mov(edi, Operand::ForCell(cell));
1577 } 1577 }
1578 1578
1579 // Check that the cell contains the same function. 1579 // Check that the cell contains the same function.
1580 if (isolate()->heap()->InNewSpace(*function)) { 1580 if (isolate()->heap()->InNewSpace(*function)) {
1581 // We can't embed a pointer to a function in new space so we have 1581 // We can't embed a pointer to a function in new space so we have
1582 // to verify that the shared function info is unchanged. This has 1582 // to verify that the shared function info is unchanged. This has
1583 // the nice side effect that multiple closures based on the same 1583 // the nice side effect that multiple closures based on the same
1584 // function can all use this call IC. Before we load through the 1584 // function can all use this call IC. Before we load through the
1585 // function, we have to verify that it still is a function. 1585 // function, we have to verify that it still is a function.
1586 __ JumpIfSmi(edi, miss); 1586 __ JumpIfSmi(edi, miss);
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
3114 Label success, miss; 3114 Label success, miss;
3115 3115
3116 __ CheckMap(receiver(), Handle<Map>(object->map()), &miss, DO_SMI_CHECK); 3116 __ CheckMap(receiver(), Handle<Map>(object->map()), &miss, DO_SMI_CHECK);
3117 HandlerFrontendHeader( 3117 HandlerFrontendHeader(
3118 object, receiver(), Handle<JSObject>::cast(global), name, &miss); 3118 object, receiver(), Handle<JSObject>::cast(global), name, &miss);
3119 // Get the value from the cell. 3119 // Get the value from the cell.
3120 if (Serializer::enabled()) { 3120 if (Serializer::enabled()) {
3121 __ mov(eax, Immediate(cell)); 3121 __ mov(eax, Immediate(cell));
3122 __ mov(eax, FieldOperand(eax, JSGlobalPropertyCell::kValueOffset)); 3122 __ mov(eax, FieldOperand(eax, JSGlobalPropertyCell::kValueOffset));
3123 } else { 3123 } else {
3124 __ mov(eax, Operand::Cell(cell)); 3124 __ mov(eax, Operand::ForCell(cell));
3125 } 3125 }
3126 3126
3127 // Check for deleted property if property can actually be deleted. 3127 // Check for deleted property if property can actually be deleted.
3128 if (!is_dont_delete) { 3128 if (!is_dont_delete) {
3129 __ cmp(eax, factory()->the_hole_value()); 3129 __ cmp(eax, factory()->the_hole_value());
3130 __ j(equal, &miss); 3130 __ j(equal, &miss);
3131 } else if (FLAG_debug_code) { 3131 } else if (FLAG_debug_code) {
3132 __ cmp(eax, factory()->the_hole_value()); 3132 __ cmp(eax, factory()->the_hole_value());
3133 __ Check(not_equal, "DontDelete cells can't contain the hole"); 3133 __ Check(not_equal, "DontDelete cells can't contain the hole");
3134 } 3134 }
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3743 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3744 } 3744 }
3745 } 3745 }
3746 3746
3747 3747
3748 #undef __ 3748 #undef __
3749 3749
3750 } } // namespace v8::internal 3750 } } // namespace v8::internal
3751 3751
3752 #endif // V8_TARGET_ARCH_IA32 3752 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698