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 5020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5031 __ mov(Operand(esp, 1 * kPointerSize), esi); // argv. | 5031 __ mov(Operand(esp, 1 * kPointerSize), esi); // argv. |
5032 __ mov(Operand(esp, 2 * kPointerSize), | 5032 __ mov(Operand(esp, 2 * kPointerSize), |
5033 Immediate(ExternalReference::isolate_address())); | 5033 Immediate(ExternalReference::isolate_address())); |
5034 __ call(ebx); | 5034 __ call(ebx); |
5035 // Result is in eax or edx:eax - do not destroy these registers! | 5035 // Result is in eax or edx:eax - do not destroy these registers! |
5036 | 5036 |
5037 if (always_allocate_scope) { | 5037 if (always_allocate_scope) { |
5038 __ dec(Operand::StaticVariable(scope_depth)); | 5038 __ dec(Operand::StaticVariable(scope_depth)); |
5039 } | 5039 } |
5040 | 5040 |
5041 // Make sure we're not trying to return 'the hole' from the runtime | 5041 // Most runtime functions should not return 'the hole'. Allowing it to escape |
5042 // call as this may lead to crashes in the IC code later. | 5042 // may lead to crashes in the IC code later. |
5043 if (FLAG_debug_code) { | 5043 if (FLAG_debug_code) { |
5044 Label okay; | 5044 Label okay; |
5045 __ cmp(eax, masm->isolate()->factory()->the_hole_value()); | 5045 __ cmp(eax, masm->isolate()->factory()->the_hole_value()); |
5046 __ j(not_equal, &okay, Label::kNear); | 5046 __ j(not_equal, &okay, Label::kNear); |
5047 // However, it is expected that SuspendJSGeneratorObject returns the hole. | |
Michael Starzinger
2013/04/25 10:39:57
I am fine with landing this white-listing for now
| |
5048 __ cmp(ebx, Immediate(ExternalReference( | |
5049 Runtime::kSuspendJSGeneratorObject, masm->isolate()))); | |
5050 __ j(equal, &okay, Label::kNear); | |
5047 __ int3(); | 5051 __ int3(); |
5048 __ bind(&okay); | 5052 __ bind(&okay); |
5049 } | 5053 } |
5050 | 5054 |
5051 // Check for failure result. | 5055 // Check for failure result. |
5052 Label failure_returned; | 5056 Label failure_returned; |
5053 STATIC_ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); | 5057 STATIC_ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0); |
5054 __ lea(ecx, Operand(eax, 1)); | 5058 __ lea(ecx, Operand(eax, 1)); |
5055 // Lower 2 bits of ecx are 0 iff eax has failure tag. | 5059 // Lower 2 bits of ecx are 0 iff eax has failure tag. |
5056 __ test(ecx, Immediate(kFailureTagMask)); | 5060 __ test(ecx, Immediate(kFailureTagMask)); |
(...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7709 // Restore ecx. | 7713 // Restore ecx. |
7710 __ pop(ecx); | 7714 __ pop(ecx); |
7711 __ ret(0); | 7715 __ ret(0); |
7712 } | 7716 } |
7713 | 7717 |
7714 #undef __ | 7718 #undef __ |
7715 | 7719 |
7716 } } // namespace v8::internal | 7720 } } // namespace v8::internal |
7717 | 7721 |
7718 #endif // V8_TARGET_ARCH_IA32 | 7722 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |