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

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 149522: Add support for tracking down leak of the hole value. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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/api.h ('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 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 7573 matching lines...) Expand 10 before | Expand all | Expand 10 after
7584 // Call C function. 7584 // Call C function.
7585 __ mov(Operand(esp, 0 * kPointerSize), edi); // argc. 7585 __ mov(Operand(esp, 0 * kPointerSize), edi); // argc.
7586 __ mov(Operand(esp, 1 * kPointerSize), esi); // argv. 7586 __ mov(Operand(esp, 1 * kPointerSize), esi); // argv.
7587 __ call(Operand(ebx)); 7587 __ call(Operand(ebx));
7588 // Result is in eax or edx:eax - do not destroy these registers! 7588 // Result is in eax or edx:eax - do not destroy these registers!
7589 7589
7590 if (always_allocate_scope) { 7590 if (always_allocate_scope) {
7591 __ dec(Operand::StaticVariable(scope_depth)); 7591 __ dec(Operand::StaticVariable(scope_depth));
7592 } 7592 }
7593 7593
7594 // Make sure we're not trying to return 'the hole' from the runtime
7595 // call as this may lead to crashes in the IC code later.
7596 if (FLAG_debug_code) {
7597 Label okay;
7598 __ cmp(Operand(eax), Immediate(Factory::the_hole_value()));
Kevin Millikin (Chromium) 2009/07/13 09:10:07 There is a cmp(Register, Handle<Object>) assembler
7599 __ j(not_equal, &okay);
7600 __ int3();
7601 __ bind(&okay);
7602 }
7603
7594 // Check for failure result. 7604 // Check for failure result.
7595 Label failure_returned; 7605 Label failure_returned;
7596 ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); 7606 ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0);
7597 __ lea(ecx, Operand(eax, 1)); 7607 __ lea(ecx, Operand(eax, 1));
7598 // Lower 2 bits of ecx are 0 iff eax has failure tag. 7608 // Lower 2 bits of ecx are 0 iff eax has failure tag.
7599 __ test(ecx, Immediate(kFailureTagMask)); 7609 __ test(ecx, Immediate(kFailureTagMask));
7600 __ j(zero, &failure_returned, not_taken); 7610 __ j(zero, &failure_returned, not_taken);
7601 7611
7602 // Exit the JavaScript to C++ exit frame. 7612 // Exit the JavaScript to C++ exit frame.
7603 __ LeaveExitFrame(frame_type); 7613 __ LeaveExitFrame(frame_type);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
7911 7921
7912 int CompareStub::MinorKey() { 7922 int CompareStub::MinorKey() {
7913 // Encode the two parameters in a unique 16 bit value. 7923 // Encode the two parameters in a unique 16 bit value.
7914 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 7924 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
7915 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 7925 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
7916 } 7926 }
7917 7927
7918 #undef __ 7928 #undef __
7919 7929
7920 } } // namespace v8::internal 7930 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698