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

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

Issue 6711027: [Isolates] Merge 7201:7258 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 ArgumentsAllocationMode mode = ArgumentsMode(); 747 ArgumentsAllocationMode mode = ArgumentsMode();
748 ASSERT(mode != NO_ARGUMENTS_ALLOCATION); 748 ASSERT(mode != NO_ARGUMENTS_ALLOCATION);
749 749
750 Comment cmnt(masm_, "[ store arguments object"); 750 Comment cmnt(masm_, "[ store arguments object");
751 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) { 751 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) {
752 // When using lazy arguments allocation, we store the arguments marker value 752 // When using lazy arguments allocation, we store the arguments marker value
753 // as a sentinel indicating that the arguments object hasn't been 753 // as a sentinel indicating that the arguments object hasn't been
754 // allocated yet. 754 // allocated yet.
755 frame_->Push(FACTORY->arguments_marker()); 755 frame_->Push(FACTORY->arguments_marker());
756 } else { 756 } else {
757 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 757 ArgumentsAccessStub stub(is_strict_mode()
758 ? ArgumentsAccessStub::NEW_STRICT
759 : ArgumentsAccessStub::NEW_NON_STRICT);
758 frame_->PushFunction(); 760 frame_->PushFunction();
759 frame_->PushReceiverSlotAddress(); 761 frame_->PushReceiverSlotAddress();
760 frame_->Push(Smi::FromInt(scope()->num_parameters())); 762 frame_->Push(Smi::FromInt(scope()->num_parameters()));
761 Result result = frame_->CallStub(&stub, 3); 763 Result result = frame_->CallStub(&stub, 3);
762 frame_->Push(&result); 764 frame_->Push(&result);
763 } 765 }
764 766
765 Variable* arguments = scope()->arguments(); 767 Variable* arguments = scope()->arguments();
766 Variable* shadow = scope()->arguments_shadow(); 768 Variable* shadow = scope()->arguments_shadow();
767 769
(...skipping 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after
4914 Result CodeGenerator::InstantiateFunction( 4916 Result CodeGenerator::InstantiateFunction(
4915 Handle<SharedFunctionInfo> function_info, 4917 Handle<SharedFunctionInfo> function_info,
4916 bool pretenure) { 4918 bool pretenure) {
4917 // The inevitable call will sync frame elements to memory anyway, so 4919 // The inevitable call will sync frame elements to memory anyway, so
4918 // we do it eagerly to allow us to push the arguments directly into 4920 // we do it eagerly to allow us to push the arguments directly into
4919 // place. 4921 // place.
4920 frame()->SyncRange(0, frame()->element_count() - 1); 4922 frame()->SyncRange(0, frame()->element_count() - 1);
4921 4923
4922 // Use the fast case closure allocation code that allocates in new 4924 // Use the fast case closure allocation code that allocates in new
4923 // space for nested functions that don't need literals cloning. 4925 // space for nested functions that don't need literals cloning.
4924 if (scope()->is_function_scope() && 4926 if (!pretenure &&
4925 function_info->num_literals() == 0 && 4927 scope()->is_function_scope() &&
4926 !pretenure) { 4928 function_info->num_literals() == 0) {
4927 FastNewClosureStub stub; 4929 FastNewClosureStub stub(
4930 function_info->strict_mode() ? kStrictMode : kNonStrictMode);
4928 frame()->EmitPush(Immediate(function_info)); 4931 frame()->EmitPush(Immediate(function_info));
4929 return frame()->CallStub(&stub, 1); 4932 return frame()->CallStub(&stub, 1);
4930 } else { 4933 } else {
4931 // Call the runtime to instantiate the function based on the 4934 // Call the runtime to instantiate the function based on the
4932 // shared function info. 4935 // shared function info.
4933 frame()->EmitPush(esi); 4936 frame()->EmitPush(esi);
4934 frame()->EmitPush(Immediate(function_info)); 4937 frame()->EmitPush(Immediate(function_info));
4935 frame()->EmitPush(Immediate(pretenure 4938 frame()->EmitPush(Immediate(pretenure
4936 ? FACTORY->true_value() 4939 ? FACTORY->true_value()
4937 : FACTORY->false_value())); 4940 : FACTORY->false_value()));
(...skipping 5426 matching lines...) Expand 10 before | Expand all | Expand 10 after
10364 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 10367 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
10365 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 10368 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
10366 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); 10369 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress());
10367 } 10370 }
10368 10371
10369 #undef __ 10372 #undef __
10370 10373
10371 } } // namespace v8::internal 10374 } } // namespace v8::internal
10372 10375
10373 #endif // V8_TARGET_ARCH_IA32 10376 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/global-handles.cc ('K') | « 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