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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 6606006: [Isolates] Merge 6500:6700 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' 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/macro-assembler-ia32.cc ('k') | src/ic.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 // -- edx : receiver 2583 // -- edx : receiver
2584 // -- esp[0] : return address 2584 // -- esp[0] : return address
2585 // ----------------------------------- 2585 // -----------------------------------
2586 Label miss; 2586 Label miss;
2587 2587
2588 // Check that the map of the global has not changed. 2588 // Check that the map of the global has not changed.
2589 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), 2589 __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
2590 Immediate(Handle<Map>(object->map()))); 2590 Immediate(Handle<Map>(object->map())));
2591 __ j(not_equal, &miss, not_taken); 2591 __ j(not_equal, &miss, not_taken);
2592 2592
2593 // Store the value in the cell. 2593
2594 // Compute the cell operand to use.
2595 Operand cell_operand = Operand::Cell(Handle<JSGlobalPropertyCell>(cell));
2594 if (Serializer::enabled()) { 2596 if (Serializer::enabled()) {
2595 __ mov(ecx, Immediate(Handle<JSGlobalPropertyCell>(cell))); 2597 __ mov(ecx, Immediate(Handle<JSGlobalPropertyCell>(cell)));
2596 __ mov(FieldOperand(ecx, JSGlobalPropertyCell::kValueOffset), eax); 2598 cell_operand = FieldOperand(ecx, JSGlobalPropertyCell::kValueOffset);
2597 } else {
2598 __ mov(Operand::Cell(Handle<JSGlobalPropertyCell>(cell)), eax);
2599 } 2599 }
2600 2600
2601 // Check that the value in the cell is not the hole. If it is, this
2602 // cell could have been deleted and reintroducing the global needs
2603 // to update the property details in the property dictionary of the
2604 // global object. We bail out to the runtime system to do that.
2605 __ cmp(cell_operand, FACTORY->the_hole_value());
2606 __ j(equal, &miss);
2607
2608 // Store the value in the cell.
2609 __ mov(cell_operand, eax);
2610
2601 // Return the value (register eax). 2611 // Return the value (register eax).
2602 __ IncrementCounter(COUNTERS->named_store_global_inline(), 1); 2612 __ IncrementCounter(COUNTERS->named_store_global_inline(), 1);
2603 __ ret(0); 2613 __ ret(0);
2604 2614
2605 // Handle store cache miss. 2615 // Handle store cache miss.
2606 __ bind(&miss); 2616 __ bind(&miss);
2607 __ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1); 2617 __ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1);
2608 Handle<Code> ic(Isolate::Current()->builtins()->builtin( 2618 Handle<Code> ic(Isolate::Current()->builtins()->builtin(
2609 Builtins::StoreIC_Miss)); 2619 Builtins::StoreIC_Miss));
2610 __ jmp(ic, RelocInfo::CODE_TARGET); 2620 __ jmp(ic, RelocInfo::CODE_TARGET);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 __ ret(0); 3159 __ ret(0);
3150 3160
3151 __ bind(&miss); 3161 __ bind(&miss);
3152 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3162 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3153 3163
3154 // Return the generated code. 3164 // Return the generated code.
3155 return GetCode(NORMAL, NULL); 3165 return GetCode(NORMAL, NULL);
3156 } 3166 }
3157 3167
3158 3168
3169 MaybeObject* KeyedLoadStubCompiler::CompileLoadPixelArray(JSObject* receiver) {
3170 // ----------- S t a t e -------------
3171 // -- eax : key
3172 // -- edx : receiver
3173 // -- esp[0] : return address
3174 // -----------------------------------
3175 Label miss;
3176
3177 // Check that the map matches.
3178 __ CheckMap(edx, Handle<Map>(receiver->map()), &miss, false);
3179
3180 GenerateFastPixelArrayLoad(masm(),
3181 edx,
3182 eax,
3183 ecx,
3184 ebx,
3185 eax,
3186 &miss,
3187 &miss,
3188 &miss);
3189
3190 // Handle load cache miss.
3191 __ bind(&miss);
3192 Handle<Code> ic(Isolate::Current()->builtins()->builtin(
3193 Builtins::KeyedLoadIC_Miss));
3194 __ jmp(ic, RelocInfo::CODE_TARGET);
3195
3196 // Return the generated code.
3197 return GetCode(NORMAL, NULL);
3198 }
3199
3200
3159 // Specialized stub for constructing objects from functions which only have only 3201 // Specialized stub for constructing objects from functions which only have only
3160 // simple assignments of the form this.x = ...; in their body. 3202 // simple assignments of the form this.x = ...; in their body.
3161 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { 3203 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
3162 // ----------- S t a t e ------------- 3204 // ----------- S t a t e -------------
3163 // -- eax : argc 3205 // -- eax : argc
3164 // -- edi : constructor 3206 // -- edi : constructor
3165 // -- esp[0] : return address 3207 // -- esp[0] : return address
3166 // -- esp[4] : last argument 3208 // -- esp[4] : last argument
3167 // ----------------------------------- 3209 // -----------------------------------
3168 Label generic_stub_call; 3210 Label generic_stub_call;
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 3693
3652 return GetCode(flags); 3694 return GetCode(flags);
3653 } 3695 }
3654 3696
3655 3697
3656 #undef __ 3698 #undef __
3657 3699
3658 } } // namespace v8::internal 3700 } } // namespace v8::internal
3659 3701
3660 #endif // V8_TARGET_ARCH_IA32 3702 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698