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

Side by Side Diff: src/x64/codegen-x64.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 4876 matching lines...) Expand 10 before | Expand all | Expand 10 after
4887 if (CompileTimeValue::IsCompileTimeValue(property->value())) break; 4887 if (CompileTimeValue::IsCompileTimeValue(property->value())) break;
4888 // else fall through. 4888 // else fall through.
4889 case ObjectLiteral::Property::COMPUTED: { 4889 case ObjectLiteral::Property::COMPUTED: {
4890 Handle<Object> key(property->key()->handle()); 4890 Handle<Object> key(property->key()->handle());
4891 if (key->IsSymbol()) { 4891 if (key->IsSymbol()) {
4892 // Duplicate the object as the IC receiver. 4892 // Duplicate the object as the IC receiver.
4893 frame_->Dup(); 4893 frame_->Dup();
4894 Load(property->value()); 4894 Load(property->value());
4895 if (property->emit_store()) { 4895 if (property->emit_store()) {
4896 Result ignored = 4896 Result ignored =
4897 frame_->CallStoreIC(Handle<String>::cast(key), false); 4897 frame_->CallStoreIC(Handle<String>::cast(key), false,
4898 strict_mode_flag());
4898 // A test rax instruction following the store IC call would 4899 // A test rax instruction following the store IC call would
4899 // indicate the presence of an inlined version of the 4900 // indicate the presence of an inlined version of the
4900 // store. Add a nop to indicate that there is no such 4901 // store. Add a nop to indicate that there is no such
4901 // inlined version. 4902 // inlined version.
4902 __ nop(); 4903 __ nop();
4903 } else { 4904 } else {
4904 frame_->Drop(2); 4905 frame_->Drop(2);
4905 } 4906 }
4906 break; 4907 break;
4907 } 4908 }
(...skipping 3319 matching lines...) Expand 10 before | Expand all | Expand 10 after
8227 } 8228 }
8228 8229
8229 8230
8230 Result CodeGenerator::EmitNamedStore(Handle<String> name, bool is_contextual) { 8231 Result CodeGenerator::EmitNamedStore(Handle<String> name, bool is_contextual) {
8231 #ifdef DEBUG 8232 #ifdef DEBUG
8232 int expected_height = frame()->height() - (is_contextual ? 1 : 2); 8233 int expected_height = frame()->height() - (is_contextual ? 1 : 2);
8233 #endif 8234 #endif
8234 8235
8235 Result result; 8236 Result result;
8236 if (is_contextual || scope()->is_global_scope() || loop_nesting() == 0) { 8237 if (is_contextual || scope()->is_global_scope() || loop_nesting() == 0) {
8237 result = frame()->CallStoreIC(name, is_contextual); 8238 result = frame()->CallStoreIC(name, is_contextual, strict_mode_flag());
8238 // A test rax instruction following the call signals that the inobject 8239 // A test rax instruction following the call signals that the inobject
8239 // property case was inlined. Ensure that there is not a test rax 8240 // property case was inlined. Ensure that there is not a test rax
8240 // instruction here. 8241 // instruction here.
8241 __ nop(); 8242 __ nop();
8242 } else { 8243 } else {
8243 // Inline the in-object property case. 8244 // Inline the in-object property case.
8244 JumpTarget slow, done; 8245 JumpTarget slow, done;
8245 Label patch_site; 8246 Label patch_site;
8246 8247
8247 // Get the value and receiver from the stack. 8248 // Get the value and receiver from the stack.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
8327 } 8328 }
8328 __ bind(&skip_write_barrier); 8329 __ bind(&skip_write_barrier);
8329 value.Unuse(); 8330 value.Unuse();
8330 scratch.Unuse(); 8331 scratch.Unuse();
8331 receiver.Unuse(); 8332 receiver.Unuse();
8332 done.Jump(&result); 8333 done.Jump(&result);
8333 8334
8334 slow.Bind(&value, &receiver); 8335 slow.Bind(&value, &receiver);
8335 frame()->Push(&receiver); 8336 frame()->Push(&receiver);
8336 frame()->Push(&value); 8337 frame()->Push(&value);
8337 result = frame()->CallStoreIC(name, is_contextual); 8338 result = frame()->CallStoreIC(name, is_contextual, strict_mode_flag());
8338 // Encode the offset to the map check instruction and the offset 8339 // Encode the offset to the map check instruction and the offset
8339 // to the write barrier store address computation in a test rax 8340 // to the write barrier store address computation in a test rax
8340 // instruction. 8341 // instruction.
8341 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site); 8342 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site);
8342 __ testl(rax, 8343 __ testl(rax,
8343 Immediate((delta_to_record_write << 16) | delta_to_patch_site)); 8344 Immediate((delta_to_record_write << 16) | delta_to_patch_site));
8344 done.Bind(&result); 8345 done.Bind(&result);
8345 } 8346 }
8346 8347
8347 ASSERT_EQ(expected_height, frame()->height()); 8348 ASSERT_EQ(expected_height, frame()->height());
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
8809 } 8810 }
8810 8811
8811 #endif 8812 #endif
8812 8813
8813 8814
8814 #undef __ 8815 #undef __
8815 8816
8816 } } // namespace v8::internal 8817 } } // namespace v8::internal
8817 8818
8818 #endif // V8_TARGET_ARCH_X64 8819 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/stub-cache.h ('K') | « src/stub-cache.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698