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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 5883003: Fix issue 974. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Better instruction sequence for x64. Created 10 years 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/full-codegen-ia32.cc ('k') | test/mjsunit/regress/regress-974.js » ('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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 { Comment cmnt(masm_, "[ return <undefined>;"); 193 { Comment cmnt(masm_, "[ return <undefined>;");
194 // Emit a 'return undefined' in case control fell off the end of the body. 194 // Emit a 'return undefined' in case control fell off the end of the body.
195 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); 195 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
196 EmitReturnSequence(); 196 EmitReturnSequence();
197 } 197 }
198 } 198 }
199 199
200 200
201 void FullCodeGenerator::ClearAccumulator() {
202 __ xor(rax, rax);
203 }
204
205
201 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) { 206 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) {
202 Comment cmnt(masm_, "[ Stack check"); 207 Comment cmnt(masm_, "[ Stack check");
203 NearLabel ok; 208 NearLabel ok;
204 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); 209 __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
205 __ j(above_equal, &ok); 210 __ j(above_equal, &ok);
206 StackCheckStub stub; 211 StackCheckStub stub;
207 __ CallStub(&stub); 212 __ CallStub(&stub);
208 __ bind(&ok); 213 __ bind(&ok);
209 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); 214 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
210 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); 215 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS);
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 __ ret(0); 3521 __ ret(0);
3517 } 3522 }
3518 3523
3519 3524
3520 #undef __ 3525 #undef __
3521 3526
3522 3527
3523 } } // namespace v8::internal 3528 } } // namespace v8::internal
3524 3529
3525 #endif // V8_TARGET_ARCH_X64 3530 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | test/mjsunit/regress/regress-974.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698