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

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

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: 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/x64/codegen-x64.cc ('k') | src/x64/ic-x64.cc » ('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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 { Comment cmnt(masm_, "[ return <undefined>;"); 195 { Comment cmnt(masm_, "[ return <undefined>;");
196 // Emit a 'return undefined' in case control fell off the end of the body. 196 // Emit a 'return undefined' in case control fell off the end of the body.
197 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); 197 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
198 EmitReturnSequence(); 198 EmitReturnSequence();
199 } 199 }
200 } 200 }
201 201
202 202
203 void FullCodeGenerator::ClearAccumulator() {
204 __ xor_(rax, rax);
205 }
206
207
203 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) { 208 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) {
204 Comment cmnt(masm_, "[ Stack check"); 209 Comment cmnt(masm_, "[ Stack check");
205 NearLabel ok; 210 NearLabel ok;
206 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); 211 __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
207 __ j(above_equal, &ok); 212 __ j(above_equal, &ok);
208 StackCheckStub stub; 213 StackCheckStub stub;
209 __ CallStub(&stub); 214 __ CallStub(&stub);
210 __ bind(&ok); 215 __ bind(&ok);
211 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); 216 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
212 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); 217 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS);
(...skipping 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3337 switch (op) { 3342 switch (op) {
3338 case Token::IN: 3343 case Token::IN:
3339 VisitForStackValue(expr->right()); 3344 VisitForStackValue(expr->right());
3340 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 3345 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
3341 __ CompareRoot(rax, Heap::kTrueValueRootIndex); 3346 __ CompareRoot(rax, Heap::kTrueValueRootIndex);
3342 Split(equal, if_true, if_false, fall_through); 3347 Split(equal, if_true, if_false, fall_through);
3343 break; 3348 break;
3344 3349
3345 case Token::INSTANCEOF: { 3350 case Token::INSTANCEOF: {
3346 VisitForStackValue(expr->right()); 3351 VisitForStackValue(expr->right());
3347 InstanceofStub stub; 3352 InstanceofStub stub(InstanceofStub::kNoFlags);
3348 __ CallStub(&stub); 3353 __ CallStub(&stub);
3349 __ testq(rax, rax); 3354 __ testq(rax, rax);
3350 // The stub returns 0 for true. 3355 // The stub returns 0 for true.
3351 Split(zero, if_true, if_false, fall_through); 3356 Split(zero, if_true, if_false, fall_through);
3352 break; 3357 break;
3353 } 3358 }
3354 3359
3355 default: { 3360 default: {
3356 VisitForAccumulatorValue(expr->right()); 3361 VisitForAccumulatorValue(expr->right());
3357 Condition cc = no_condition; 3362 Condition cc = no_condition;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3529 __ ret(0); 3534 __ ret(0);
3530 } 3535 }
3531 3536
3532 3537
3533 #undef __ 3538 #undef __
3534 3539
3535 3540
3536 } } // namespace v8::internal 3541 } } // namespace v8::internal
3537 3542
3538 #endif // V8_TARGET_ARCH_X64 3543 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698