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

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

Issue 6474026: Strict mode assignment to undefined reference. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix presubmit. Created 9 years, 10 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 5570 matching lines...) Expand 10 before | Expand all | Expand 10 after
5581 if (CompileTimeValue::IsCompileTimeValue(property->value())) break; 5581 if (CompileTimeValue::IsCompileTimeValue(property->value())) break;
5582 // else fall through. 5582 // else fall through.
5583 case ObjectLiteral::Property::COMPUTED: { 5583 case ObjectLiteral::Property::COMPUTED: {
5584 Handle<Object> key(property->key()->handle()); 5584 Handle<Object> key(property->key()->handle());
5585 if (key->IsSymbol()) { 5585 if (key->IsSymbol()) {
5586 // Duplicate the object as the IC receiver. 5586 // Duplicate the object as the IC receiver.
5587 frame_->Dup(); 5587 frame_->Dup();
5588 Load(property->value()); 5588 Load(property->value());
5589 if (property->emit_store()) { 5589 if (property->emit_store()) {
5590 Result ignored = 5590 Result ignored =
5591 frame_->CallStoreIC(Handle<String>::cast(key), false); 5591 frame_->CallStoreIC(Handle<String>::cast(key), false,
5592 strict_mode_flag());
5592 // A test eax instruction following the store IC call would 5593 // A test eax instruction following the store IC call would
5593 // indicate the presence of an inlined version of the 5594 // indicate the presence of an inlined version of the
5594 // store. Add a nop to indicate that there is no such 5595 // store. Add a nop to indicate that there is no such
5595 // inlined version. 5596 // inlined version.
5596 __ nop(); 5597 __ nop();
5597 } else { 5598 } else {
5598 frame_->Drop(2); 5599 frame_->Drop(2);
5599 } 5600 }
5600 break; 5601 break;
5601 } 5602 }
(...skipping 4062 matching lines...) Expand 10 before | Expand all | Expand 10 after
9664 } 9665 }
9665 9666
9666 9667
9667 Result CodeGenerator::EmitNamedStore(Handle<String> name, bool is_contextual) { 9668 Result CodeGenerator::EmitNamedStore(Handle<String> name, bool is_contextual) {
9668 #ifdef DEBUG 9669 #ifdef DEBUG
9669 int expected_height = frame()->height() - (is_contextual ? 1 : 2); 9670 int expected_height = frame()->height() - (is_contextual ? 1 : 2);
9670 #endif 9671 #endif
9671 9672
9672 Result result; 9673 Result result;
9673 if (is_contextual || scope()->is_global_scope() || loop_nesting() == 0) { 9674 if (is_contextual || scope()->is_global_scope() || loop_nesting() == 0) {
9674 result = frame()->CallStoreIC(name, is_contextual); 9675 result = frame()->CallStoreIC(name, is_contextual, strict_mode_flag());
9675 // A test eax instruction following the call signals that the inobject 9676 // A test eax instruction following the call signals that the inobject
9676 // property case was inlined. Ensure that there is not a test eax 9677 // property case was inlined. Ensure that there is not a test eax
9677 // instruction here. 9678 // instruction here.
9678 __ nop(); 9679 __ nop();
9679 } else { 9680 } else {
9680 // Inline the in-object property case. 9681 // Inline the in-object property case.
9681 JumpTarget slow, done; 9682 JumpTarget slow, done;
9682 Label patch_site; 9683 Label patch_site;
9683 9684
9684 // Get the value and receiver from the stack. 9685 // Get the value and receiver from the stack.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
9748 } 9749 }
9749 __ bind(&skip_write_barrier); 9750 __ bind(&skip_write_barrier);
9750 value.Unuse(); 9751 value.Unuse();
9751 scratch.Unuse(); 9752 scratch.Unuse();
9752 receiver.Unuse(); 9753 receiver.Unuse();
9753 done.Jump(&result); 9754 done.Jump(&result);
9754 9755
9755 slow.Bind(&value, &receiver); 9756 slow.Bind(&value, &receiver);
9756 frame()->Push(&receiver); 9757 frame()->Push(&receiver);
9757 frame()->Push(&value); 9758 frame()->Push(&value);
9758 result = frame()->CallStoreIC(name, is_contextual); 9759 result = frame()->CallStoreIC(name, is_contextual, strict_mode_flag());
9759 // Encode the offset to the map check instruction and the offset 9760 // Encode the offset to the map check instruction and the offset
9760 // to the write barrier store address computation in a test eax 9761 // to the write barrier store address computation in a test eax
9761 // instruction. 9762 // instruction.
9762 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site); 9763 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site);
9763 __ test(eax, 9764 __ test(eax,
9764 Immediate((delta_to_record_write << 16) | delta_to_patch_site)); 9765 Immediate((delta_to_record_write << 16) | delta_to_patch_site));
9765 done.Bind(&result); 9766 done.Bind(&result);
9766 } 9767 }
9767 9768
9768 ASSERT_EQ(expected_height, frame()->height()); 9769 ASSERT_EQ(expected_height, frame()->height());
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
10321 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 10322 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
10322 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 10323 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
10323 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); 10324 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress());
10324 } 10325 }
10325 10326
10326 #undef __ 10327 #undef __
10327 10328
10328 } } // namespace v8::internal 10329 } } // namespace v8::internal
10329 10330
10330 #endif // V8_TARGET_ARCH_IA32 10331 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/stub-cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698