| OLD | NEW |
| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); | 477 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); |
| 478 pop(Operand::StaticVariable(handler_address)); | 478 pop(Operand::StaticVariable(handler_address)); |
| 479 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 1 * kPointerSize); | 479 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 1 * kPointerSize); |
| 480 pop(ebp); | 480 pop(ebp); |
| 481 pop(edx); // Remove state. | 481 pop(edx); // Remove state. |
| 482 | 482 |
| 483 // Before returning we restore the context from the frame pointer if | 483 // Before returning we restore the context from the frame pointer if |
| 484 // not NULL. The frame pointer is NULL in the exception handler of | 484 // not NULL. The frame pointer is NULL in the exception handler of |
| 485 // a JS entry frame. | 485 // a JS entry frame. |
| 486 Set(esi, Immediate(0)); // Tentatively set context pointer to NULL. | 486 Set(esi, Immediate(0)); // Tentatively set context pointer to NULL. |
| 487 NearLabel skip; | 487 Label skip; |
| 488 cmp(ebp, 0); | 488 cmp(ebp, 0); |
| 489 j(equal, &skip, not_taken); | 489 j(equal, &skip, Label::kNear, not_taken); |
| 490 mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 490 mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 491 bind(&skip); | 491 bind(&skip); |
| 492 | 492 |
| 493 STATIC_ASSERT(StackHandlerConstants::kPCOffset == 3 * kPointerSize); | 493 STATIC_ASSERT(StackHandlerConstants::kPCOffset == 3 * kPointerSize); |
| 494 ret(0); | 494 ret(0); |
| 495 } | 495 } |
| 496 | 496 |
| 497 | 497 |
| 498 void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, | 498 void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, |
| 499 Register value) { | 499 Register value) { |
| 500 // Adjust this code if not the case. | 500 // Adjust this code if not the case. |
| 501 STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize); | 501 STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize); |
| 502 | 502 |
| 503 // eax must hold the exception. | 503 // eax must hold the exception. |
| 504 if (!value.is(eax)) { | 504 if (!value.is(eax)) { |
| 505 mov(eax, value); | 505 mov(eax, value); |
| 506 } | 506 } |
| 507 | 507 |
| 508 // Drop sp to the top stack handler. | 508 // Drop sp to the top stack handler. |
| 509 ExternalReference handler_address(Isolate::k_handler_address, | 509 ExternalReference handler_address(Isolate::k_handler_address, |
| 510 isolate()); | 510 isolate()); |
| 511 mov(esp, Operand::StaticVariable(handler_address)); | 511 mov(esp, Operand::StaticVariable(handler_address)); |
| 512 | 512 |
| 513 // Unwind the handlers until the ENTRY handler is found. | 513 // Unwind the handlers until the ENTRY handler is found. |
| 514 NearLabel loop, done; | 514 Label loop, done; |
| 515 bind(&loop); | 515 bind(&loop); |
| 516 // Load the type of the current stack handler. | 516 // Load the type of the current stack handler. |
| 517 const int kStateOffset = StackHandlerConstants::kStateOffset; | 517 const int kStateOffset = StackHandlerConstants::kStateOffset; |
| 518 cmp(Operand(esp, kStateOffset), Immediate(StackHandler::ENTRY)); | 518 cmp(Operand(esp, kStateOffset), Immediate(StackHandler::ENTRY)); |
| 519 j(equal, &done); | 519 j(equal, &done, Label::kNear); |
| 520 // Fetch the next handler in the list. | 520 // Fetch the next handler in the list. |
| 521 const int kNextOffset = StackHandlerConstants::kNextOffset; | 521 const int kNextOffset = StackHandlerConstants::kNextOffset; |
| 522 mov(esp, Operand(esp, kNextOffset)); | 522 mov(esp, Operand(esp, kNextOffset)); |
| 523 jmp(&loop); | 523 jmp(&loop); |
| 524 bind(&done); | 524 bind(&done); |
| 525 | 525 |
| 526 // Set the top handler address to next handler past the current ENTRY handler. | 526 // Set the top handler address to next handler past the current ENTRY handler. |
| 527 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); | 527 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); |
| 528 pop(Operand::StaticVariable(handler_address)); | 528 pop(Operand::StaticVariable(handler_address)); |
| 529 | 529 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 push(scratch); | 580 push(scratch); |
| 581 // Read the first word and compare to global_context_map. | 581 // Read the first word and compare to global_context_map. |
| 582 mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); | 582 mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); |
| 583 cmp(scratch, isolate()->factory()->global_context_map()); | 583 cmp(scratch, isolate()->factory()->global_context_map()); |
| 584 Check(equal, "JSGlobalObject::global_context should be a global context."); | 584 Check(equal, "JSGlobalObject::global_context should be a global context."); |
| 585 pop(scratch); | 585 pop(scratch); |
| 586 } | 586 } |
| 587 | 587 |
| 588 // Check if both contexts are the same. | 588 // Check if both contexts are the same. |
| 589 cmp(scratch, FieldOperand(holder_reg, JSGlobalProxy::kContextOffset)); | 589 cmp(scratch, FieldOperand(holder_reg, JSGlobalProxy::kContextOffset)); |
| 590 j(equal, &same_contexts, taken); | 590 j(equal, &same_contexts, Label::kFar, taken); |
| 591 | 591 |
| 592 // Compare security tokens, save holder_reg on the stack so we can use it | 592 // Compare security tokens, save holder_reg on the stack so we can use it |
| 593 // as a temporary register. | 593 // as a temporary register. |
| 594 // | 594 // |
| 595 // TODO(119): avoid push(holder_reg)/pop(holder_reg) | 595 // TODO(119): avoid push(holder_reg)/pop(holder_reg) |
| 596 push(holder_reg); | 596 push(holder_reg); |
| 597 // Check that the security token in the calling global object is | 597 // Check that the security token in the calling global object is |
| 598 // compatible with the security token in the receiving global | 598 // compatible with the security token in the receiving global |
| 599 // object. | 599 // object. |
| 600 mov(holder_reg, FieldOperand(holder_reg, JSGlobalProxy::kContextOffset)); | 600 mov(holder_reg, FieldOperand(holder_reg, JSGlobalProxy::kContextOffset)); |
| 601 | 601 |
| 602 // Check the context is a global context. | 602 // Check the context is a global context. |
| 603 if (emit_debug_code()) { | 603 if (emit_debug_code()) { |
| 604 cmp(holder_reg, isolate()->factory()->null_value()); | 604 cmp(holder_reg, isolate()->factory()->null_value()); |
| 605 Check(not_equal, "JSGlobalProxy::context() should not be null."); | 605 Check(not_equal, "JSGlobalProxy::context() should not be null."); |
| 606 | 606 |
| 607 push(holder_reg); | 607 push(holder_reg); |
| 608 // Read the first word and compare to global_context_map(), | 608 // Read the first word and compare to global_context_map(), |
| 609 mov(holder_reg, FieldOperand(holder_reg, HeapObject::kMapOffset)); | 609 mov(holder_reg, FieldOperand(holder_reg, HeapObject::kMapOffset)); |
| 610 cmp(holder_reg, isolate()->factory()->global_context_map()); | 610 cmp(holder_reg, isolate()->factory()->global_context_map()); |
| 611 Check(equal, "JSGlobalObject::global_context should be a global context."); | 611 Check(equal, "JSGlobalObject::global_context should be a global context."); |
| 612 pop(holder_reg); | 612 pop(holder_reg); |
| 613 } | 613 } |
| 614 | 614 |
| 615 int token_offset = Context::kHeaderSize + | 615 int token_offset = Context::kHeaderSize + |
| 616 Context::SECURITY_TOKEN_INDEX * kPointerSize; | 616 Context::SECURITY_TOKEN_INDEX * kPointerSize; |
| 617 mov(scratch, FieldOperand(scratch, token_offset)); | 617 mov(scratch, FieldOperand(scratch, token_offset)); |
| 618 cmp(scratch, FieldOperand(holder_reg, token_offset)); | 618 cmp(scratch, FieldOperand(holder_reg, token_offset)); |
| 619 pop(holder_reg); | 619 pop(holder_reg); |
| 620 j(not_equal, miss, not_taken); | 620 j(not_equal, miss, Label::kFar, not_taken); |
| 621 | 621 |
| 622 bind(&same_contexts); | 622 bind(&same_contexts); |
| 623 } | 623 } |
| 624 | 624 |
| 625 | 625 |
| 626 void MacroAssembler::LoadAllocationTopHelper(Register result, | 626 void MacroAssembler::LoadAllocationTopHelper(Register result, |
| 627 Register scratch, | 627 Register scratch, |
| 628 AllocationFlags flags) { | 628 AllocationFlags flags) { |
| 629 ExternalReference new_space_allocation_top = | 629 ExternalReference new_space_allocation_top = |
| 630 ExternalReference::new_space_allocation_top_address(isolate()); | 630 ExternalReference::new_space_allocation_top_address(isolate()); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 Register top_reg = result_end.is_valid() ? result_end : result; | 698 Register top_reg = result_end.is_valid() ? result_end : result; |
| 699 | 699 |
| 700 // Calculate new top and bail out if new space is exhausted. | 700 // Calculate new top and bail out if new space is exhausted. |
| 701 ExternalReference new_space_allocation_limit = | 701 ExternalReference new_space_allocation_limit = |
| 702 ExternalReference::new_space_allocation_limit_address(isolate()); | 702 ExternalReference::new_space_allocation_limit_address(isolate()); |
| 703 | 703 |
| 704 if (!top_reg.is(result)) { | 704 if (!top_reg.is(result)) { |
| 705 mov(top_reg, result); | 705 mov(top_reg, result); |
| 706 } | 706 } |
| 707 add(Operand(top_reg), Immediate(object_size)); | 707 add(Operand(top_reg), Immediate(object_size)); |
| 708 j(carry, gc_required, not_taken); | 708 j(carry, gc_required, Label::kFar, not_taken); |
| 709 cmp(top_reg, Operand::StaticVariable(new_space_allocation_limit)); | 709 cmp(top_reg, Operand::StaticVariable(new_space_allocation_limit)); |
| 710 j(above, gc_required, not_taken); | 710 j(above, gc_required, Label::kFar, not_taken); |
| 711 | 711 |
| 712 // Update allocation top. | 712 // Update allocation top. |
| 713 UpdateAllocationTopHelper(top_reg, scratch); | 713 UpdateAllocationTopHelper(top_reg, scratch); |
| 714 | 714 |
| 715 // Tag result if requested. | 715 // Tag result if requested. |
| 716 if (top_reg.is(result)) { | 716 if (top_reg.is(result)) { |
| 717 if ((flags & TAG_OBJECT) != 0) { | 717 if ((flags & TAG_OBJECT) != 0) { |
| 718 sub(Operand(result), Immediate(object_size - kHeapObjectTag)); | 718 sub(Operand(result), Immediate(object_size - kHeapObjectTag)); |
| 719 } else { | 719 } else { |
| 720 sub(Operand(result), Immediate(object_size)); | 720 sub(Operand(result), Immediate(object_size)); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 // Load address of new object into result. | 797 // Load address of new object into result. |
| 798 LoadAllocationTopHelper(result, scratch, flags); | 798 LoadAllocationTopHelper(result, scratch, flags); |
| 799 | 799 |
| 800 // Calculate new top and bail out if new space is exhausted. | 800 // Calculate new top and bail out if new space is exhausted. |
| 801 ExternalReference new_space_allocation_limit = | 801 ExternalReference new_space_allocation_limit = |
| 802 ExternalReference::new_space_allocation_limit_address(isolate()); | 802 ExternalReference::new_space_allocation_limit_address(isolate()); |
| 803 if (!object_size.is(result_end)) { | 803 if (!object_size.is(result_end)) { |
| 804 mov(result_end, object_size); | 804 mov(result_end, object_size); |
| 805 } | 805 } |
| 806 add(result_end, Operand(result)); | 806 add(result_end, Operand(result)); |
| 807 j(carry, gc_required, not_taken); | 807 j(carry, gc_required, Label::kFar, not_taken); |
| 808 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit)); | 808 cmp(result_end, Operand::StaticVariable(new_space_allocation_limit)); |
| 809 j(above, gc_required, not_taken); | 809 j(above, gc_required, Label::kFar, not_taken); |
| 810 | 810 |
| 811 // Tag result if requested. | 811 // Tag result if requested. |
| 812 if ((flags & TAG_OBJECT) != 0) { | 812 if ((flags & TAG_OBJECT) != 0) { |
| 813 lea(result, Operand(result, kHeapObjectTag)); | 813 lea(result, Operand(result, kHeapObjectTag)); |
| 814 } | 814 } |
| 815 | 815 |
| 816 // Update allocation top. | 816 // Update allocation top. |
| 817 UpdateAllocationTopHelper(result_end, scratch); | 817 UpdateAllocationTopHelper(result_end, scratch); |
| 818 } | 818 } |
| 819 | 819 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 | 1028 |
| 1029 bind(&done); | 1029 bind(&done); |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 | 1032 |
| 1033 void MacroAssembler::NegativeZeroTest(Register result, | 1033 void MacroAssembler::NegativeZeroTest(Register result, |
| 1034 Register op, | 1034 Register op, |
| 1035 Label* then_label) { | 1035 Label* then_label) { |
| 1036 Label ok; | 1036 Label ok; |
| 1037 test(result, Operand(result)); | 1037 test(result, Operand(result)); |
| 1038 j(not_zero, &ok, taken); | 1038 j(not_zero, &ok, Label::kFar, taken); |
| 1039 test(op, Operand(op)); | 1039 test(op, Operand(op)); |
| 1040 j(sign, then_label, not_taken); | 1040 j(sign, then_label, Label::kFar, not_taken); |
| 1041 bind(&ok); | 1041 bind(&ok); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 | 1044 |
| 1045 void MacroAssembler::NegativeZeroTest(Register result, | 1045 void MacroAssembler::NegativeZeroTest(Register result, |
| 1046 Register op1, | 1046 Register op1, |
| 1047 Register op2, | 1047 Register op2, |
| 1048 Register scratch, | 1048 Register scratch, |
| 1049 Label* then_label) { | 1049 Label* then_label) { |
| 1050 Label ok; | 1050 Label ok; |
| 1051 test(result, Operand(result)); | 1051 test(result, Operand(result)); |
| 1052 j(not_zero, &ok, taken); | 1052 j(not_zero, &ok, Label::kFar, taken); |
| 1053 mov(scratch, Operand(op1)); | 1053 mov(scratch, Operand(op1)); |
| 1054 or_(scratch, Operand(op2)); | 1054 or_(scratch, Operand(op2)); |
| 1055 j(sign, then_label, not_taken); | 1055 j(sign, then_label, Label::kFar, not_taken); |
| 1056 bind(&ok); | 1056 bind(&ok); |
| 1057 } | 1057 } |
| 1058 | 1058 |
| 1059 | 1059 |
| 1060 void MacroAssembler::TryGetFunctionPrototype(Register function, | 1060 void MacroAssembler::TryGetFunctionPrototype(Register function, |
| 1061 Register result, | 1061 Register result, |
| 1062 Register scratch, | 1062 Register scratch, |
| 1063 Label* miss) { | 1063 Label* miss) { |
| 1064 // Check that the receiver isn't a smi. | 1064 // Check that the receiver isn't a smi. |
| 1065 test(function, Immediate(kSmiTagMask)); | 1065 test(function, Immediate(kSmiTagMask)); |
| 1066 j(zero, miss, not_taken); | 1066 j(zero, miss, Label::kFar, not_taken); |
| 1067 | 1067 |
| 1068 // Check that the function really is a function. | 1068 // Check that the function really is a function. |
| 1069 CmpObjectType(function, JS_FUNCTION_TYPE, result); | 1069 CmpObjectType(function, JS_FUNCTION_TYPE, result); |
| 1070 j(not_equal, miss, not_taken); | 1070 j(not_equal, miss, Label::kFar, not_taken); |
| 1071 | 1071 |
| 1072 // Make sure that the function has an instance prototype. | 1072 // Make sure that the function has an instance prototype. |
| 1073 Label non_instance; | 1073 Label non_instance; |
| 1074 movzx_b(scratch, FieldOperand(result, Map::kBitFieldOffset)); | 1074 movzx_b(scratch, FieldOperand(result, Map::kBitFieldOffset)); |
| 1075 test(scratch, Immediate(1 << Map::kHasNonInstancePrototype)); | 1075 test(scratch, Immediate(1 << Map::kHasNonInstancePrototype)); |
| 1076 j(not_zero, &non_instance, not_taken); | 1076 j(not_zero, &non_instance, Label::kFar, not_taken); |
| 1077 | 1077 |
| 1078 // Get the prototype or initial map from the function. | 1078 // Get the prototype or initial map from the function. |
| 1079 mov(result, | 1079 mov(result, |
| 1080 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 1080 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
| 1081 | 1081 |
| 1082 // If the prototype or initial map is the hole, don't return it and | 1082 // If the prototype or initial map is the hole, don't return it and |
| 1083 // simply miss the cache instead. This will allow us to allocate a | 1083 // simply miss the cache instead. This will allow us to allocate a |
| 1084 // prototype object on-demand in the runtime system. | 1084 // prototype object on-demand in the runtime system. |
| 1085 cmp(Operand(result), Immediate(isolate()->factory()->the_hole_value())); | 1085 cmp(Operand(result), Immediate(isolate()->factory()->the_hole_value())); |
| 1086 j(equal, miss, not_taken); | 1086 j(equal, miss, Label::kFar, not_taken); |
| 1087 | 1087 |
| 1088 // If the function does not have an initial map, we're done. | 1088 // If the function does not have an initial map, we're done. |
| 1089 Label done; | 1089 Label done; |
| 1090 CmpObjectType(result, MAP_TYPE, scratch); | 1090 CmpObjectType(result, MAP_TYPE, scratch); |
| 1091 j(not_equal, &done); | 1091 j(not_equal, &done); |
| 1092 | 1092 |
| 1093 // Get the prototype from the initial map. | 1093 // Get the prototype from the initial map. |
| 1094 mov(result, FieldOperand(result, Map::kPrototypeOffset)); | 1094 mov(result, FieldOperand(result, Map::kPrototypeOffset)); |
| 1095 jmp(&done); | 1095 jmp(&done); |
| 1096 | 1096 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 Label empty_handle; | 1359 Label empty_handle; |
| 1360 Label prologue; | 1360 Label prologue; |
| 1361 Label promote_scheduled_exception; | 1361 Label promote_scheduled_exception; |
| 1362 Label delete_allocated_handles; | 1362 Label delete_allocated_handles; |
| 1363 Label leave_exit_frame; | 1363 Label leave_exit_frame; |
| 1364 | 1364 |
| 1365 // Check if the result handle holds 0. | 1365 // Check if the result handle holds 0. |
| 1366 test(eax, Operand(eax)); | 1366 test(eax, Operand(eax)); |
| 1367 j(zero, &empty_handle, not_taken); | 1367 j(zero, &empty_handle, Label::kFar, not_taken); |
| 1368 // It was non-zero. Dereference to get the result value. | 1368 // It was non-zero. Dereference to get the result value. |
| 1369 mov(eax, Operand(eax, 0)); | 1369 mov(eax, Operand(eax, 0)); |
| 1370 bind(&prologue); | 1370 bind(&prologue); |
| 1371 // No more valid handles (the result handle was the last one). Restore | 1371 // No more valid handles (the result handle was the last one). Restore |
| 1372 // previous handle scope. | 1372 // previous handle scope. |
| 1373 mov(Operand::StaticVariable(next_address), ebx); | 1373 mov(Operand::StaticVariable(next_address), ebx); |
| 1374 sub(Operand::StaticVariable(level_address), Immediate(1)); | 1374 sub(Operand::StaticVariable(level_address), Immediate(1)); |
| 1375 Assert(above_equal, "Invalid HandleScope level"); | 1375 Assert(above_equal, "Invalid HandleScope level"); |
| 1376 cmp(edi, Operand::StaticVariable(limit_address)); | 1376 cmp(edi, Operand::StaticVariable(limit_address)); |
| 1377 j(not_equal, &delete_allocated_handles, not_taken); | 1377 j(not_equal, &delete_allocated_handles, Label::kFar, not_taken); |
| 1378 bind(&leave_exit_frame); | 1378 bind(&leave_exit_frame); |
| 1379 | 1379 |
| 1380 // Check if the function scheduled an exception. | 1380 // Check if the function scheduled an exception. |
| 1381 ExternalReference scheduled_exception_address = | 1381 ExternalReference scheduled_exception_address = |
| 1382 ExternalReference::scheduled_exception_address(isolate()); | 1382 ExternalReference::scheduled_exception_address(isolate()); |
| 1383 cmp(Operand::StaticVariable(scheduled_exception_address), | 1383 cmp(Operand::StaticVariable(scheduled_exception_address), |
| 1384 Immediate(isolate()->factory()->the_hole_value())); | 1384 Immediate(isolate()->factory()->the_hole_value())); |
| 1385 j(not_equal, &promote_scheduled_exception, not_taken); | 1385 j(not_equal, &promote_scheduled_exception, Label::kFar, not_taken); |
| 1386 LeaveApiExitFrame(); | 1386 LeaveApiExitFrame(); |
| 1387 ret(stack_space * kPointerSize); | 1387 ret(stack_space * kPointerSize); |
| 1388 bind(&promote_scheduled_exception); | 1388 bind(&promote_scheduled_exception); |
| 1389 MaybeObject* result = | 1389 MaybeObject* result = |
| 1390 TryTailCallRuntime(Runtime::kPromoteScheduledException, 0, 1); | 1390 TryTailCallRuntime(Runtime::kPromoteScheduledException, 0, 1); |
| 1391 if (result->IsFailure()) { | 1391 if (result->IsFailure()) { |
| 1392 return result; | 1392 return result; |
| 1393 } | 1393 } |
| 1394 bind(&empty_handle); | 1394 bind(&empty_handle); |
| 1395 // It was zero; the result is undefined. | 1395 // It was zero; the result is undefined. |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 Immediate(factory->fixed_cow_array_map())); | 1813 Immediate(factory->fixed_cow_array_map())); |
| 1814 j(equal, &ok); | 1814 j(equal, &ok); |
| 1815 Abort("JSObject with fast elements map has slow elements"); | 1815 Abort("JSObject with fast elements map has slow elements"); |
| 1816 bind(&ok); | 1816 bind(&ok); |
| 1817 } | 1817 } |
| 1818 } | 1818 } |
| 1819 | 1819 |
| 1820 | 1820 |
| 1821 void MacroAssembler::Check(Condition cc, const char* msg) { | 1821 void MacroAssembler::Check(Condition cc, const char* msg) { |
| 1822 Label L; | 1822 Label L; |
| 1823 j(cc, &L, taken); | 1823 j(cc, &L, Label::kFar, taken); |
| 1824 Abort(msg); | 1824 Abort(msg); |
| 1825 // will not return here | 1825 // will not return here |
| 1826 bind(&L); | 1826 bind(&L); |
| 1827 } | 1827 } |
| 1828 | 1828 |
| 1829 | 1829 |
| 1830 void MacroAssembler::CheckStackAlignment() { | 1830 void MacroAssembler::CheckStackAlignment() { |
| 1831 int frame_alignment = OS::ActivationFrameAlignment(); | 1831 int frame_alignment = OS::ActivationFrameAlignment(); |
| 1832 int frame_alignment_mask = frame_alignment - 1; | 1832 int frame_alignment_mask = frame_alignment - 1; |
| 1833 if (frame_alignment > kPointerSize) { | 1833 if (frame_alignment > kPointerSize) { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 | 2036 |
| 2037 // Check that the code was patched as expected. | 2037 // Check that the code was patched as expected. |
| 2038 ASSERT(masm_.pc_ == address_ + size_); | 2038 ASSERT(masm_.pc_ == address_ + size_); |
| 2039 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2039 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2040 } | 2040 } |
| 2041 | 2041 |
| 2042 | 2042 |
| 2043 } } // namespace v8::internal | 2043 } } // namespace v8::internal |
| 2044 | 2044 |
| 2045 #endif // V8_TARGET_ARCH_IA32 | 2045 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |