| 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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 // Exit with Result EXCEPTION(-1) to signal thrown exception. | 875 // Exit with Result EXCEPTION(-1) to signal thrown exception. |
| 876 __ li(v0, Operand(EXCEPTION)); | 876 __ li(v0, Operand(EXCEPTION)); |
| 877 __ jmp(&return_v0); | 877 __ jmp(&return_v0); |
| 878 } | 878 } |
| 879 } | 879 } |
| 880 | 880 |
| 881 CodeDesc code_desc; | 881 CodeDesc code_desc; |
| 882 masm_->GetCode(&code_desc); | 882 masm_->GetCode(&code_desc); |
| 883 Handle<Code> code = isolate()->factory()->NewCode( | 883 Handle<Code> code = isolate()->factory()->NewCode( |
| 884 code_desc, Code::ComputeFlags(Code::REGEXP), masm_->CodeObject()); | 884 code_desc, Code::ComputeFlags(Code::REGEXP), masm_->CodeObject()); |
| 885 LOG(Isolate::Current(), RegExpCodeCreateEvent(*code, *source)); | 885 LOG(masm_->isolate(), RegExpCodeCreateEvent(*code, *source)); |
| 886 return Handle<HeapObject>::cast(code); | 886 return Handle<HeapObject>::cast(code); |
| 887 } | 887 } |
| 888 | 888 |
| 889 | 889 |
| 890 void RegExpMacroAssemblerMIPS::GoTo(Label* to) { | 890 void RegExpMacroAssemblerMIPS::GoTo(Label* to) { |
| 891 if (to == NULL) { | 891 if (to == NULL) { |
| 892 Backtrack(); | 892 Backtrack(); |
| 893 return; | 893 return; |
| 894 } | 894 } |
| 895 __ jmp(to); | 895 __ jmp(to); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 template <typename T> | 1079 template <typename T> |
| 1080 static T& frame_entry(Address re_frame, int frame_offset) { | 1080 static T& frame_entry(Address re_frame, int frame_offset) { |
| 1081 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); | 1081 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); |
| 1082 } | 1082 } |
| 1083 | 1083 |
| 1084 | 1084 |
| 1085 int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address, | 1085 int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address, |
| 1086 Code* re_code, | 1086 Code* re_code, |
| 1087 Address re_frame) { | 1087 Address re_frame) { |
| 1088 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); | 1088 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); |
| 1089 ASSERT(isolate == Isolate::Current()); | |
| 1090 if (isolate->stack_guard()->IsStackOverflow()) { | 1089 if (isolate->stack_guard()->IsStackOverflow()) { |
| 1091 isolate->StackOverflow(); | 1090 isolate->StackOverflow(); |
| 1092 return EXCEPTION; | 1091 return EXCEPTION; |
| 1093 } | 1092 } |
| 1094 | 1093 |
| 1095 // If not real stack overflow the stack guard was used to interrupt | 1094 // If not real stack overflow the stack guard was used to interrupt |
| 1096 // execution for another purpose. | 1095 // execution for another purpose. |
| 1097 | 1096 |
| 1098 // If this is a direct call from JavaScript retry the RegExp forcing the call | 1097 // If this is a direct call from JavaScript retry the RegExp forcing the call |
| 1099 // through the runtime system. Currently the direct call cannot handle a GC. | 1098 // through the runtime system. Currently the direct call cannot handle a GC. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 } | 1329 } |
| 1331 | 1330 |
| 1332 | 1331 |
| 1333 #undef __ | 1332 #undef __ |
| 1334 | 1333 |
| 1335 #endif // V8_INTERPRETED_REGEXP | 1334 #endif // V8_INTERPRETED_REGEXP |
| 1336 | 1335 |
| 1337 }} // namespace v8::internal | 1336 }} // namespace v8::internal |
| 1338 | 1337 |
| 1339 #endif // V8_TARGET_ARCH_MIPS | 1338 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |