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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 150018: Optimize %IsConstructCall() on IA-32. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 3272 matching lines...) Expand 10 before | Expand all | Expand 10 after
3283 __ and_(r1, r0, Operand(kSmiTagMask)); 3283 __ and_(r1, r0, Operand(kSmiTagMask));
3284 __ eor(r1, r1, Operand(kSmiTagMask), SetCC); 3284 __ eor(r1, r1, Operand(kSmiTagMask), SetCC);
3285 answer.Branch(ne); 3285 answer.Branch(ne);
3286 // It is a heap object - get the map. Check if the object is a JS array. 3286 // It is a heap object - get the map. Check if the object is a JS array.
3287 __ CompareObjectType(r0, r1, r1, JS_ARRAY_TYPE); 3287 __ CompareObjectType(r0, r1, r1, JS_ARRAY_TYPE);
3288 answer.Bind(); 3288 answer.Bind();
3289 cc_reg_ = eq; 3289 cc_reg_ = eq;
3290 } 3290 }
3291 3291
3292 3292
3293 void CodeGenerator::GenerateIsConstructCall(ZoneList<Expression*>* args) {
3294 VirtualFrame::SpilledScope spilled_scope;
3295 ASSERT(args->length() == 0);
3296 frame_->CallRuntime(Runtime::kIsConstructCall, 0);
3297 frame_->EmitPush(r0);
3298 }
3299
3300
3293 void CodeGenerator::GenerateArgumentsLength(ZoneList<Expression*>* args) { 3301 void CodeGenerator::GenerateArgumentsLength(ZoneList<Expression*>* args) {
3294 VirtualFrame::SpilledScope spilled_scope; 3302 VirtualFrame::SpilledScope spilled_scope;
3295 ASSERT(args->length() == 0); 3303 ASSERT(args->length() == 0);
3296 3304
3297 // Seed the result with the formal parameters count, which will be used 3305 // Seed the result with the formal parameters count, which will be used
3298 // in case no arguments adaptor frame is found below the current frame. 3306 // in case no arguments adaptor frame is found below the current frame.
3299 __ mov(r0, Operand(Smi::FromInt(scope_->num_parameters()))); 3307 __ mov(r0, Operand(Smi::FromInt(scope_->num_parameters())));
3300 3308
3301 // Call the shared stub to get to the arguments.length. 3309 // Call the shared stub to get to the arguments.length.
3302 ArgumentsAccessStub stub(ArgumentsAccessStub::READ_LENGTH); 3310 ArgumentsAccessStub stub(ArgumentsAccessStub::READ_LENGTH);
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after
5625 __ mov(r2, Operand(0)); 5633 __ mov(r2, Operand(0));
5626 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); 5634 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
5627 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), 5635 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)),
5628 RelocInfo::CODE_TARGET); 5636 RelocInfo::CODE_TARGET);
5629 } 5637 }
5630 5638
5631 5639
5632 #undef __ 5640 #undef __
5633 5641
5634 } } // namespace v8::internal 5642 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/codegen.cc » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698