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

Side by Side Diff: src/x64/codegen-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 ArgumentsAllocationMode mode = ArgumentsMode(); 627 ArgumentsAllocationMode mode = ArgumentsMode();
628 ASSERT(mode != NO_ARGUMENTS_ALLOCATION); 628 ASSERT(mode != NO_ARGUMENTS_ALLOCATION);
629 629
630 Comment cmnt(masm_, "[ store arguments object"); 630 Comment cmnt(masm_, "[ store arguments object");
631 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) { 631 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) {
632 // When using lazy arguments allocation, we store the arguments marker value 632 // When using lazy arguments allocation, we store the arguments marker value
633 // as a sentinel indicating that the arguments object hasn't been 633 // as a sentinel indicating that the arguments object hasn't been
634 // allocated yet. 634 // allocated yet.
635 frame_->Push(FACTORY->arguments_marker()); 635 frame_->Push(FACTORY->arguments_marker());
636 } else { 636 } else {
637 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 637 ArgumentsAccessStub stub(is_strict_mode()
638 ? ArgumentsAccessStub::NEW_STRICT
639 : ArgumentsAccessStub::NEW_NON_STRICT);
638 frame_->PushFunction(); 640 frame_->PushFunction();
639 frame_->PushReceiverSlotAddress(); 641 frame_->PushReceiverSlotAddress();
640 frame_->Push(Smi::FromInt(scope()->num_parameters())); 642 frame_->Push(Smi::FromInt(scope()->num_parameters()));
641 Result result = frame_->CallStub(&stub, 3); 643 Result result = frame_->CallStub(&stub, 3);
642 frame_->Push(&result); 644 frame_->Push(&result);
643 } 645 }
644 646
645 Variable* arguments = scope()->arguments(); 647 Variable* arguments = scope()->arguments();
646 Variable* shadow = scope()->arguments_shadow(); 648 Variable* shadow = scope()->arguments_shadow();
647 ASSERT(arguments != NULL && arguments->AsSlot() != NULL); 649 ASSERT(arguments != NULL && arguments->AsSlot() != NULL);
(...skipping 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after
4254 void CodeGenerator::InstantiateFunction( 4256 void CodeGenerator::InstantiateFunction(
4255 Handle<SharedFunctionInfo> function_info, 4257 Handle<SharedFunctionInfo> function_info,
4256 bool pretenure) { 4258 bool pretenure) {
4257 // The inevitable call will sync frame elements to memory anyway, so 4259 // The inevitable call will sync frame elements to memory anyway, so
4258 // we do it eagerly to allow us to push the arguments directly into 4260 // we do it eagerly to allow us to push the arguments directly into
4259 // place. 4261 // place.
4260 frame_->SyncRange(0, frame_->element_count() - 1); 4262 frame_->SyncRange(0, frame_->element_count() - 1);
4261 4263
4262 // Use the fast case closure allocation code that allocates in new 4264 // Use the fast case closure allocation code that allocates in new
4263 // space for nested functions that don't need literals cloning. 4265 // space for nested functions that don't need literals cloning.
4264 if (scope()->is_function_scope() && 4266 if (!pretenure &&
4265 function_info->num_literals() == 0 && 4267 scope()->is_function_scope() &&
4266 !pretenure) { 4268 function_info->num_literals() == 0) {
4267 FastNewClosureStub stub; 4269 FastNewClosureStub stub(
4270 function_info->strict_mode() ? kStrictMode : kNonStrictMode);
4268 frame_->Push(function_info); 4271 frame_->Push(function_info);
4269 Result answer = frame_->CallStub(&stub, 1); 4272 Result answer = frame_->CallStub(&stub, 1);
4270 frame_->Push(&answer); 4273 frame_->Push(&answer);
4271 } else { 4274 } else {
4272 // Call the runtime to instantiate the function based on the 4275 // Call the runtime to instantiate the function based on the
4273 // shared function info. 4276 // shared function info.
4274 frame_->EmitPush(rsi); 4277 frame_->EmitPush(rsi);
4275 frame_->EmitPush(function_info); 4278 frame_->EmitPush(function_info);
4276 frame_->EmitPush(pretenure 4279 frame_->EmitPush(pretenure
4277 ? FACTORY->true_value() 4280 ? FACTORY->true_value()
(...skipping 4560 matching lines...) Expand 10 before | Expand all | Expand 10 after
8838 } 8841 }
8839 8842
8840 #endif 8843 #endif
8841 8844
8842 8845
8843 #undef __ 8846 #undef __
8844 8847
8845 } } // namespace v8::internal 8848 } } // namespace v8::internal
8846 8849
8847 #endif // V8_TARGET_ARCH_X64 8850 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/global-handles.cc ('K') | « src/x64/codegen-x64.h ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698