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

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

Issue 11635046: Enable type feedback for branch statement and function call (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 12 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
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 if (false_label_ != fall_through_) __ b(false_label_); 668 if (false_label_ != fall_through_) __ b(false_label_);
669 } 669 }
670 } 670 }
671 671
672 672
673 void FullCodeGenerator::DoTest(Expression* condition, 673 void FullCodeGenerator::DoTest(Expression* condition,
674 Label* if_true, 674 Label* if_true,
675 Label* if_false, 675 Label* if_false,
676 Label* fall_through) { 676 Label* fall_through) {
677 ToBooleanStub stub(result_register()); 677 ToBooleanStub stub(result_register());
678 __ CallStub(&stub); 678 __ CallStub(&stub, condition->test_id());
679 __ tst(result_register(), result_register()); 679 __ tst(result_register(), result_register());
680 Split(ne, if_true, if_false, fall_through); 680 Split(ne, if_true, if_false, fall_through);
681 } 681 }
682 682
683 683
684 void FullCodeGenerator::Split(Condition cond, 684 void FullCodeGenerator::Split(Condition cond,
685 Label* if_true, 685 Label* if_true,
686 Label* if_false, 686 Label* if_false,
687 Label* fall_through) { 687 Label* fall_through) {
688 if (if_false == fall_through) { 688 if (if_false == fall_through) {
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET); 2323 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
2324 Handle<Object> uninitialized = 2324 Handle<Object> uninitialized =
2325 TypeFeedbackCells::UninitializedSentinel(isolate()); 2325 TypeFeedbackCells::UninitializedSentinel(isolate());
2326 Handle<JSGlobalPropertyCell> cell = 2326 Handle<JSGlobalPropertyCell> cell =
2327 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); 2327 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized);
2328 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell); 2328 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
2329 __ mov(r2, Operand(cell)); 2329 __ mov(r2, Operand(cell));
2330 2330
2331 CallFunctionStub stub(arg_count, flags); 2331 CallFunctionStub stub(arg_count, flags);
2332 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2332 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2333 __ CallStub(&stub); 2333 __ CallStub(&stub, expr->CallFeedbackId());
2334 RecordJSReturnSite(expr); 2334 RecordJSReturnSite(expr);
2335 // Restore context register. 2335 // Restore context register.
2336 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2336 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2337 context()->DropAndPlug(1, r0); 2337 context()->DropAndPlug(1, r0);
2338 } 2338 }
2339 2339
2340 2340
2341 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { 2341 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
2342 // Push copy of the first argument or undefined if it doesn't exist. 2342 // Push copy of the first argument or undefined if it doesn't exist.
2343 if (arg_count > 0) { 2343 if (arg_count > 0) {
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after
4553 *context_length = 0; 4553 *context_length = 0;
4554 return previous_; 4554 return previous_;
4555 } 4555 }
4556 4556
4557 4557
4558 #undef __ 4558 #undef __
4559 4559
4560 } } // namespace v8::internal 4560 } } // namespace v8::internal
4561 4561
4562 #endif // V8_TARGET_ARCH_ARM 4562 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698