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

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

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. 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
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 } 2123 }
2124 } 2124 }
2125 2125
2126 2126
2127 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2127 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2128 ASSERT(ToRegister(instr->context()).is(esi)); 2128 ASSERT(ToRegister(instr->context()).is(esi));
2129 ASSERT(ToRegister(instr->object()).is(eax)); 2129 ASSERT(ToRegister(instr->object()).is(eax));
2130 ASSERT(ToRegister(instr->result()).is(eax)); 2130 ASSERT(ToRegister(instr->result()).is(eax));
2131 2131
2132 __ mov(ecx, instr->name()); 2132 __ mov(ecx, instr->name());
2133 Handle<Code> ic(isolate()->builtins()->builtin(Builtins::LoadIC_Initialize)); 2133 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2134 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2134 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2135 } 2135 }
2136 2136
2137 2137
2138 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2138 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2139 Register function = ToRegister(instr->function()); 2139 Register function = ToRegister(instr->function());
2140 Register temp = ToRegister(instr->TempAt(0)); 2140 Register temp = ToRegister(instr->TempAt(0));
2141 Register result = ToRegister(instr->result()); 2141 Register result = ToRegister(instr->result());
2142 2142
2143 // Check that the function really is a function. 2143 // Check that the function really is a function.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 // Load the result. 2248 // Load the result.
2249 __ movzx_b(result, Operand(external_pointer, key, times_1, 0)); 2249 __ movzx_b(result, Operand(external_pointer, key, times_1, 0));
2250 } 2250 }
2251 2251
2252 2252
2253 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2253 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
2254 ASSERT(ToRegister(instr->context()).is(esi)); 2254 ASSERT(ToRegister(instr->context()).is(esi));
2255 ASSERT(ToRegister(instr->object()).is(edx)); 2255 ASSERT(ToRegister(instr->object()).is(edx));
2256 ASSERT(ToRegister(instr->key()).is(eax)); 2256 ASSERT(ToRegister(instr->key()).is(eax));
2257 2257
2258 Handle<Code> ic(isolate()->builtins()->builtin( 2258 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
2259 Builtins::KeyedLoadIC_Initialize));
2260 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2259 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2261 } 2260 }
2262 2261
2263 2262
2264 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2263 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2265 Register result = ToRegister(instr->result()); 2264 Register result = ToRegister(instr->result());
2266 2265
2267 // Check for arguments adapter frame. 2266 // Check for arguments adapter frame.
2268 NearLabel done, adapted; 2267 NearLabel done, adapted;
2269 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); 2268 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
2806 __ mov(edi, instr->target()); 2805 __ mov(edi, instr->target());
2807 CallKnownFunction(instr->target(), instr->arity(), instr); 2806 CallKnownFunction(instr->target(), instr->arity(), instr);
2808 } 2807 }
2809 2808
2810 2809
2811 void LCodeGen::DoCallNew(LCallNew* instr) { 2810 void LCodeGen::DoCallNew(LCallNew* instr) {
2812 ASSERT(ToRegister(instr->context()).is(esi)); 2811 ASSERT(ToRegister(instr->context()).is(esi));
2813 ASSERT(ToRegister(instr->constructor()).is(edi)); 2812 ASSERT(ToRegister(instr->constructor()).is(edi));
2814 ASSERT(ToRegister(instr->result()).is(eax)); 2813 ASSERT(ToRegister(instr->result()).is(eax));
2815 2814
2816 Handle<Code> builtin(isolate()->builtins()->builtin( 2815 Handle<Code> builtin = isolate()->builtins()->JSConstructCall();
2817 Builtins::JSConstructCall));
2818 __ Set(eax, Immediate(instr->arity())); 2816 __ Set(eax, Immediate(instr->arity()));
2819 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); 2817 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr);
2820 } 2818 }
2821 2819
2822 2820
2823 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 2821 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
2824 CallRuntime(instr->function(), instr->arity(), instr, false); 2822 CallRuntime(instr->function(), instr->arity(), instr, false);
2825 } 2823 }
2826 2824
2827 2825
(...skipping 26 matching lines...) Expand all
2854 } 2852 }
2855 } 2853 }
2856 2854
2857 2855
2858 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 2856 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
2859 ASSERT(ToRegister(instr->context()).is(esi)); 2857 ASSERT(ToRegister(instr->context()).is(esi));
2860 ASSERT(ToRegister(instr->object()).is(edx)); 2858 ASSERT(ToRegister(instr->object()).is(edx));
2861 ASSERT(ToRegister(instr->value()).is(eax)); 2859 ASSERT(ToRegister(instr->value()).is(eax));
2862 2860
2863 __ mov(ecx, instr->name()); 2861 __ mov(ecx, instr->name());
2864 Handle<Code> ic(isolate()->builtins()->builtin( 2862 Handle<Code> ic = info_->is_strict()
2865 info_->is_strict() ? Builtins::StoreIC_Initialize_Strict 2863 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2866 : Builtins::StoreIC_Initialize)); 2864 : isolate()->builtins()->StoreIC_Initialize();
2867 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2865 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2868 } 2866 }
2869 2867
2870 2868
2871 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 2869 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
2872 __ cmp(ToRegister(instr->index()), ToOperand(instr->length())); 2870 __ cmp(ToRegister(instr->index()), ToOperand(instr->length()));
2873 DeoptimizeIf(above_equal, instr->environment()); 2871 DeoptimizeIf(above_equal, instr->environment());
2874 } 2872 }
2875 2873
2876 2874
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 } 2922 }
2925 } 2923 }
2926 2924
2927 2925
2928 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 2926 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
2929 ASSERT(ToRegister(instr->context()).is(esi)); 2927 ASSERT(ToRegister(instr->context()).is(esi));
2930 ASSERT(ToRegister(instr->object()).is(edx)); 2928 ASSERT(ToRegister(instr->object()).is(edx));
2931 ASSERT(ToRegister(instr->key()).is(ecx)); 2929 ASSERT(ToRegister(instr->key()).is(ecx));
2932 ASSERT(ToRegister(instr->value()).is(eax)); 2930 ASSERT(ToRegister(instr->value()).is(eax));
2933 2931
2934 Handle<Code> ic(isolate()->builtins()->builtin( 2932 Handle<Code> ic = info_->is_strict()
2935 info_->is_strict() ? Builtins::KeyedStoreIC_Initialize_Strict 2933 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
2936 : Builtins::KeyedStoreIC_Initialize)); 2934 : isolate()->builtins()->KeyedStoreIC_Initialize();
2937 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2935 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2938 } 2936 }
2939 2937
2940 2938
2941 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 2939 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
2942 class DeferredStringCharCodeAt: public LDeferredCode { 2940 class DeferredStringCharCodeAt: public LDeferredCode {
2943 public: 2941 public:
2944 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 2942 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
2945 : LDeferredCode(codegen), instr_(instr) { } 2943 : LDeferredCode(codegen), instr_(instr) { }
2946 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } 2944 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); }
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 ASSERT(osr_pc_offset_ == -1); 4008 ASSERT(osr_pc_offset_ == -1);
4011 osr_pc_offset_ = masm()->pc_offset(); 4009 osr_pc_offset_ = masm()->pc_offset();
4012 } 4010 }
4013 4011
4014 4012
4015 #undef __ 4013 #undef __
4016 4014
4017 } } // namespace v8::internal 4015 } } // namespace v8::internal
4018 4016
4019 #endif // V8_TARGET_ARCH_IA32 4017 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698