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 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 Object* result; | 1503 Object* result; |
1504 { MaybeObject* maybe_result = stub->TryGetCode(); | 1504 { MaybeObject* maybe_result = stub->TryGetCode(); |
1505 if (!maybe_result->ToObject(&result)) return maybe_result; | 1505 if (!maybe_result->ToObject(&result)) return maybe_result; |
1506 } | 1506 } |
1507 call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET); | 1507 call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET); |
1508 return result; | 1508 return result; |
1509 } | 1509 } |
1510 | 1510 |
1511 | 1511 |
1512 void MacroAssembler::TailCallStub(CodeStub* stub) { | 1512 void MacroAssembler::TailCallStub(CodeStub* stub) { |
1513 ASSERT(stub->CompilingCallsToThisStubIsGCSafe() || allow_stub_calls_); | 1513 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); |
1514 jmp(stub->GetCode(), RelocInfo::CODE_TARGET); | 1514 jmp(stub->GetCode(), RelocInfo::CODE_TARGET); |
1515 } | 1515 } |
1516 | 1516 |
1517 | 1517 |
1518 MaybeObject* MacroAssembler::TryTailCallStub(CodeStub* stub) { | 1518 MaybeObject* MacroAssembler::TryTailCallStub(CodeStub* stub) { |
1519 Object* result; | 1519 Object* result; |
1520 { MaybeObject* maybe_result = stub->TryGetCode(); | 1520 { MaybeObject* maybe_result = stub->TryGetCode(); |
1521 if (!maybe_result->ToObject(&result)) return maybe_result; | 1521 if (!maybe_result->ToObject(&result)) return maybe_result; |
1522 } | 1522 } |
1523 jmp(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET); | 1523 jmp(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET); |
1524 return result; | 1524 return result; |
1525 } | 1525 } |
1526 | 1526 |
1527 | 1527 |
1528 void MacroAssembler::StubReturn(int argc) { | 1528 void MacroAssembler::StubReturn(int argc) { |
1529 ASSERT(argc >= 1 && generating_stub()); | 1529 ASSERT(argc >= 1 && generating_stub()); |
1530 ret((argc - 1) * kPointerSize); | 1530 ret((argc - 1) * kPointerSize); |
1531 } | 1531 } |
1532 | 1532 |
1533 | 1533 |
1534 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { | 1534 bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
1535 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; | 1535 if (!has_frame_ && stub->SometimesSetsUpAFrame()) return false; |
1536 return stub->CompilingCallsToThisStubIsGCSafe() || allow_stub_calls_; | 1536 return allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe(); |
1537 } | 1537 } |
1538 | 1538 |
1539 | 1539 |
1540 void MacroAssembler::IllegalOperation(int num_arguments) { | 1540 void MacroAssembler::IllegalOperation(int num_arguments) { |
1541 if (num_arguments > 0) { | 1541 if (num_arguments > 0) { |
1542 add(Operand(esp), Immediate(num_arguments * kPointerSize)); | 1542 add(Operand(esp), Immediate(num_arguments * kPointerSize)); |
1543 } | 1543 } |
1544 mov(eax, Immediate(isolate()->factory()->undefined_value())); | 1544 mov(eax, Immediate(isolate()->factory()->undefined_value())); |
1545 } | 1545 } |
1546 | 1546 |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2640 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); | 2640 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); |
2641 Check(less_equal, "Live Bytes Count overflow chunk size"); | 2641 Check(less_equal, "Live Bytes Count overflow chunk size"); |
2642 } | 2642 } |
2643 | 2643 |
2644 bind(&done); | 2644 bind(&done); |
2645 } | 2645 } |
2646 | 2646 |
2647 } } // namespace v8::internal | 2647 } } // namespace v8::internal |
2648 | 2648 |
2649 #endif // V8_TARGET_ARCH_IA32 | 2649 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |