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

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

Issue 5828004: IA32: Optimize instanceof... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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
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 4021 matching lines...) Expand 10 before | Expand all | Expand 10 after
4032 case Token::IN: 4032 case Token::IN:
4033 VisitForStackValue(expr->right()); 4033 VisitForStackValue(expr->right());
4034 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 4034 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
4035 PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); 4035 PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL);
4036 __ cmp(eax, Factory::true_value()); 4036 __ cmp(eax, Factory::true_value());
4037 Split(equal, if_true, if_false, fall_through); 4037 Split(equal, if_true, if_false, fall_through);
4038 break; 4038 break;
4039 4039
4040 case Token::INSTANCEOF: { 4040 case Token::INSTANCEOF: {
4041 VisitForStackValue(expr->right()); 4041 VisitForStackValue(expr->right());
4042 InstanceofStub stub; 4042 __ IncrementCounter(&Counters::instance_of_full, 1);
4043 InstanceofStub stub(InstanceofStub::kNoFlags);
4043 __ CallStub(&stub); 4044 __ CallStub(&stub);
4044 PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false); 4045 PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);
4045 __ test(eax, Operand(eax)); 4046 __ test(eax, Operand(eax));
4046 // The stub returns 0 for true. 4047 // The stub returns 0 for true.
4047 Split(zero, if_true, if_false, fall_through); 4048 Split(zero, if_true, if_false, fall_through);
4048 break; 4049 break;
4049 } 4050 }
4050 4051
4051 default: { 4052 default: {
4052 VisitForAccumulatorValue(expr->right()); 4053 VisitForAccumulatorValue(expr->right());
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
4256 // And return. 4257 // And return.
4257 __ ret(0); 4258 __ ret(0);
4258 } 4259 }
4259 4260
4260 4261
4261 #undef __ 4262 #undef __
4262 4263
4263 } } // namespace v8::internal 4264 } } // namespace v8::internal
4264 4265
4265 #endif // V8_TARGET_ARCH_IA32 4266 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | src/v8-counters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698