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

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

Issue 148453009: Both HGlobalObject and HGlobalReceiver can be replaced with HLoadNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/arm/lithium-arm.cc ('k') | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after
3623 ASSERT(ToRegister(instr->context()).is(cp)); 3623 ASSERT(ToRegister(instr->context()).is(cp));
3624 __ push(cp); // The context is the first argument. 3624 __ push(cp); // The context is the first argument.
3625 __ Move(scratch0(), instr->hydrogen()->pairs()); 3625 __ Move(scratch0(), instr->hydrogen()->pairs());
3626 __ push(scratch0()); 3626 __ push(scratch0());
3627 __ mov(scratch0(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); 3627 __ mov(scratch0(), Operand(Smi::FromInt(instr->hydrogen()->flags())));
3628 __ push(scratch0()); 3628 __ push(scratch0());
3629 CallRuntime(Runtime::kDeclareGlobals, 3, instr); 3629 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
3630 } 3630 }
3631 3631
3632 3632
3633 void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
3634 Register context = ToRegister(instr->context());
3635 Register result = ToRegister(instr->result());
3636 __ ldr(result, ContextOperand(context, Context::GLOBAL_OBJECT_INDEX));
3637 }
3638
3639
3640 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
3641 Register global = ToRegister(instr->global_object());
3642 Register result = ToRegister(instr->result());
3643 __ ldr(result, FieldMemOperand(global, GlobalObject::kGlobalReceiverOffset));
3644 }
3645
3646
3647 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, 3633 void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
3648 int formal_parameter_count, 3634 int formal_parameter_count,
3649 int arity, 3635 int arity,
3650 LInstruction* instr, 3636 LInstruction* instr,
3651 R1State r1_state) { 3637 R1State r1_state) {
3652 bool dont_adapt_arguments = 3638 bool dont_adapt_arguments =
3653 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; 3639 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel;
3654 bool can_invoke_directly = 3640 bool can_invoke_directly =
3655 dont_adapt_arguments || formal_parameter_count == arity; 3641 dont_adapt_arguments || formal_parameter_count == arity;
3656 3642
(...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
5818 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5804 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5819 __ ldr(result, FieldMemOperand(scratch, 5805 __ ldr(result, FieldMemOperand(scratch,
5820 FixedArray::kHeaderSize - kPointerSize)); 5806 FixedArray::kHeaderSize - kPointerSize));
5821 __ bind(&done); 5807 __ bind(&done);
5822 } 5808 }
5823 5809
5824 5810
5825 #undef __ 5811 #undef __
5826 5812
5827 } } // namespace v8::internal 5813 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698