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

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

Issue 7778013: NewGC: Merge bleeding edge up to 9009. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 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') | src/zone.h » ('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 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after
3260 3260
3261 // This stub is meant to be tail-jumped to, the receiver must already 3261 // This stub is meant to be tail-jumped to, the receiver must already
3262 // have been verified by the caller to not be a smi. 3262 // have been verified by the caller to not be a smi.
3263 3263
3264 // Check that the key is a smi. 3264 // Check that the key is a smi.
3265 __ JumpIfNotSmi(rax, &miss_force_generic); 3265 __ JumpIfNotSmi(rax, &miss_force_generic);
3266 3266
3267 // Check that the index is in range. 3267 // Check that the index is in range.
3268 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 3268 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
3269 __ SmiToInteger32(rcx, rax); 3269 __ SmiToInteger32(rcx, rax);
3270 __ cmpl(rcx, FieldOperand(rbx, ExternalArray::kLengthOffset)); 3270 __ cmpq(rax, FieldOperand(rbx, ExternalArray::kLengthOffset));
3271 // Unsigned comparison catches both negative and too-large values. 3271 // Unsigned comparison catches both negative and too-large values.
3272 __ j(above_equal, &miss_force_generic); 3272 __ j(above_equal, &miss_force_generic);
3273 3273
3274 // rax: index (as a smi) 3274 // rax: index (as a smi)
3275 // rdx: receiver (JSObject) 3275 // rdx: receiver (JSObject)
3276 // rcx: untagged index 3276 // rcx: untagged index
3277 // rbx: elements array 3277 // rbx: elements array
3278 __ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset)); 3278 __ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset));
3279 // rbx: base pointer of external storage 3279 // rbx: base pointer of external storage
3280 switch (elements_kind) { 3280 switch (elements_kind) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3395 3395
3396 // This stub is meant to be tail-jumped to, the receiver must already 3396 // This stub is meant to be tail-jumped to, the receiver must already
3397 // have been verified by the caller to not be a smi. 3397 // have been verified by the caller to not be a smi.
3398 3398
3399 // Check that the key is a smi. 3399 // Check that the key is a smi.
3400 __ JumpIfNotSmi(rcx, &miss_force_generic); 3400 __ JumpIfNotSmi(rcx, &miss_force_generic);
3401 3401
3402 // Check that the index is in range. 3402 // Check that the index is in range.
3403 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); 3403 __ movq(rbx, FieldOperand(rdx, JSObject::kElementsOffset));
3404 __ SmiToInteger32(rdi, rcx); // Untag the index. 3404 __ SmiToInteger32(rdi, rcx); // Untag the index.
3405 __ cmpl(rdi, FieldOperand(rbx, ExternalArray::kLengthOffset)); 3405 __ cmpq(rcx, FieldOperand(rbx, ExternalArray::kLengthOffset));
3406 // Unsigned comparison catches both negative and too-large values. 3406 // Unsigned comparison catches both negative and too-large values.
3407 __ j(above_equal, &miss_force_generic); 3407 __ j(above_equal, &miss_force_generic);
3408 3408
3409 // Handle both smis and HeapNumbers in the fast path. Go to the 3409 // Handle both smis and HeapNumbers in the fast path. Go to the
3410 // runtime for all other kinds of values. 3410 // runtime for all other kinds of values.
3411 // rax: value 3411 // rax: value
3412 // rcx: key (a smi) 3412 // rcx: key (a smi)
3413 // rdx: receiver (a JSObject) 3413 // rdx: receiver (a JSObject)
3414 // rbx: elements array 3414 // rbx: elements array
3415 // rdi: untagged key 3415 // rdi: untagged key
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
3791 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 3791 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
3792 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); 3792 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
3793 } 3793 }
3794 3794
3795 3795
3796 #undef __ 3796 #undef __
3797 3797
3798 } } // namespace v8::internal 3798 } } // namespace v8::internal
3799 3799
3800 #endif // V8_TARGET_ARCH_X64 3800 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | src/zone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698