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

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

Issue 6542011: X64 Crankshaft: Implement LValueOf and (dummy) LArgumentsObject. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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
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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 923
924 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { 924 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) {
925 Register result = ToRegister(instr->result()); 925 Register result = ToRegister(instr->result());
926 Register array = ToRegister(instr->InputAt(0)); 926 Register array = ToRegister(instr->InputAt(0));
927 __ movq(result, FieldOperand(array, PixelArray::kLengthOffset)); 927 __ movq(result, FieldOperand(array, PixelArray::kLengthOffset));
928 } 928 }
929 929
930 930
931 void LCodeGen::DoValueOf(LValueOf* instr) { 931 void LCodeGen::DoValueOf(LValueOf* instr) {
932 Abort("Unimplemented: %s", "DoValueOf"); 932 Register input = ToRegister(instr->InputAt(0));
933 Register result = ToRegister(instr->result());
934 ASSERT(input.is(result));
935 NearLabel done;
936 // If the object is a smi return the object.
937 __ JumpIfSmi(input, &done);
938
939 // If the object is not a value type, return the object.
940 __ CmpObjectType(input, JS_VALUE_TYPE, kScratchRegister);
941 __ j(not_equal, &done);
942 __ movq(result, FieldOperand(input, JSValue::kValueOffset));
943
944 __ bind(&done);
933 } 945 }
934 946
935 947
936 void LCodeGen::DoBitNotI(LBitNotI* instr) { 948 void LCodeGen::DoBitNotI(LBitNotI* instr) {
937 LOperand* input = instr->InputAt(0); 949 LOperand* input = instr->InputAt(0);
938 ASSERT(input->Equals(instr->result())); 950 ASSERT(input->Equals(instr->result()));
939 __ not_(ToRegister(input)); 951 __ not_(ToRegister(input));
940 } 952 }
941 953
942 954
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2843 RegisterEnvironmentForDeoptimization(environment); 2855 RegisterEnvironmentForDeoptimization(environment);
2844 ASSERT(osr_pc_offset_ == -1); 2856 ASSERT(osr_pc_offset_ == -1);
2845 osr_pc_offset_ = masm()->pc_offset(); 2857 osr_pc_offset_ = masm()->pc_offset();
2846 } 2858 }
2847 2859
2848 #undef __ 2860 #undef __
2849 2861
2850 } } // namespace v8::internal 2862 } } // namespace v8::internal
2851 2863
2852 #endif // V8_TARGET_ARCH_X64 2864 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698