OLD | NEW |
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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 } | 652 } |
653 } | 653 } |
654 | 654 |
655 | 655 |
656 void FullCodeGenerator::DoTest(Expression* condition, | 656 void FullCodeGenerator::DoTest(Expression* condition, |
657 Label* if_true, | 657 Label* if_true, |
658 Label* if_false, | 658 Label* if_false, |
659 Label* fall_through) { | 659 Label* fall_through) { |
660 ToBooleanStub stub(result_register()); | 660 ToBooleanStub stub(result_register()); |
661 __ push(result_register()); | 661 __ push(result_register()); |
662 __ CallStub(&stub); | 662 __ CallStub(&stub, condition->test_id()); |
663 __ testq(result_register(), result_register()); | 663 __ testq(result_register(), result_register()); |
664 // The stub returns nonzero for true. | 664 // The stub returns nonzero for true. |
665 Split(not_zero, if_true, if_false, fall_through); | 665 Split(not_zero, if_true, if_false, fall_through); |
666 } | 666 } |
667 | 667 |
668 | 668 |
669 void FullCodeGenerator::Split(Condition cc, | 669 void FullCodeGenerator::Split(Condition cc, |
670 Label* if_true, | 670 Label* if_true, |
671 Label* if_false, | 671 Label* if_false, |
672 Label* fall_through) { | 672 Label* fall_through) { |
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 Handle<Object> uninitialized = | 2280 Handle<Object> uninitialized = |
2281 TypeFeedbackCells::UninitializedSentinel(isolate()); | 2281 TypeFeedbackCells::UninitializedSentinel(isolate()); |
2282 Handle<JSGlobalPropertyCell> cell = | 2282 Handle<JSGlobalPropertyCell> cell = |
2283 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); | 2283 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); |
2284 RecordTypeFeedbackCell(expr->id(), cell); | 2284 RecordTypeFeedbackCell(expr->id(), cell); |
2285 __ Move(rbx, cell); | 2285 __ Move(rbx, cell); |
2286 } | 2286 } |
2287 | 2287 |
2288 CallFunctionStub stub(arg_count, flags); | 2288 CallFunctionStub stub(arg_count, flags); |
2289 __ movq(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); | 2289 __ movq(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
2290 __ CallStub(&stub); | 2290 __ CallStub(&stub, expr->id()); |
2291 RecordJSReturnSite(expr); | 2291 RecordJSReturnSite(expr); |
2292 // Restore context register. | 2292 // Restore context register. |
2293 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2293 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2294 // Discard the function left on TOS. | 2294 // Discard the function left on TOS. |
2295 context()->DropAndPlug(1, rax); | 2295 context()->DropAndPlug(1, rax); |
2296 } | 2296 } |
2297 | 2297 |
2298 | 2298 |
2299 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2299 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
2300 // Push copy of the first argument or undefined if it doesn't exist. | 2300 // Push copy of the first argument or undefined if it doesn't exist. |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4503 *context_length = 0; | 4503 *context_length = 0; |
4504 return previous_; | 4504 return previous_; |
4505 } | 4505 } |
4506 | 4506 |
4507 | 4507 |
4508 #undef __ | 4508 #undef __ |
4509 | 4509 |
4510 } } // namespace v8::internal | 4510 } } // namespace v8::internal |
4511 | 4511 |
4512 #endif // V8_TARGET_ARCH_X64 | 4512 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |