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

Side by Side Diff: src/ia32/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 9122 matching lines...) Expand 10 before | Expand all | Expand 10 after
9133 case Token::IN: { 9133 case Token::IN: {
9134 if (!left_already_loaded) Load(left); 9134 if (!left_already_loaded) Load(left);
9135 Load(right); 9135 Load(right);
9136 Result answer = frame_->InvokeBuiltin(Builtins::IN, CALL_FUNCTION, 2); 9136 Result answer = frame_->InvokeBuiltin(Builtins::IN, CALL_FUNCTION, 2);
9137 frame_->Push(&answer); // push the result 9137 frame_->Push(&answer); // push the result
9138 return; 9138 return;
9139 } 9139 }
9140 case Token::INSTANCEOF: { 9140 case Token::INSTANCEOF: {
9141 if (!left_already_loaded) Load(left); 9141 if (!left_already_loaded) Load(left);
9142 Load(right); 9142 Load(right);
9143 InstanceofStub stub; 9143 InstanceofStub stub(InstanceofStub::kNoFlags);
9144 Result answer = frame_->CallStub(&stub, 2); 9144 Result answer = frame_->CallStub(&stub, 2);
9145 answer.ToRegister(); 9145 answer.ToRegister();
9146 __ test(answer.reg(), Operand(answer.reg())); 9146 __ test(answer.reg(), Operand(answer.reg()));
9147 answer.Unuse(); 9147 answer.Unuse();
9148 destination()->Split(zero); 9148 destination()->Split(zero);
9149 return; 9149 return;
9150 } 9150 }
9151 default: 9151 default:
9152 UNREACHABLE(); 9152 UNREACHABLE();
9153 } 9153 }
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
10224 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 10224 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
10225 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 10225 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
10226 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); 10226 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress());
10227 } 10227 }
10228 10228
10229 #undef __ 10229 #undef __
10230 10230
10231 } } // namespace v8::internal 10231 } } // namespace v8::internal
10232 10232
10233 #endif // V8_TARGET_ARCH_IA32 10233 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/v8-counters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698