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

Side by Side Diff: src/hydrogen.cc

Issue 6894043: Crankshaft support for IN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
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 5087 matching lines...) Expand 10 before | Expand all | Expand 10 after
5098 // assumed to stay the same for this instanceof. 5098 // assumed to stay the same for this instanceof.
5099 if (target.is_null()) { 5099 if (target.is_null()) {
5100 HContext* context = new(zone()) HContext; 5100 HContext* context = new(zone()) HContext;
5101 AddInstruction(context); 5101 AddInstruction(context);
5102 instr = new(zone()) HInstanceOf(context, left, right); 5102 instr = new(zone()) HInstanceOf(context, left, right);
5103 } else { 5103 } else {
5104 AddInstruction(new(zone()) HCheckFunction(right, target)); 5104 AddInstruction(new(zone()) HCheckFunction(right, target));
5105 instr = new(zone()) HInstanceOfKnownGlobal(left, target); 5105 instr = new(zone()) HInstanceOfKnownGlobal(left, target);
5106 } 5106 }
5107 } else if (op == Token::IN) { 5107 } else if (op == Token::IN) {
5108 return Bailout("Unsupported comparison: in"); 5108 instr = new(zone()) HIn(left, right);
5109 } else if (type_info.IsNonPrimitive()) { 5109 } else if (type_info.IsNonPrimitive()) {
5110 switch (op) { 5110 switch (op) {
5111 case Token::EQ: 5111 case Token::EQ:
5112 case Token::EQ_STRICT: { 5112 case Token::EQ_STRICT: {
5113 AddInstruction(new(zone()) HCheckNonSmi(left)); 5113 AddInstruction(new(zone()) HCheckNonSmi(left));
5114 AddInstruction(HCheckInstanceType::NewIsJSObjectOrJSFunction(left)); 5114 AddInstruction(HCheckInstanceType::NewIsJSObjectOrJSFunction(left));
5115 AddInstruction(new(zone()) HCheckNonSmi(right)); 5115 AddInstruction(new(zone()) HCheckNonSmi(right));
5116 AddInstruction(HCheckInstanceType::NewIsJSObjectOrJSFunction(right)); 5116 AddInstruction(HCheckInstanceType::NewIsJSObjectOrJSFunction(right));
5117 instr = new(zone()) HCompareJSObjectEq(left, right); 5117 instr = new(zone()) HCompareJSObjectEq(left, right);
5118 break; 5118 break;
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
6071 } 6071 }
6072 } 6072 }
6073 6073
6074 #ifdef DEBUG 6074 #ifdef DEBUG
6075 if (graph_ != NULL) graph_->Verify(); 6075 if (graph_ != NULL) graph_->Verify();
6076 if (allocator_ != NULL) allocator_->Verify(); 6076 if (allocator_ != NULL) allocator_->Verify();
6077 #endif 6077 #endif
6078 } 6078 }
6079 6079
6080 } } // namespace v8::internal 6080 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698