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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 181543002: Eliminate extended mode, and other modes clean-up (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #ifdef DEBUG 150 #ifdef DEBUG
151 if (strlen(FLAG_stop_at) > 0 && 151 if (strlen(FLAG_stop_at) > 0 &&
152 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 152 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
153 __ int3(); 153 __ int3();
154 } 154 }
155 #endif 155 #endif
156 156
157 // Sloppy mode functions need to replace the receiver with the global proxy 157 // Sloppy mode functions need to replace the receiver with the global proxy
158 // when called as functions (without an explicit receiver object). 158 // when called as functions (without an explicit receiver object).
159 if (info_->this_has_uses() && 159 if (info_->this_has_uses() &&
160 info_->is_sloppy_mode() && 160 info_->strict_mode() == SLOPPY &&
161 !info_->is_native()) { 161 !info_->is_native()) {
162 Label ok; 162 Label ok;
163 StackArgumentsAccessor args(rsp, scope()->num_parameters()); 163 StackArgumentsAccessor args(rsp, scope()->num_parameters());
164 __ movp(rcx, args.GetReceiverOperand()); 164 __ movp(rcx, args.GetReceiverOperand());
165 165
166 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex); 166 __ CompareRoot(rcx, Heap::kUndefinedValueRootIndex);
167 __ j(not_equal, &ok, Label::kNear); 167 __ j(not_equal, &ok, Label::kNear);
168 168
169 __ movp(rcx, GlobalObjectOperand()); 169 __ movp(rcx, GlobalObjectOperand());
170 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalReceiverOffset)); 170 __ movp(rcx, FieldOperand(rcx, GlobalObject::kGlobalReceiverOffset));
(...skipping 3825 matching lines...) Expand 10 before | Expand all | Expand 10 after
3996 } 3996 }
3997 } 3997 }
3998 3998
3999 3999
4000 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 4000 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
4001 ASSERT(ToRegister(instr->context()).is(rsi)); 4001 ASSERT(ToRegister(instr->context()).is(rsi));
4002 ASSERT(ToRegister(instr->object()).is(rdx)); 4002 ASSERT(ToRegister(instr->object()).is(rdx));
4003 ASSERT(ToRegister(instr->value()).is(rax)); 4003 ASSERT(ToRegister(instr->value()).is(rax));
4004 4004
4005 __ Move(rcx, instr->hydrogen()->name()); 4005 __ Move(rcx, instr->hydrogen()->name());
4006 Handle<Code> ic = StoreIC::initialize_stub(isolate(), 4006 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
4007 instr->strict_mode_flag());
4008 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4007 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4009 } 4008 }
4010 4009
4011 4010
4012 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) { 4011 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) {
4013 if (FLAG_debug_code && check->hydrogen()->skip_check()) { 4012 if (FLAG_debug_code && check->hydrogen()->skip_check()) {
4014 Label done; 4013 Label done;
4015 __ j(NegateCondition(cc), &done, Label::kNear); 4014 __ j(NegateCondition(cc), &done, Label::kNear);
4016 __ int3(); 4015 __ int3();
4017 __ bind(&done); 4016 __ bind(&done);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
4276 } 4275 }
4277 } 4276 }
4278 4277
4279 4278
4280 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4279 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4281 ASSERT(ToRegister(instr->context()).is(rsi)); 4280 ASSERT(ToRegister(instr->context()).is(rsi));
4282 ASSERT(ToRegister(instr->object()).is(rdx)); 4281 ASSERT(ToRegister(instr->object()).is(rdx));
4283 ASSERT(ToRegister(instr->key()).is(rcx)); 4282 ASSERT(ToRegister(instr->key()).is(rcx));
4284 ASSERT(ToRegister(instr->value()).is(rax)); 4283 ASSERT(ToRegister(instr->value()).is(rax));
4285 4284
4286 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) 4285 Handle<Code> ic = instr->strict_mode() == STRICT
4287 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 4286 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
4288 : isolate()->builtins()->KeyedStoreIC_Initialize(); 4287 : isolate()->builtins()->KeyedStoreIC_Initialize();
4289 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4288 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4290 } 4289 }
4291 4290
4292 4291
4293 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { 4292 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
4294 Register object_reg = ToRegister(instr->object()); 4293 Register object_reg = ToRegister(instr->object());
4295 4294
4296 Handle<Map> from_map = instr->original_map(); 4295 Handle<Map> from_map = instr->original_map();
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
5206 } 5205 }
5207 } 5206 }
5208 5207
5209 5208
5210 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 5209 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
5211 ASSERT(ToRegister(instr->context()).is(rsi)); 5210 ASSERT(ToRegister(instr->context()).is(rsi));
5212 // Use the fast case closure allocation code that allocates in new 5211 // Use the fast case closure allocation code that allocates in new
5213 // space for nested functions that don't need literals cloning. 5212 // space for nested functions that don't need literals cloning.
5214 bool pretenure = instr->hydrogen()->pretenure(); 5213 bool pretenure = instr->hydrogen()->pretenure();
5215 if (!pretenure && instr->hydrogen()->has_no_literals()) { 5214 if (!pretenure && instr->hydrogen()->has_no_literals()) {
5216 FastNewClosureStub stub(instr->hydrogen()->language_mode(), 5215 FastNewClosureStub stub(instr->hydrogen()->strict_mode(),
5217 instr->hydrogen()->is_generator()); 5216 instr->hydrogen()->is_generator());
5218 __ Move(rbx, instr->hydrogen()->shared_info()); 5217 __ Move(rbx, instr->hydrogen()->shared_info());
5219 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5218 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5220 } else { 5219 } else {
5221 __ push(rsi); 5220 __ push(rsi);
5222 __ Push(instr->hydrogen()->shared_info()); 5221 __ Push(instr->hydrogen()->shared_info());
5223 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex : 5222 __ PushRoot(pretenure ? Heap::kTrueValueRootIndex :
5224 Heap::kFalseValueRootIndex); 5223 Heap::kFalseValueRootIndex);
5225 CallRuntime(Runtime::kNewClosure, 3, instr); 5224 CallRuntime(Runtime::kNewClosure, 3, instr);
5226 } 5225 }
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
5578 FixedArray::kHeaderSize - kPointerSize)); 5577 FixedArray::kHeaderSize - kPointerSize));
5579 __ bind(&done); 5578 __ bind(&done);
5580 } 5579 }
5581 5580
5582 5581
5583 #undef __ 5582 #undef __
5584 5583
5585 } } // namespace v8::internal 5584 } } // namespace v8::internal
5586 5585
5587 #endif // V8_TARGET_ARCH_X64 5586 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698