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

Side by Side Diff: src/arm/codegen-arm.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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 ASSERT(mode != NO_ARGUMENTS_ALLOCATION); 592 ASSERT(mode != NO_ARGUMENTS_ALLOCATION);
593 593
594 Comment cmnt(masm_, "[ store arguments object"); 594 Comment cmnt(masm_, "[ store arguments object");
595 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) { 595 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) {
596 // When using lazy arguments allocation, we store the hole value 596 // When using lazy arguments allocation, we store the hole value
597 // as a sentinel indicating that the arguments object hasn't been 597 // as a sentinel indicating that the arguments object hasn't been
598 // allocated yet. 598 // allocated yet.
599 frame_->EmitPushRoot(Heap::kArgumentsMarkerRootIndex); 599 frame_->EmitPushRoot(Heap::kArgumentsMarkerRootIndex);
600 } else { 600 } else {
601 frame_->SpillAll(); 601 frame_->SpillAll();
602 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 602 ArgumentsAccessStub stub(is_strict_mode()
603 ? ArgumentsAccessStub::NEW_STRICT
604 : ArgumentsAccessStub::NEW_NON_STRICT);
603 __ ldr(r2, frame_->Function()); 605 __ ldr(r2, frame_->Function());
604 // The receiver is below the arguments, the return address, and the 606 // The receiver is below the arguments, the return address, and the
605 // frame pointer on the stack. 607 // frame pointer on the stack.
606 const int kReceiverDisplacement = 2 + scope()->num_parameters(); 608 const int kReceiverDisplacement = 2 + scope()->num_parameters();
607 __ add(r1, fp, Operand(kReceiverDisplacement * kPointerSize)); 609 __ add(r1, fp, Operand(kReceiverDisplacement * kPointerSize));
608 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters()))); 610 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters())));
609 frame_->Adjust(3); 611 frame_->Adjust(3);
610 __ Push(r2, r1, r0); 612 __ Push(r2, r1, r0);
611 frame_->CallStub(&stub, 3); 613 frame_->CallStub(&stub, 3);
612 frame_->EmitPush(r0); 614 frame_->EmitPush(r0);
(...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 // Ignore the return value. 3109 // Ignore the return value.
3108 ASSERT(frame_->height() == original_height); 3110 ASSERT(frame_->height() == original_height);
3109 } 3111 }
3110 3112
3111 3113
3112 void CodeGenerator::InstantiateFunction( 3114 void CodeGenerator::InstantiateFunction(
3113 Handle<SharedFunctionInfo> function_info, 3115 Handle<SharedFunctionInfo> function_info,
3114 bool pretenure) { 3116 bool pretenure) {
3115 // Use the fast case closure allocation code that allocates in new 3117 // Use the fast case closure allocation code that allocates in new
3116 // space for nested functions that don't need literals cloning. 3118 // space for nested functions that don't need literals cloning.
3117 if (scope()->is_function_scope() && 3119 if (!pretenure &&
3118 function_info->num_literals() == 0 && 3120 scope()->is_function_scope() &&
3119 !pretenure) { 3121 function_info->num_literals() == 0) {
3120 FastNewClosureStub stub; 3122 FastNewClosureStub stub(
3123 function_info->strict_mode() ? kStrictMode : kNonStrictMode);
3121 frame_->EmitPush(Operand(function_info)); 3124 frame_->EmitPush(Operand(function_info));
3122 frame_->SpillAll(); 3125 frame_->SpillAll();
3123 frame_->CallStub(&stub, 1); 3126 frame_->CallStub(&stub, 1);
3124 frame_->EmitPush(r0); 3127 frame_->EmitPush(r0);
3125 } else { 3128 } else {
3126 // Create a new closure. 3129 // Create a new closure.
3127 frame_->EmitPush(cp); 3130 frame_->EmitPush(cp);
3128 frame_->EmitPush(Operand(function_info)); 3131 frame_->EmitPush(Operand(function_info));
3129 frame_->EmitPush(Operand(pretenure 3132 frame_->EmitPush(Operand(pretenure
3130 ? FACTORY->true_value() 3133 ? FACTORY->true_value()
(...skipping 4284 matching lines...) Expand 10 before | Expand all | Expand 10 after
7415 specialized_on_rhs_ ? "_ConstantRhs" : "", 7418 specialized_on_rhs_ ? "_ConstantRhs" : "",
7416 BinaryOpIC::GetName(runtime_operands_type_)); 7419 BinaryOpIC::GetName(runtime_operands_type_));
7417 return name_; 7420 return name_;
7418 } 7421 }
7419 7422
7420 #undef __ 7423 #undef __
7421 7424
7422 } } // namespace v8::internal 7425 } } // namespace v8::internal
7423 7426
7424 #endif // V8_TARGET_ARCH_ARM 7427 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/arm/debug-arm.cc » ('j') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698