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

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

Issue 7356013: Implement Object.prototype.hasOwnProperty in generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 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 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 2541
2542 __ JumpIfSmi(eax, if_false); 2542 __ JumpIfSmi(eax, if_false);
2543 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); 2543 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx);
2544 PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false); 2544 PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);
2545 Split(equal, if_true, if_false, fall_through); 2545 Split(equal, if_true, if_false, fall_through);
2546 2546
2547 context()->Plug(if_true, if_false); 2547 context()->Plug(if_true, if_false);
2548 } 2548 }
2549 2549
2550 2550
2551 void FullCodeGenerator::EmitHasOwnProperty(ZoneList<Expression*>* args) {
2552 ASSERT(args->length() == 2);
2553
2554 VisitForStackValue(args->at(0));
2555 VisitForStackValue(args->at(1));
2556
2557 HasOwnPropertyStub stub;
2558 __ CallStub(&stub);
2559
2560 context()->Plug(eax);
2561 }
2562
2551 2563
2552 void FullCodeGenerator::EmitIsConstructCall(ZoneList<Expression*>* args) { 2564 void FullCodeGenerator::EmitIsConstructCall(ZoneList<Expression*>* args) {
2553 ASSERT(args->length() == 0); 2565 ASSERT(args->length() == 0);
2554 2566
2555 Label materialize_true, materialize_false; 2567 Label materialize_true, materialize_false;
2556 Label* if_true = NULL; 2568 Label* if_true = NULL;
2557 Label* if_false = NULL; 2569 Label* if_false = NULL;
2558 Label* fall_through = NULL; 2570 Label* fall_through = NULL;
2559 context()->PrepareTest(&materialize_true, &materialize_false, 2571 context()->PrepareTest(&materialize_true, &materialize_false,
2560 &if_true, &if_false, &fall_through); 2572 &if_true, &if_false, &fall_through);
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
4251 __ add(Operand(edx), Immediate(masm_->CodeObject())); 4263 __ add(Operand(edx), Immediate(masm_->CodeObject()));
4252 __ jmp(Operand(edx)); 4264 __ jmp(Operand(edx));
4253 } 4265 }
4254 4266
4255 4267
4256 #undef __ 4268 #undef __
4257 4269
4258 } } // namespace v8::internal 4270 } } // namespace v8::internal
4259 4271
4260 #endif // V8_TARGET_ARCH_IA32 4272 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698