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

Side by Side Diff: src/x64/stub-cache-x64.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/x64/macro-assembler-x64.cc ('k') | test/cctest/cctest.status » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 // -- rdx : receiver 2437 // -- rdx : receiver
2438 // -- rsp[0] : return address 2438 // -- rsp[0] : return address
2439 // ----------------------------------- 2439 // -----------------------------------
2440 Label miss; 2440 Label miss;
2441 2441
2442 // Check that the map of the global has not changed. 2442 // Check that the map of the global has not changed.
2443 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset), 2443 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),
2444 Handle<Map>(object->map())); 2444 Handle<Map>(object->map()));
2445 __ j(not_equal, &miss); 2445 __ j(not_equal, &miss);
2446 2446
2447 // Check that the value in the cell is not the hole. If it is, this
2448 // cell could have been deleted and reintroducing the global needs
2449 // to update the property details in the property dictionary of the
2450 // global object. We bail out to the runtime system to do that.
2451 __ Move(rbx, Handle<JSGlobalPropertyCell>(cell));
2452 __ CompareRoot(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset),
2453 Heap::kTheHoleValueRootIndex);
2454 __ j(equal, &miss);
2455
2447 // Store the value in the cell. 2456 // Store the value in the cell.
2448 __ Move(rcx, Handle<JSGlobalPropertyCell>(cell)); 2457 __ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), rax);
2449 __ movq(FieldOperand(rcx, JSGlobalPropertyCell::kValueOffset), rax);
2450 2458
2451 // Return the value (register rax). 2459 // Return the value (register rax).
2452 __ IncrementCounter(COUNTERS->named_store_global_inline(), 1); 2460 __ IncrementCounter(COUNTERS->named_store_global_inline(), 1);
2453 __ ret(0); 2461 __ ret(0);
2454 2462
2455 // Handle store cache miss. 2463 // Handle store cache miss.
2456 __ bind(&miss); 2464 __ bind(&miss);
2457 __ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1); 2465 __ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1);
2458 Handle<Code> ic(Isolate::Current()->builtins()->builtin( 2466 Handle<Code> ic(Isolate::Current()->builtins()->builtin(
2459 Builtins::StoreIC_Miss)); 2467 Builtins::StoreIC_Miss));
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2992 __ ret(0); 3000 __ ret(0);
2993 3001
2994 __ bind(&miss); 3002 __ bind(&miss);
2995 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); 3003 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
2996 3004
2997 // Return the generated code. 3005 // Return the generated code.
2998 return GetCode(NORMAL, NULL); 3006 return GetCode(NORMAL, NULL);
2999 } 3007 }
3000 3008
3001 3009
3010 MaybeObject* KeyedLoadStubCompiler::CompileLoadPixelArray(JSObject* receiver) {
3011 // ----------- S t a t e -------------
3012 // -- rax : key
3013 // -- rdx : receiver
3014 // -- esp[0] : return address
3015 // -----------------------------------
3016 Label miss;
3017
3018 // Check that the map matches.
3019 __ CheckMap(rdx, Handle<Map>(receiver->map()), &miss, false);
3020
3021 GenerateFastPixelArrayLoad(masm(),
3022 rdx,
3023 rax,
3024 rbx,
3025 rcx,
3026 rax,
3027 &miss,
3028 &miss,
3029 &miss);
3030
3031 __ bind(&miss);
3032 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
3033
3034 // Return the generated code.
3035 return GetCode(NORMAL, NULL);
3036 }
3037
3038
3002 // Specialized stub for constructing objects from functions which only have only 3039 // Specialized stub for constructing objects from functions which only have only
3003 // simple assignments of the form this.x = ...; in their body. 3040 // simple assignments of the form this.x = ...; in their body.
3004 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { 3041 MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) {
3005 // ----------- S t a t e ------------- 3042 // ----------- S t a t e -------------
3006 // -- rax : argc 3043 // -- rax : argc
3007 // -- rdi : constructor 3044 // -- rdi : constructor
3008 // -- rsp[0] : return address 3045 // -- rsp[0] : return address
3009 // -- rsp[4] : last argument 3046 // -- rsp[4] : last argument
3010 // ----------------------------------- 3047 // -----------------------------------
3011 Label generic_stub_call; 3048 Label generic_stub_call;
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
3429 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); 3466 __ TailCallRuntime(Runtime::kSetProperty, 3, 1);
3430 3467
3431 return GetCode(flags); 3468 return GetCode(flags);
3432 } 3469 }
3433 3470
3434 #undef __ 3471 #undef __
3435 3472
3436 } } // namespace v8::internal 3473 } } // namespace v8::internal
3437 3474
3438 #endif // V8_TARGET_ARCH_X64 3475 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698