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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 } 2202 }
2203 } 2203 }
2204 2204
2205 2205
2206 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2206 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2207 ASSERT(ToRegister(instr->object()).is(r0)); 2207 ASSERT(ToRegister(instr->object()).is(r0));
2208 ASSERT(ToRegister(instr->result()).is(r0)); 2208 ASSERT(ToRegister(instr->result()).is(r0));
2209 2209
2210 // Name is always in r2. 2210 // Name is always in r2.
2211 __ mov(r2, Operand(instr->name())); 2211 __ mov(r2, Operand(instr->name()));
2212 Handle<Code> ic( 2212 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2213 isolate()->builtins()->builtin(Builtins::LoadIC_Initialize));
2214 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2213 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2215 } 2214 }
2216 2215
2217 2216
2218 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2217 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2219 Register scratch = scratch0(); 2218 Register scratch = scratch0();
2220 Register function = ToRegister(instr->function()); 2219 Register function = ToRegister(instr->function());
2221 Register result = ToRegister(instr->result()); 2220 Register result = ToRegister(instr->result());
2222 2221
2223 // Check that the function really is a function. Load map into the 2222 // Check that the function really is a function. Load map into the
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 2333
2335 // Load the result. 2334 // Load the result.
2336 __ ldrb(result, MemOperand(external_pointer, key)); 2335 __ ldrb(result, MemOperand(external_pointer, key));
2337 } 2336 }
2338 2337
2339 2338
2340 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2339 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
2341 ASSERT(ToRegister(instr->object()).is(r1)); 2340 ASSERT(ToRegister(instr->object()).is(r1));
2342 ASSERT(ToRegister(instr->key()).is(r0)); 2341 ASSERT(ToRegister(instr->key()).is(r0));
2343 2342
2344 Handle<Code> ic(isolate()->builtins()->builtin( 2343 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
2345 Builtins::KeyedLoadIC_Initialize));
2346 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2344 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2347 } 2345 }
2348 2346
2349 2347
2350 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2348 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2351 Register scratch = scratch0(); 2349 Register scratch = scratch0();
2352 Register result = ToRegister(instr->result()); 2350 Register result = ToRegister(instr->result());
2353 2351
2354 // Check if the calling frame is an arguments adaptor frame. 2352 // Check if the calling frame is an arguments adaptor frame.
2355 Label done, adapted; 2353 Label done, adapted;
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2901 ASSERT(ToRegister(instr->result()).is(r0)); 2899 ASSERT(ToRegister(instr->result()).is(r0));
2902 __ mov(r1, Operand(instr->target())); 2900 __ mov(r1, Operand(instr->target()));
2903 CallKnownFunction(instr->target(), instr->arity(), instr); 2901 CallKnownFunction(instr->target(), instr->arity(), instr);
2904 } 2902 }
2905 2903
2906 2904
2907 void LCodeGen::DoCallNew(LCallNew* instr) { 2905 void LCodeGen::DoCallNew(LCallNew* instr) {
2908 ASSERT(ToRegister(instr->InputAt(0)).is(r1)); 2906 ASSERT(ToRegister(instr->InputAt(0)).is(r1));
2909 ASSERT(ToRegister(instr->result()).is(r0)); 2907 ASSERT(ToRegister(instr->result()).is(r0));
2910 2908
2911 Handle<Code> builtin(isolate()->builtins()->builtin( 2909 Handle<Code> builtin = isolate()->builtins()->JSConstructCall();
2912 Builtins::JSConstructCall));
2913 __ mov(r0, Operand(instr->arity())); 2910 __ mov(r0, Operand(instr->arity()));
2914 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); 2911 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr);
2915 } 2912 }
2916 2913
2917 2914
2918 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 2915 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
2919 CallRuntime(instr->function(), instr->arity(), instr); 2916 CallRuntime(instr->function(), instr->arity(), instr);
2920 } 2917 }
2921 2918
2922 2919
(...skipping 28 matching lines...) Expand all
2951 } 2948 }
2952 } 2949 }
2953 2950
2954 2951
2955 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 2952 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
2956 ASSERT(ToRegister(instr->object()).is(r1)); 2953 ASSERT(ToRegister(instr->object()).is(r1));
2957 ASSERT(ToRegister(instr->value()).is(r0)); 2954 ASSERT(ToRegister(instr->value()).is(r0));
2958 2955
2959 // Name is always in r2. 2956 // Name is always in r2.
2960 __ mov(r2, Operand(instr->name())); 2957 __ mov(r2, Operand(instr->name()));
2961 Handle<Code> ic(isolate()->builtins()->builtin( 2958 Handle<Code> ic = info_->is_strict()
2962 info_->is_strict() ? Builtins::StoreIC_Initialize_Strict 2959 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2963 : Builtins::StoreIC_Initialize)); 2960 : isolate()->builtins()->StoreIC_Initialize();
2964 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2961 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2965 } 2962 }
2966 2963
2967 2964
2968 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 2965 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
2969 __ cmp(ToRegister(instr->index()), ToRegister(instr->length())); 2966 __ cmp(ToRegister(instr->index()), ToRegister(instr->length()));
2970 DeoptimizeIf(hs, instr->environment()); 2967 DeoptimizeIf(hs, instr->environment());
2971 } 2968 }
2972 2969
2973 2970
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 __ Usat(value, 8, Operand(value)); 3003 __ Usat(value, 8, Operand(value));
3007 __ strb(value, MemOperand(external_pointer, key, LSL, 0)); 3004 __ strb(value, MemOperand(external_pointer, key, LSL, 0));
3008 } 3005 }
3009 3006
3010 3007
3011 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 3008 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
3012 ASSERT(ToRegister(instr->object()).is(r2)); 3009 ASSERT(ToRegister(instr->object()).is(r2));
3013 ASSERT(ToRegister(instr->key()).is(r1)); 3010 ASSERT(ToRegister(instr->key()).is(r1));
3014 ASSERT(ToRegister(instr->value()).is(r0)); 3011 ASSERT(ToRegister(instr->value()).is(r0));
3015 3012
3016 Handle<Code> ic(isolate()->builtins()->builtin( 3013 Handle<Code> ic = info_->is_strict()
3017 info_->is_strict() ? Builtins::KeyedStoreIC_Initialize_Strict 3014 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
3018 : Builtins::KeyedStoreIC_Initialize)); 3015 : isolate()->builtins()->KeyedStoreIC_Initialize();
3019 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3016 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3020 } 3017 }
3021 3018
3022 3019
3023 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 3020 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
3024 class DeferredStringCharCodeAt: public LDeferredCode { 3021 class DeferredStringCharCodeAt: public LDeferredCode {
3025 public: 3022 public:
3026 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 3023 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
3027 : LDeferredCode(codegen), instr_(instr) { } 3024 : LDeferredCode(codegen), instr_(instr) { }
3028 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } 3025 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); }
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
4007 ASSERT(!environment->HasBeenRegistered()); 4004 ASSERT(!environment->HasBeenRegistered());
4008 RegisterEnvironmentForDeoptimization(environment); 4005 RegisterEnvironmentForDeoptimization(environment);
4009 ASSERT(osr_pc_offset_ == -1); 4006 ASSERT(osr_pc_offset_ == -1);
4010 osr_pc_offset_ = masm()->pc_offset(); 4007 osr_pc_offset_ = masm()->pc_offset();
4011 } 4008 }
4012 4009
4013 4010
4014 #undef __ 4011 #undef __
4015 4012
4016 } } // namespace v8::internal 4013 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698