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

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

Issue 7776010: Convert a bunch of ASSERTs to STATIC_ASSERTs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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') | no next file » | 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 Register receiver, 251 Register receiver,
252 Register scratch, 252 Register scratch,
253 Label* smi, 253 Label* smi,
254 Label* non_string_object) { 254 Label* non_string_object) {
255 // Check that the object isn't a smi. 255 // Check that the object isn't a smi.
256 __ JumpIfSmi(receiver, smi); 256 __ JumpIfSmi(receiver, smi);
257 257
258 // Check that the object is a string. 258 // Check that the object is a string.
259 __ movq(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); 259 __ movq(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
260 __ movzxbq(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); 260 __ movzxbq(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset));
261 ASSERT(kNotStringTag != 0); 261 STATIC_ASSERT(kNotStringTag != 0);
262 __ testl(scratch, Immediate(kNotStringTag)); 262 __ testl(scratch, Immediate(kNotStringTag));
263 __ j(not_zero, non_string_object); 263 __ j(not_zero, non_string_object);
264 } 264 }
265 265
266 266
267 void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm, 267 void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
268 Register receiver, 268 Register receiver,
269 Register scratch1, 269 Register scratch1,
270 Register scratch2, 270 Register scratch2,
271 Label* miss, 271 Label* miss,
(...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after
3063 // code for the function thereby hitting the break points. 3063 // code for the function thereby hitting the break points.
3064 __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 3064 __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
3065 __ movq(rbx, FieldOperand(rbx, SharedFunctionInfo::kDebugInfoOffset)); 3065 __ movq(rbx, FieldOperand(rbx, SharedFunctionInfo::kDebugInfoOffset));
3066 __ cmpq(rbx, r8); 3066 __ cmpq(rbx, r8);
3067 __ j(not_equal, &generic_stub_call); 3067 __ j(not_equal, &generic_stub_call);
3068 #endif 3068 #endif
3069 3069
3070 // Load the initial map and verify that it is in fact a map. 3070 // Load the initial map and verify that it is in fact a map.
3071 __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); 3071 __ movq(rbx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
3072 // Will both indicate a NULL and a Smi. 3072 // Will both indicate a NULL and a Smi.
3073 ASSERT(kSmiTag == 0); 3073 STATIC_ASSERT(kSmiTag == 0);
3074 __ JumpIfSmi(rbx, &generic_stub_call); 3074 __ JumpIfSmi(rbx, &generic_stub_call);
3075 __ CmpObjectType(rbx, MAP_TYPE, rcx); 3075 __ CmpObjectType(rbx, MAP_TYPE, rcx);
3076 __ j(not_equal, &generic_stub_call); 3076 __ j(not_equal, &generic_stub_call);
3077 3077
3078 #ifdef DEBUG 3078 #ifdef DEBUG
3079 // Cannot construct functions this way. 3079 // Cannot construct functions this way.
3080 // rdi: constructor 3080 // rdi: constructor
3081 // rbx: initial map 3081 // rbx: initial map
3082 __ CmpInstanceType(rbx, JS_FUNCTION_TYPE); 3082 __ CmpInstanceType(rbx, JS_FUNCTION_TYPE);
3083 __ Assert(not_equal, "Function constructed by construct stub."); 3083 __ Assert(not_equal, "Function constructed by construct stub.");
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
3767 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 3767 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
3768 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); 3768 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
3769 } 3769 }
3770 3770
3771 3771
3772 #undef __ 3772 #undef __
3773 3773
3774 } } // namespace v8::internal 3774 } } // namespace v8::internal
3775 3775
3776 #endif // V8_TARGET_ARCH_X64 3776 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698