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

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

Issue 8932004: Implement target cache for constructor calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov. Created 8 years, 10 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3193 __ LoadHeapObject(edi, instr->target()); 3193 __ LoadHeapObject(edi, instr->target());
3194 CallKnownFunction(instr->target(), instr->arity(), instr, CALL_AS_FUNCTION); 3194 CallKnownFunction(instr->target(), instr->arity(), instr, CALL_AS_FUNCTION);
3195 } 3195 }
3196 3196
3197 3197
3198 void LCodeGen::DoCallNew(LCallNew* instr) { 3198 void LCodeGen::DoCallNew(LCallNew* instr) {
3199 ASSERT(ToRegister(instr->context()).is(esi)); 3199 ASSERT(ToRegister(instr->context()).is(esi));
3200 ASSERT(ToRegister(instr->constructor()).is(edi)); 3200 ASSERT(ToRegister(instr->constructor()).is(edi));
3201 ASSERT(ToRegister(instr->result()).is(eax)); 3201 ASSERT(ToRegister(instr->result()).is(eax));
3202 3202
3203 Handle<Code> builtin = isolate()->builtins()->JSConstructCall(); 3203 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
3204 __ Set(eax, Immediate(instr->arity())); 3204 __ Set(eax, Immediate(instr->arity()));
3205 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); 3205 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr);
3206 } 3206 }
3207 3207
3208 3208
3209 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 3209 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
3210 CallRuntime(instr->function(), instr->arity(), instr); 3210 CallRuntime(instr->function(), instr->arity(), instr);
3211 } 3211 }
3212 3212
3213 3213
3214 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 3214 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
3215 Register object = ToRegister(instr->object()); 3215 Register object = ToRegister(instr->object());
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
4662 this, pointers, Safepoint::kLazyDeopt); 4662 this, pointers, Safepoint::kLazyDeopt);
4663 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4663 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4664 } 4664 }
4665 4665
4666 4666
4667 #undef __ 4667 #undef __
4668 4668
4669 } } // namespace v8::internal 4669 } } // namespace v8::internal
4670 4670
4671 #endif // V8_TARGET_ARCH_IA32 4671 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mark-compact.cc » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698