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

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

Issue 6815029: Merge (7180:7265] from bleeding_edge to the experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 8 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/codegen-ia32.h ('k') | src/ia32/disasm-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 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 ArgumentsAllocationMode mode = ArgumentsMode(); 750 ArgumentsAllocationMode mode = ArgumentsMode();
751 ASSERT(mode != NO_ARGUMENTS_ALLOCATION); 751 ASSERT(mode != NO_ARGUMENTS_ALLOCATION);
752 752
753 Comment cmnt(masm_, "[ store arguments object"); 753 Comment cmnt(masm_, "[ store arguments object");
754 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) { 754 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) {
755 // When using lazy arguments allocation, we store the arguments marker value 755 // When using lazy arguments allocation, we store the arguments marker value
756 // as a sentinel indicating that the arguments object hasn't been 756 // as a sentinel indicating that the arguments object hasn't been
757 // allocated yet. 757 // allocated yet.
758 frame_->Push(Factory::arguments_marker()); 758 frame_->Push(Factory::arguments_marker());
759 } else { 759 } else {
760 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 760 ArgumentsAccessStub stub(is_strict_mode()
761 ? ArgumentsAccessStub::NEW_STRICT
762 : ArgumentsAccessStub::NEW_NON_STRICT);
761 frame_->PushFunction(); 763 frame_->PushFunction();
762 frame_->PushReceiverSlotAddress(); 764 frame_->PushReceiverSlotAddress();
763 frame_->Push(Smi::FromInt(scope()->num_parameters())); 765 frame_->Push(Smi::FromInt(scope()->num_parameters()));
764 Result result = frame_->CallStub(&stub, 3); 766 Result result = frame_->CallStub(&stub, 3);
765 frame_->Push(&result); 767 frame_->Push(&result);
766 } 768 }
767 769
768 Variable* arguments = scope()->arguments(); 770 Variable* arguments = scope()->arguments();
769 Variable* shadow = scope()->arguments_shadow(); 771 Variable* shadow = scope()->arguments_shadow();
770 772
(...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after
4913 Result CodeGenerator::InstantiateFunction( 4915 Result CodeGenerator::InstantiateFunction(
4914 Handle<SharedFunctionInfo> function_info, 4916 Handle<SharedFunctionInfo> function_info,
4915 bool pretenure) { 4917 bool pretenure) {
4916 // The inevitable call will sync frame elements to memory anyway, so 4918 // The inevitable call will sync frame elements to memory anyway, so
4917 // we do it eagerly to allow us to push the arguments directly into 4919 // we do it eagerly to allow us to push the arguments directly into
4918 // place. 4920 // place.
4919 frame()->SyncRange(0, frame()->element_count() - 1); 4921 frame()->SyncRange(0, frame()->element_count() - 1);
4920 4922
4921 // Use the fast case closure allocation code that allocates in new 4923 // Use the fast case closure allocation code that allocates in new
4922 // space for nested functions that don't need literals cloning. 4924 // space for nested functions that don't need literals cloning.
4923 if (scope()->is_function_scope() && 4925 if (!pretenure &&
4924 function_info->num_literals() == 0 && 4926 scope()->is_function_scope() &&
4925 !pretenure) { 4927 function_info->num_literals() == 0) {
4926 FastNewClosureStub stub; 4928 FastNewClosureStub stub(
4929 function_info->strict_mode() ? kStrictMode : kNonStrictMode);
4927 frame()->EmitPush(Immediate(function_info)); 4930 frame()->EmitPush(Immediate(function_info));
4928 return frame()->CallStub(&stub, 1); 4931 return frame()->CallStub(&stub, 1);
4929 } else { 4932 } else {
4930 // Call the runtime to instantiate the function based on the 4933 // Call the runtime to instantiate the function based on the
4931 // shared function info. 4934 // shared function info.
4932 frame()->EmitPush(esi); 4935 frame()->EmitPush(esi);
4933 frame()->EmitPush(Immediate(function_info)); 4936 frame()->EmitPush(Immediate(function_info));
4934 frame()->EmitPush(Immediate(pretenure 4937 frame()->EmitPush(Immediate(pretenure
4935 ? Factory::true_value() 4938 ? Factory::true_value()
4936 : Factory::false_value())); 4939 : Factory::false_value()));
(...skipping 5451 matching lines...) Expand 10 before | Expand all | Expand 10 after
10388 memcpy(base, desc.buffer, desc.instr_size); 10391 memcpy(base, desc.buffer, desc.instr_size);
10389 CPU::FlushICache(base, desc.instr_size); 10392 CPU::FlushICache(base, desc.instr_size);
10390 return FUNCTION_CAST<MemCopyFunction>(reinterpret_cast<Address>(base)); 10393 return FUNCTION_CAST<MemCopyFunction>(reinterpret_cast<Address>(base));
10391 } 10394 }
10392 10395
10393 #undef __ 10396 #undef __
10394 10397
10395 } } // namespace v8::internal 10398 } } // namespace v8::internal
10396 10399
10397 #endif // V8_TARGET_ARCH_IA32 10400 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.h ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698