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

Side by Side Diff: src/mips/lithium-codegen-mips.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/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 3486 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { 3497 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
3498 ASSERT(ToRegister(instr->context()).is(cp)); 3498 ASSERT(ToRegister(instr->context()).is(cp));
3499 __ li(scratch0(), instr->hydrogen()->pairs()); 3499 __ li(scratch0(), instr->hydrogen()->pairs());
3500 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); 3500 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags())));
3501 // The context is the first argument. 3501 // The context is the first argument.
3502 __ Push(cp, scratch0(), scratch1()); 3502 __ Push(cp, scratch0(), scratch1());
3503 CallRuntime(Runtime::kDeclareGlobals, 3, instr); 3503 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
3504 } 3504 }
3505 3505
3506 3506
3507 void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
3508 Register context = ToRegister(instr->context());
3509 Register result = ToRegister(instr->result());
3510 __ lw(result, ContextOperand(context, Context::GLOBAL_OBJECT_INDEX));
3511 }
3512
3513
3514 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
3515 Register global = ToRegister(instr->global_object());
3516 Register result = ToRegister(instr->result());
3517 __ lw(result, FieldMemOperand(global, GlobalObject::kGlobalReceiverOffset));
3518 }
3519
3520
3521 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, 3507 void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
3522 int formal_parameter_count, 3508 int formal_parameter_count,
3523 int arity, 3509 int arity,
3524 LInstruction* instr, 3510 LInstruction* instr,
3525 A1State a1_state) { 3511 A1State a1_state) {
3526 bool dont_adapt_arguments = 3512 bool dont_adapt_arguments =
3527 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; 3513 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel;
3528 bool can_invoke_directly = 3514 bool can_invoke_directly =
3529 dont_adapt_arguments || formal_parameter_count == arity; 3515 dont_adapt_arguments || formal_parameter_count == arity;
3530 3516
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
5808 __ Subu(scratch, result, scratch); 5794 __ Subu(scratch, result, scratch);
5809 __ lw(result, FieldMemOperand(scratch, 5795 __ lw(result, FieldMemOperand(scratch,
5810 FixedArray::kHeaderSize - kPointerSize)); 5796 FixedArray::kHeaderSize - kPointerSize));
5811 __ bind(&done); 5797 __ bind(&done);
5812 } 5798 }
5813 5799
5814 5800
5815 #undef __ 5801 #undef __
5816 5802
5817 } } // namespace v8::internal 5803 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698